1 |
- {"version":3,"sources":["webpack:///D:/2022/9/sx/components/uni-popup/uni-popup.vue?80be","webpack:///D:/2022/9/sx/components/uni-popup/uni-popup.vue?a17c","webpack:///D:/2022/9/sx/components/uni-popup/uni-popup.vue?01b3","webpack:///D:/2022/9/sx/components/uni-popup/uni-popup.vue?f84e","uni-app:///components/uni-popup/uni-popup.vue","webpack:///D:/2022/9/sx/components/uni-popup/uni-popup.vue?e47c","webpack:///D:/2022/9/sx/components/uni-popup/uni-popup.vue?64e2"],"names":["name","components","uniTransition","props","animation","type","default","maskClick","data","duration","ani","showPopup","showTrans","maskClass","transClass","watch","handler","immediate","created","methods","clear","e","open","clearTimeout","show","close","onTap"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkI;AAClI;AAC6D;AACL;AACsC;;;AAG9F;AACqK;AACrK,gBAAgB,+KAAU;AAC1B,EAAE,+EAAM;AACR,EAAE,gGAAM;AACR,EAAE,yGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,oGAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA,aAAa,4NAEN;AACP,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACjCA;AAAA;AAAA;AAAA;AAAmmB,CAAgB,6nBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;ACcvnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXA,eAaA;EACAA;EACAC;IACAC;EACA;EACAC;IACA;IACAC;MACAC;MACAC;IACA;IACA;IACAD;MACAA;MACAC;IACA;IACA;IACAC;MACAF;MACAC;IACA;EACA;EACAE;IACA;MACAC;MACAC;MACAC;MACAC;MACAC;QACA;QACA;QACA;QACA;QACA;QACA;MACA;MACAC;QACA;QACA;QACA;MACA;IACA;EACA;EACAC;IACAV;MACAW;QACA;UACA;YACA;YACA;cACA;cACA;cACA;YACA;YACA;UACA;YACA;YACA;cACA;cACA;cACA;cACA;YACA;YACA;UACA;YACA;YACA;cACA;cAEA;cACA;cAEA;cACA;cACA;cACA;cACA;cACA;YACA;YAEA;QAAA;MAEA;MACAC;IACA;EACA;EACAC;IACA;MACA;IACA;MACA;IACA;EACA;EACAC;IACAC;MACA;MACAC;IACA;IACAC;MAAA;MACA;MACA;QACAC;QACA;UACA;QACA;MACA;MACA;QACAC;MACA;IACA;IACAC;MAAA;MACA;MACA;QACAF;QACA;UACA;YACAC;UACA;UACA;QACA;MACA;IACA;IACAE;MACA;MACA;IACA;EACA;AACA;AAAA,2B;;;;;;;;;;;;AC1JA;AAAA;AAAA;AAAA;AAAsqC,CAAgB,4oCAAG,EAAC,C;;;;;;;;;;;ACA1rC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"components/uni-popup/uni-popup.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./uni-popup.vue?vue&type=template&id=7da806a4&scoped=true&\"\nvar renderjs\nimport script from \"./uni-popup.vue?vue&type=script&lang=js&\"\nexport * from \"./uni-popup.vue?vue&type=script&lang=js&\"\nimport style0 from \"./uni-popup.vue?vue&type=style&index=0&id=7da806a4&lang=scss&scoped=true&\"\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 \"7da806a4\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"components/uni-popup/uni-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--17-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!./uni-popup.vue?vue&type=template&id=7da806a4&scoped=true&\"","var components\ntry {\n components = {\n uniTransition: function () {\n return import(\n /* webpackChunkName: \"components/uni-transition/uni-transition\" */ \"@/components/uni-transition/uni-transition.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}\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--13-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!./uni-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--13-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!./uni-popup.vue?vue&type=script&lang=js&\"","<template>\n\t<view v-if=\"showPopup\" class=\"uni-popup\" @touchmove.stop.prevent=\"clear\">\n\t\t<uni-transition :mode-class=\"['fade']\" :styles=\"maskClass\" :duration=\"duration\" :show=\"showTrans\" @click=\"onTap\" />\n\t\t<uni-transition :mode-class=\"ani\" :styles=\"transClass\" :duration=\"duration\" :show=\"showTrans\" @click=\"onTap\">\n\t\t\t<view class=\"uni-popup__wrapper-box\" @click.stop=\"clear\">\n\t\t\t\t<slot />\n\t\t\t</view>\n\t\t</uni-transition>\n\t</view>\n</template>\n\n<script>\n\timport uniTransition from '../uni-transition/uni-transition.vue'\n\n\t/**\n\t * PopUp 弹出层\n\t * @description 弹出层组件,为了解决遮罩弹层的问题\n\t * @tutorial https://ext.dcloud.net.cn/plugin?id=329\n\t * @property {String} type = [top|center|bottom] 弹出方式\n\t * \t@value top 顶部弹出\n\t * \t@value center 中间弹出\n\t * \t@value bottom 底部弹出\n\t * @property {Boolean} animation = [ture|false] 是否开启动画\n\t * @property {Boolean} maskClick = [ture|false] 蒙版点击是否关闭弹窗\n\t * @event {Function} change 打开关闭弹窗触发,e={show: false}\n\t */\n\n\texport default {\n\t\tname: 'UniPopup',\n\t\tcomponents: {\n\t\t\tuniTransition\n\t\t},\n\t\tprops: {\n\t\t\t// 开启动画\n\t\t\tanimation: {\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: true\n\t\t\t},\n\t\t\t// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层\n\t\t\ttype: {\n\t\t\t\ttype: String,\n\t\t\t\tdefault: 'center'\n\t\t\t},\n\t\t\t// maskClick\n\t\t\tmaskClick: {\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: true\n\t\t\t}\n\t\t},\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tduration: 300,\n\t\t\t\tani: [],\n\t\t\t\tshowPopup: false,\n\t\t\t\tshowTrans: false,\n\t\t\t\tmaskClass: {\n\t\t\t\t\t'position': 'fixed',\n\t\t\t\t\t'bottom': 0,\n\t\t\t\t\t'top': 0,\n\t\t\t\t\t'left': 0,\n\t\t\t\t\t'right': 0,\n\t\t\t\t\t'backgroundColor': 'rgba(0, 0, 0, 0.4)'\n\t\t\t\t},\n\t\t\t\ttransClass: {\n\t\t\t\t\t'position': 'fixed',\n\t\t\t\t\t'left': 0,\n\t\t\t\t\t'right': 0,\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\twatch: {\n\t\t\ttype: {\n\t\t\t\thandler: function(newVal) {\n\t\t\t\t\tswitch (this.type) {\n\t\t\t\t\t\tcase 'top':\n\t\t\t\t\t\t\tthis.ani = ['slide-top']\n\t\t\t\t\t\t\tthis.transClass = {\n\t\t\t\t\t\t\t\t'position': 'fixed',\n\t\t\t\t\t\t\t\t'left': 0,\n\t\t\t\t\t\t\t\t'right': 0,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\tcase 'bottom':\n\t\t\t\t\t\t\tthis.ani = ['slide-bottom']\n\t\t\t\t\t\t\tthis.transClass = {\n\t\t\t\t\t\t\t\t'position': 'fixed',\n\t\t\t\t\t\t\t\t'left': 0,\n\t\t\t\t\t\t\t\t'right': 0,\n\t\t\t\t\t\t\t\t'bottom': 0\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\tcase 'center':\n\t\t\t\t\t\t\tthis.ani = ['zoom-out', 'fade']\n\t\t\t\t\t\t\tthis.transClass = {\n\t\t\t\t\t\t\t\t'position': 'fixed',\n\t\t\t\t\t\t\t\t/* #ifndef APP-NVUE */\n\t\t\t\t\t\t\t\t'display': 'flex',\n\t\t\t\t\t\t\t\t'flexDirection': 'column',\n\t\t\t\t\t\t\t\t/* #endif */\n\t\t\t\t\t\t\t\t'bottom': 0,\n\t\t\t\t\t\t\t\t'left': 0,\n\t\t\t\t\t\t\t\t'right': 0,\n\t\t\t\t\t\t\t\t'top': 0,\n\t\t\t\t\t\t\t\t'justifyContent': 'center',\n\t\t\t\t\t\t\t\t'alignItems': 'center'\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\timmediate: true\n\t\t\t}\n\t\t},\n\t\tcreated() {\n\t\t\tif (this.animation) {\n\t\t\t\tthis.duration = 300\n\t\t\t} else {\n\t\t\t\tthis.duration = 0\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tclear(e) {\n\t\t\t\t// TODO nvue 取消冒泡\n\t\t\t\te.stopPropagation()\n\t\t\t},\n\t\t\topen() {\n\t\t\t\tthis.showPopup = true\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tclearTimeout(this.timer)\n\t\t\t\t\tthis.timer = setTimeout(() => {\n\t\t\t\t\t\tthis.showTrans = true\n\t\t\t\t\t}, 50);\n\t\t\t\t})\n\t\t\t\tthis.$emit('change', {\n\t\t\t\t\tshow: true\n\t\t\t\t})\n\t\t\t},\n\t\t\tclose(type) {\n\t\t\t\tthis.showTrans = false\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tclearTimeout(this.timer)\n\t\t\t\t\tthis.timer = setTimeout(() => {\n\t\t\t\t\t\tthis.$emit('change', {\n\t\t\t\t\t\t\tshow: false\n\t\t\t\t\t\t})\n\t\t\t\t\t\tthis.showPopup = false\n\t\t\t\t\t}, 300)\n\t\t\t\t})\n\t\t\t},\n\t\t\tonTap() {\n\t\t\t\tif (!this.maskClick) return\n\t\t\t\tthis.close()\n\t\t\t}\n\t\t}\n\t}\n</script>\n<style lang=\"scss\" scoped>\n\t.uni-popup {\n\t\tposition: fixed;\n\t\t/* #ifdef H5 */\n\t\ttop: var(--window-top);\n\t\t/* #endif */\n\t\t/* #ifndef H5 */\n\t\ttop: 0;\n\t\t/* #endif */\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\t/* #ifndef APP-NVUE */\n\t\tz-index: 99;\n\t\t/* #endif */\n\t}\n\n\t.uni-popup__mask {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbackground-color: $uni-bg-color-mask;\n\t\topacity: 0;\n\t}\n\n\t.mask-ani {\n\t\ttransition-property: opacity;\n\t\ttransition-duration: 0.2s;\n\t}\n\n\t.uni-top-mask {\n\t\topacity: 1;\n\t}\n\n\t.uni-bottom-mask {\n\t\topacity: 1;\n\t}\n\n\t.uni-center-mask {\n\t\topacity: 1;\n\t}\n\n\t.uni-popup__wrapper {\n\t\t/* #ifndef APP-NVUE */\n\t\tdisplay: block;\n\t\t/* #endif */\n\t\tposition: absolute;\n\t}\n\n\t.top {\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\ttransform: translateY(-500px);\n\t}\n\n\t.bottom {\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\ttransform: translateY(500px);\n\t}\n\n\t.center {\n\t\t/* #ifndef APP-NVUE */\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\t/* #endif */\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\ttop: 0;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\ttransform: scale(1.2);\n\t\topacity: 0;\n\t}\n\n\t.uni-popup__wrapper-box {\n\t\t/* #ifndef APP-NVUE */\n\t\tdisplay: block;\n\t\t/* #endif */\n\t\tposition: relative;\n\t}\n\n\t.content-ani {\n\t\t// transition: transform 0.3s;\n\t\ttransition-property: transform, opacity;\n\t\ttransition-duration: 0.2s;\n\t}\n\n\n\t.uni-top-content {\n\t\ttransform: translateY(0);\n\t}\n\n\t.uni-bottom-content {\n\t\ttransform: translateY(0);\n\t}\n\n\t.uni-center-content {\n\t\ttransform: scale(1);\n\t\topacity: 1;\n\t}\n</style>\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\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\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!./uni-popup.vue?vue&type=style&index=0&id=7da806a4&lang=scss&scoped=true&\"; 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\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\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!./uni-popup.vue?vue&type=style&index=0&id=7da806a4&lang=scss&scoped=true&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1681462082169\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":""}
|