u-popup.js.map 26 KB

1
  1. {"version":3,"sources":["webpack:///D:/星火篮球维护/代码/小程序教练端/spark-coach/uview-ui/components/u-popup/u-popup.vue?e0b2","webpack:///D:/星火篮球维护/代码/小程序教练端/spark-coach/uview-ui/components/u-popup/u-popup.vue?62af","webpack:///D:/星火篮球维护/代码/小程序教练端/spark-coach/uview-ui/components/u-popup/u-popup.vue?63b3","webpack:///D:/星火篮球维护/代码/小程序教练端/spark-coach/uview-ui/components/u-popup/u-popup.vue?353b","uni-app:///uview-ui/components/u-popup/u-popup.vue","webpack:///D:/星火篮球维护/代码/小程序教练端/spark-coach/uview-ui/components/u-popup/u-popup.vue?af12","webpack:///D:/星火篮球维护/代码/小程序教练端/spark-coach/uview-ui/components/u-popup/u-popup.vue?ea62"],"names":[],"mappings":"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","file":"uview-ui/components/u-popup/u-popup.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./u-popup.vue?vue&type=template&id=17becaea&scoped=true&\"\nvar renderjs\nimport script from \"./u-popup.vue?vue&type=script&lang=js&\"\nexport * from \"./u-popup.vue?vue&type=script&lang=js&\"\nimport style0 from \"./u-popup.vue?vue&type=style&index=0&id=17becaea&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\runtime\\\\componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"17becaea\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"uview-ui/components/u-popup/u-popup.vue\"\nexport default component.exports","export * from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-popup.vue?vue&type=template&id=17becaea&scoped=true&\"","var components\ntry {\n components = {\n uMask: function() {\n return import(\n /* webpackChunkName: \"uview-ui/components/u-mask/u-mask\" */ \"@/uview-ui/components/u-mask/u-mask.vue\"\n )\n },\n uIcon: function() {\n return import(\n /* webpackChunkName: \"uview-ui/components/u-icon/u-icon\" */ \"@/uview-ui/components/u-icon/u-icon.vue\"\n )\n }\n }\n} catch (e) {\n if (\n e.message.indexOf(\"Cannot find module\") !== -1 &&\n e.message.indexOf(\".vue\") !== -1\n ) {\n console.error(e.message)\n console.error(\"1. 排查组件名称拼写是否正确\")\n console.error(\n \"2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom\"\n )\n console.error(\n \"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件\"\n )\n } else {\n throw e\n }\n}\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n var s0 = _vm.visibleSync\n ? _vm.__get_style([\n _vm.customStyle,\n {\n zIndex: _vm.uZindex - 1\n }\n ])\n : null\n var s1 = _vm.visibleSync ? _vm.__get_style([_vm.style]) : null\n var s2 =\n _vm.visibleSync && _vm.mode == \"center\"\n ? _vm.__get_style([_vm.centerStyle])\n : null\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n s0: s0,\n s1: s1,\n s2: s2\n }\n }\n )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-popup.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-popup.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view v-if=\"visibleSync\" :style=\"[customStyle, {\r\n\t\tzIndex: uZindex - 1\r\n\t}]\" class=\"u-drawer\" hover-stop-propagation>\r\n\t\t<u-mask :duration=\"duration\" :custom-style=\"maskCustomStyle\" :maskClickAble=\"maskCloseAble\" :z-index=\"uZindex - 2\" :show=\"showDrawer && mask\" @click=\"maskClick\"></u-mask>\r\n\t\t<view\r\n\t\t\tclass=\"u-drawer-content\"\r\n\t\t\t@tap=\"modeCenterClose(mode)\"\r\n\t\t\t:class=\"[\r\n\t\t\t\tsafeAreaInsetBottom ? 'safe-area-inset-bottom' : '',\r\n\t\t\t\t'u-drawer-' + mode,\r\n\t\t\t\tshowDrawer ? 'u-drawer-content-visible' : '',\r\n\t\t\t\tzoom && mode == 'center' ? 'u-animation-zoom' : ''\r\n\t\t\t]\"\r\n\t\t\t@touchmove.stop.prevent\r\n\t\t\t@tap.stop.prevent\r\n\t\t\t:style=\"[style]\"\r\n\t\t>\r\n\t\t\t<view class=\"u-mode-center-box\" @tap.stop.prevent @touchmove.stop.prevent v-if=\"mode == 'center'\" :style=\"[centerStyle]\">\r\n\t\t\t\t<u-icon\r\n\t\t\t\t\t@click=\"close\"\r\n\t\t\t\t\tv-if=\"closeable\"\r\n\t\t\t\t\tclass=\"u-close\"\r\n\t\t\t\t\t:class=\"['u-close--' + closeIconPos]\"\r\n\t\t\t\t\t:name=\"closeIcon\"\r\n\t\t\t\t\t:color=\"closeIconColor\"\r\n\t\t\t\t\t:size=\"closeIconSize\"\r\n\t\t\t\t></u-icon>\r\n\t\t\t\t<scroll-view class=\"u-drawer__scroll-view\" scroll-y=\"true\">\r\n\t\t\t\t\t<slot />\r\n\t\t\t\t</scroll-view>\r\n\t\t\t</view>\r\n\t\t\t<scroll-view class=\"u-drawer__scroll-view\" scroll-y=\"true\" v-else>\r\n\t\t\t\t<slot />\r\n\t\t\t</scroll-view>\r\n\t\t\t<view @tap=\"close\" class=\"u-close\" :class=\"['u-close--' + closeIconPos]\">\r\n\t\t\t\t<u-icon\r\n\t\t\t\t\tv-if=\"mode != 'center' && closeable\"\r\n\t\t\t\t\t:name=\"closeIcon\"\r\n\t\t\t\t\t:color=\"closeIconColor\"\r\n\t\t\t\t\t:size=\"closeIconSize\"\r\n\t\t\t\t></u-icon>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n/**\r\n * popup 弹窗\r\n * @description 弹出层容器,用于展示弹窗、信息提示等内容,支持上、下、左、右和中部弹出。组件只提供容器,内部内容由用户自定义\r\n * @tutorial https://www.uviewui.com/components/popup.html\r\n * @property {String} mode 弹出方向(默认left)\r\n * @property {Boolean} mask 是否显示遮罩(默认true)\r\n * @property {Stringr | Number} length mode=left | 见官网说明(默认auto)\r\n * @property {Boolean} zoom 是否开启缩放动画,只在mode为center时有效(默认true)\r\n * @property {Boolean} safe-area-inset-bottom 是否开启底部安全区适配(默认false)\r\n * @property {Boolean} mask-close-able 点击遮罩是否可以关闭弹出层(默认true)\r\n * @property {Object} custom-style 用户自定义样式\r\n * @property {Stringr | Number} negative-top 中部弹出时,往上偏移的值\r\n * @property {Numberr | String} border-radius 弹窗圆角值(默认0)\r\n * @property {Numberr | String} z-index 弹出内容的z-index值(默认1075)\r\n * @property {Boolean} closeable 是否显示关闭图标(默认false)\r\n * @property {String} close-icon 关闭图标的名称,只能uView的内置图标\r\n * @property {String} close-icon-pos 自定义关闭图标位置(默认top-right)\r\n * @property {String} close-icon-color 关闭图标的颜色(默认#909399)\r\n * @property {Number | String} close-icon-size 关闭图标的大小,单位rpx(默认30)\r\n * @event {Function} open 弹出层打开\r\n * @event {Function} close 弹出层收起\r\n * @example <u-popup v-model=\"show\"><view>出淤泥而不染,濯清涟而不妖</view></u-popup>\r\n */\r\nexport default {\r\n\tname: 'u-popup',\r\n\tprops: {\r\n\t\t/**\r\n\t\t * 显示状态\r\n\t\t */\r\n\t\tshow: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: false\r\n\t\t},\r\n\t\t/**\r\n\t\t * 弹出方向,left|right|top|bottom|center\r\n\t\t */\r\n\t\tmode: {\r\n\t\t\ttype: String,\r\n\t\t\tdefault: 'left'\r\n\t\t},\r\n\t\t/**\r\n\t\t * 是否显示遮罩\r\n\t\t */\r\n\t\tmask: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: true\r\n\t\t},\r\n\t\t// 抽屉的宽度(mode=left|right),或者高度(mode=top|bottom),单位rpx,或者\"auto\"\r\n\t\t// 或者百分比\"50%\",表示由内容撑开高度或者宽度\r\n\t\tlength: {\r\n\t\t\ttype: [Number, String],\r\n\t\t\tdefault: 'auto'\r\n\t\t},\r\n\t\t// 是否开启缩放动画,只在mode=center时有效\r\n\t\tzoom: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: true\r\n\t\t},\r\n\t\t// 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距\r\n\t\tsafeAreaInsetBottom: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: false\r\n\t\t},\r\n\t\t// 是否可以通过点击遮罩进行关闭\r\n\t\tmaskCloseAble: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: true\r\n\t\t},\r\n\t\t// 用户自定义样式\r\n\t\tcustomStyle: {\r\n\t\t\ttype: Object,\r\n\t\t\tdefault() {\r\n\t\t\t\treturn {};\r\n\t\t\t}\r\n\t\t},\r\n\t\tvalue: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: false\r\n\t\t},\r\n\t\t// 此为内部参数,不在文档对外使用,为了解决Picker和keyboard等融合了弹窗的组件\r\n\t\t// 对v-model双向绑定多层调用造成报错不能修改props值的问题\r\n\t\tpopup: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: true\r\n\t\t},\r\n\t\t// 显示显示弹窗的圆角,单位rpx\r\n\t\tborderRadius: {\r\n\t\t\ttype: [Number, String],\r\n\t\t\tdefault: 0\r\n\t\t},\r\n\t\tzIndex: {\r\n\t\t\ttype: [Number, String],\r\n\t\t\tdefault: ''\r\n\t\t},\r\n\t\t// 是否显示关闭图标\r\n\t\tcloseable: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: false\r\n\t\t},\r\n\t\t// 关闭图标的名称,只能uView的内置图标\r\n\t\tcloseIcon: {\r\n\t\t\ttype: String,\r\n\t\t\tdefault: 'close'\r\n\t\t},\r\n\t\t// 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角\r\n\t\tcloseIconPos: {\r\n\t\t\ttype: String,\r\n\t\t\tdefault: 'top-right'\r\n\t\t},\r\n\t\t// 关闭图标的颜色\r\n\t\tcloseIconColor: {\r\n\t\t\ttype: String,\r\n\t\t\tdefault: '#909399'\r\n\t\t},\r\n\t\t// 关闭图标的大小,单位rpx\r\n\t\tcloseIconSize: {\r\n\t\t\ttype: [String, Number],\r\n\t\t\tdefault: '30'\r\n\t\t},\r\n\t\t// 宽度,只对左,右,中部弹出时起作用,单位rpx,或者\"auto\"\r\n\t\t// 或者百分比\"50%\",表示由内容撑开高度或者宽度,优先级高于length参数\r\n\t\twidth: {\r\n\t\t\ttype: String,\r\n\t\t\tdefault: ''\r\n\t\t},\r\n\t\t// 高度,只对上,下,中部弹出时起作用,单位rpx,或者\"auto\"\r\n\t\t// 或者百分比\"50%\",表示由内容撑开高度或者宽度,优先级高于length参数\r\n\t\theight: {\r\n\t\t\ttype: String,\r\n\t\t\tdefault: ''\r\n\t\t},\r\n\t\t// 给一个负的margin-top,往上偏移,避免和键盘重合的情况,仅在mode=center时有效\r\n\t\tnegativeTop: {\r\n\t\t\ttype: [String, Number],\r\n\t\t\tdefault: 0\r\n\t\t},\r\n\t\t// 遮罩的样式,一般用于修改遮罩的透明度\r\n\t\tmaskCustomStyle: {\r\n\t\t\ttype: Object,\r\n\t\t\tdefault() {\r\n\t\t\t\treturn {}\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 遮罩打开或收起的动画过渡时间,单位ms\r\n\t\tduration: {\r\n\t\t\ttype: [String, Number],\r\n\t\t\tdefault: 250\r\n\t\t}\r\n\t},\r\n\tdata() {\r\n\t\treturn {\r\n\t\t\tvisibleSync: false,\r\n\t\t\tshowDrawer: false,\r\n\t\t\ttimer: null,\r\n\t\t\tcloseFromInner: false, // value的值改变,是发生在内部还是外部\r\n\t\t};\r\n\t},\r\n\tcomputed: {\r\n\t\t// 根据mode的位置,设定其弹窗的宽度(mode = left|right),或者高度(mode = top|bottom)\r\n\t\tstyle() {\r\n\t\t\tlet style = {};\r\n\t\t\t// 如果是左边或者上边弹出时,需要给translate设置为负值,用于隐藏\r\n\t\t\tif (this.mode == 'left' || this.mode == 'right') {\r\n\t\t\t\tstyle = {\r\n\t\t\t\t\twidth: this.width ? this.getUnitValue(this.width) : this.getUnitValue(this.length),\r\n\t\t\t\t\theight: '100%',\r\n\t\t\t\t\ttransform: `translate3D(${this.mode == 'left' ? '-100%' : '100%'},0px,0px)`\r\n\t\t\t\t};\r\n\t\t\t} else if (this.mode == 'top' || this.mode == 'bottom') {\r\n\t\t\t\tstyle = {\r\n\t\t\t\t\twidth: '100%',\r\n\t\t\t\t\theight: this.height ? this.getUnitValue(this.height) : this.getUnitValue(this.length),\r\n\t\t\t\t\ttransform: `translate3D(0px,${this.mode == 'top' ? '-100%' : '100%'},0px)`\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\tstyle.zIndex = this.uZindex;\r\n\t\t\t// 如果用户设置了borderRadius值,添加弹窗的圆角\r\n\t\t\tif (this.borderRadius) {\r\n\t\t\t\tswitch (this.mode) {\r\n\t\t\t\t\tcase 'left':\r\n\t\t\t\t\t\tstyle.borderRadius = `0 ${this.borderRadius}rpx ${this.borderRadius}rpx 0`;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'top':\r\n\t\t\t\t\t\tstyle.borderRadius = `0 0 ${this.borderRadius}rpx ${this.borderRadius}rpx`;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'right':\r\n\t\t\t\t\t\tstyle.borderRadius = `${this.borderRadius}rpx 0 0 ${this.borderRadius}rpx`;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'bottom':\r\n\t\t\t\t\t\tstyle.borderRadius = `${this.borderRadius}rpx ${this.borderRadius}rpx 0 0`;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t}\r\n\t\t\t\t// 不加可能圆角无效\r\n\t\t\t\tstyle.overflow = 'hidden';\r\n\t\t\t}\r\n\t\t\tif(this.duration) style.transition = `all ${this.duration / 1000}s linear`;\r\n\t\t\treturn style;\r\n\t\t},\r\n\t\t// 中部弹窗的特有样式\r\n\t\tcenterStyle() {\r\n\t\t\tlet style = {};\r\n\t\t\tstyle.width = this.width ? this.getUnitValue(this.width) : this.getUnitValue(this.length);\r\n\t\t\t// 中部弹出的模式,如果没有设置高度,就用auto值,由内容撑开高度\r\n\t\t\tstyle.height = this.height ? this.getUnitValue(this.height) : 'auto';\r\n\t\t\tstyle.zIndex = this.uZindex;\r\n\t\t\tstyle.marginTop = `-${this.$u.addUnit(this.negativeTop)}`;\r\n\t\t\tif (this.borderRadius) {\r\n\t\t\t\tstyle.borderRadius = `${this.borderRadius}rpx`;\r\n\t\t\t\t// 不加可能圆角无效\r\n\t\t\t\tstyle.overflow = 'hidden';\r\n\t\t\t}\r\n\t\t\treturn style;\r\n\t\t},\r\n\t\t// 计算整理后的z-index值\r\n\t\tuZindex() {\r\n\t\t\treturn this.zIndex ? this.zIndex : this.$u.zIndex.popup;\r\n\t\t}\r\n\t},\r\n\twatch: {\r\n\t\tvalue(val) {\r\n\t\t\tif (val) {\r\n\t\t\t\tthis.open();\r\n\t\t\t} else if(!this.closeFromInner) {\r\n\t\t\t\tthis.close();\r\n\t\t\t}\r\n\t\t\tthis.closeFromInner = false;\r\n\t\t}\r\n\t},\r\n\tmounted() {\r\n\t\t// 组件渲染完成时,检查value是否为true,如果是,弹出popup\r\n\t\tthis.value && this.open();\r\n\t},\r\n methods: {\r\n\t\t// 判断传入的值,是否带有单位,如果没有,就默认用rpx单位\r\n\t\tgetUnitValue(val) {\r\n\t\t\tif(/(%|px|rpx|auto)$/.test(val)) return val;\r\n\t\t\telse return val + 'rpx'\r\n\t\t},\r\n\t\t// 遮罩被点击\r\n\t\tmaskClick() {\r\n\t\t\tthis.close();\r\n\t\t},\r\n\t\tclose() {\r\n\t\t\t// 标记关闭是内部发生的,否则修改了value值,导致watch中对value检测,导致再执行一遍close\r\n\t\t\t// 造成@close事件触发两次\r\n\t\t\tthis.closeFromInner = true;\r\n\t\t\tthis.change('showDrawer', 'visibleSync', false);\r\n\t\t},\r\n\t\t// 中部弹出时,需要.u-drawer-content将居中内容,此元素会铺满屏幕,点击需要关闭弹窗\r\n\t\t// 让其只在mode=center时起作用\r\n\t\tmodeCenterClose(mode) {\r\n\t\t\tif (mode != 'center' || !this.maskCloseAble) return;\r\n\t\t\tthis.close();\r\n\t\t},\r\n\t\topen() {\r\n\t\t\tthis.change('visibleSync', 'showDrawer', true);\r\n\t\t},\r\n\t\t// 此处的原理是,关闭时先通过动画隐藏弹窗和遮罩,再移除整个组件\r\n\t\t// 打开时,先渲染组件,延时一定时间再让遮罩和弹窗的动画起作用\r\n\t\tchange(param1, param2, status) {\r\n\t\t\t// 如果this.popup为false,意味着为picker,actionsheet等组件调用了popup组件\r\n\t\t\tif (this.popup == true) {\r\n\t\t\t\tthis.$emit('input', status);\r\n\t\t\t}\r\n\t\t\tthis[param1] = status;\r\n\t\t\tif(status) {\r\n\t\t\t\t// #ifdef H5 || MP\r\n\t\t\t\tthis.timer = setTimeout(() => {\r\n\t\t\t\t\tthis[param2] = status;\r\n\t\t\t\t\tthis.$emit(status ? 'open' : 'close');\r\n\t\t\t\t}, 50);\r\n\t\t\t\t// #endif\r\n\t\t\t\t// #ifndef H5 || MP\r\n\t\t\t\tthis.$nextTick(() => {\r\n\t\t\t\t\tthis[param2] = status;\r\n\t\t\t\t\tthis.$emit(status ? 'open' : 'close');\r\n\t\t\t\t})\r\n\t\t\t\t// #endif\r\n\t\t\t} else {\r\n\t\t\t\tthis.timer = setTimeout(() => {\r\n\t\t\t\t\tthis[param2] = status;\r\n\t\t\t\t\tthis.$emit(status ? 'open' : 'close');\r\n\t\t\t\t}, this.duration);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n@import \"../../libs/css/style.components.scss\";\r\n\r\n.u-drawer {\r\n\t/* #ifndef APP-NVUE */\r\n\tdisplay: block;\r\n\t/* #endif */\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n}\r\n\r\n.u-drawer-content {\r\n\t/* #ifndef APP-NVUE */\r\n\tdisplay: block;\r\n\t/* #endif */\r\n\tposition: absolute;\r\n\tz-index: 1003;\r\n\ttransition: all 0.25s linear;\r\n}\r\n\r\n.u-drawer__scroll-view {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.u-drawer-left {\r\n\ttop: 0;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\tbackground-color: #ffffff;\r\n}\r\n\r\n.u-drawer-right {\r\n\tright: 0;\r\n\ttop: 0;\r\n\tbottom: 0;\r\n\tbackground-color: #ffffff;\r\n}\r\n\r\n.u-drawer-top {\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tright: 0;\r\n\tbackground-color: #ffffff;\r\n}\r\n\r\n.u-drawer-bottom {\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\tright: 0;\r\n\tbackground-color: #ffffff;\r\n}\r\n\r\n.u-drawer-center {\r\n\t@include vue-flex;\r\n\tflex-direction: column;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\tright: 0;\r\n\ttop: 0;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\topacity: 0;\r\n\tz-index: 99999;\r\n}\r\n\r\n.u-mode-center-box {\r\n\tmin-width: 100rpx;\r\n\tmin-height: 100rpx;\r\n\t/* #ifndef APP-NVUE */\r\n\tdisplay: block;\r\n\t/* #endif */\r\n\tposition: relative;\r\n\tbackground-color: #ffffff;\r\n}\r\n\r\n.u-drawer-content-visible.u-drawer-center {\r\n\ttransform: scale(1);\r\n\topacity: 1;\r\n}\r\n\r\n.u-animation-zoom {\r\n\ttransform: scale(1.15);\r\n}\r\n\r\n.u-drawer-content-visible {\r\n\ttransform: translate3D(0px, 0px, 0px) !important;\r\n}\r\n\r\n.u-close {\r\n\tposition: absolute;\r\n\tz-index: 3;\r\n}\r\n\r\n.u-close--top-left {\r\n\ttop: 30rpx;\r\n\tleft: 30rpx;\r\n}\r\n\r\n.u-close--top-right {\r\n\ttop: 30rpx;\r\n\tright: 30rpx;\r\n}\r\n\r\n.u-close--bottom-left {\r\n\tbottom: 30rpx;\r\n\tleft: 30rpx;\r\n}\r\n\r\n.u-close--bottom-right {\r\n\tright: 30rpx;\r\n\tbottom: 30rpx;\r\n}\r\n</style>\r\n","import mod from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-popup.vue?vue&type=style&index=0&id=17becaea&scoped=true&lang=scss&\"; export default mod; export * from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-popup.vue?vue&type=style&index=0&id=17becaea&scoped=true&lang=scss&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1631761633527\n var cssReload = require(\"E:/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""}