uni-popup.js.map 4.3 KB

1
  1. {"version":3,"file":"uni-popup.js","sources":["components/uni-popup/uni-popup.vue","../../../Program Files/HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDovcHJvamVjdC_kuqTlibLlupMvamdrLXByb2plY3QvY29tcG9uZW50cy91bmktcG9wdXAvdW5pLXBvcHVwLnZ1ZQ"],"sourcesContent":["<template>\n\t<view>\n\t\t<view class=\"uni-mask\" v-show=\"show\" :style=\"{ top: offsetTop + 'px' }\" @click=\"hide\" @touchmove.stop.prevent=\"moveHandle\"></view>\n\t\t<view class=\"uni-popup\" :class=\"'uni-popup-' + position + ' ' + 'uni-popup-' + mode\" v-show=\"show\">\n\t\t\t{{ msg }}\n\t\t\t<slot></slot>\n\t\t\t<view v-if=\"position === 'middle' && mode === 'insert'\" class=\" uni-icon uni-icon-close\" :class=\"{\n\t\t\t\t\t'uni-close-bottom': buttonMode === 'bottom',\n\t\t\t\t\t'uni-close-right': buttonMode === 'right'\n\t\t\t\t}\" @click=\"closeMask\"></view>\n\t\t</view>\n\t</view>\n</template>\n\n<script>\n\texport default {\n\t\tname: 'uni-popup',\n\t\tprops: {\n\t\t\t/*页面显示*/\n\t\t\tshow: {type: Boolean,default: false},\n\t\t\t/*对齐方式*/\n\t\t\tposition: {type: String,\n\t\t\t\t//top - 顶部, middle - 居中, bottom - 底部\n\t\t\t\tdefault: 'middle'},\n\t\t\t/* 显示模式*/\n\t\t\tmode: {type: String,default: 'insert'},\n\t\t\t/*额外信息*/\n\t\t\tmsg: {type: String,default: ''},\n\t\t\t/*h5遮罩是否到顶*/\n\t\t\th5Top: {type: Boolean,default: false},\n\t\t\tbuttonMode: {type: String,default: 'bottom'}\n\t\t},\n\t\tdata() {\n\t\t\treturn {offsetTop: 0};\n\t\t},\n\t\twatch: {\n\t\t\th5Top(newVal) {\n\t\t\t\tif (newVal) {this.offsetTop = 44;} else {this.offsetTop = 0;}\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\thide() {\n\t\t\t\tif (this.mode === 'insert' && this.position === 'middle') return;\n\t\t\t\tthis.$emit('hidePopup');\n\t\t\t},\n\t\t\tcloseMask() {\n\t\t\t\tif (this.mode === 'insert') {\n\t\t\t\t\tthis.$emit('hidePopup');\n\t\t\t\t}\n\t\t\t},\n\t\t\tmoveHandle() {}\n\t\t},\n\t\tcreated() {\n\t\t\tlet offsetTop = 0;\n\t\t\t//#ifdef H5\n\t\t\tif (!this.h5Top) {\n\t\t\t\toffsetTop = 44;\n\t\t\t} else {\n\t\t\t\toffsetTop = 0;\n\t\t\t}\n\t\t\t//#endif\n\t\t\tthis.offsetTop = offsetTop;\n\t\t}\n\t};\n</script>\n<style>\n\t.uni-mask {height:100vh; position: fixed;z-index: 998;top: 0;right: 0;bottom: 0;left: 0;background-color: rgba(0, 0, 0, 0.3);}\n\t.uni-popup {position: absolute;z-index: 999;background-color: #ffffff;}\n\t.uni-popup-middle {display: flex;flex-direction: column;align-items: center;justify-content: center;top: 50%;left: 50%;transform: translate(-50%, -50%);}\n\t.uni-popup-middle.uni-popup-insert {min-width: 380upx;min-height: 380upx;max-width: 100%;max-height: 80%;transform: translate(-50%, -65%);background: none;box-shadow: none;}\n\t.uni-popup-middle.uni-popup-fixed {width: 68%;padding: 0 20upx;border-radius: 6px;}\n\t.uni-close-bottom,\n\t.uni-close-right {position: absolute;bottom: -180upx;text-align: center;border-radius: 50%;color: #f5f5f5;font-size: 60upx;font-weight: bold;opacity: 0.8;z-index: -1;}\n\t.uni-close-right {right: -60upx;top: -80upx;}\n\t.uni-close-bottom:after {content: '';position: absolute;width: 0px;border: 1px #f5f5f5 solid;top: -200upx;bottom: 56upx;left: 50%;transform: translate(-50%, -0%);opacity: 0.8;}\n\t.uni-popup-top {top: 0;left: 0;width: 100%;height: 100upx;line-height: 100upx;text-align: center;}\n\t.uni-popup-bottom {left: 0;bottom: 0;width: 100%;min-height: 100upx;line-height: 100upx;text-align: center;}\n</style>","import Component from 'D:/project/交割库/jgk-project/components/uni-popup/uni-popup.vue'\nwx.createComponent(Component)"],"names":[],"mappings":";;AAeC,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EACN,OAAO;AAAA;AAAA,IAEN,MAAM,EAAC,MAAM,SAAQ,SAAS,MAAK;AAAA;AAAA,IAEnC,UAAU;AAAA,MAAC,MAAM;AAAA;AAAA,MAEhB,SAAS;AAAA,IAAQ;AAAA;AAAA,IAElB,MAAM,EAAC,MAAM,QAAO,SAAS,SAAQ;AAAA;AAAA,IAErC,KAAK,EAAC,MAAM,QAAO,SAAS,GAAE;AAAA;AAAA,IAE9B,OAAO,EAAC,MAAM,SAAQ,SAAS,MAAK;AAAA,IACpC,YAAY,EAAC,MAAM,QAAO,SAAS,SAAQ;AAAA,EAC3C;AAAA,EACD,OAAO;AACN,WAAO,EAAC,WAAW,EAAC;AAAA,EACpB;AAAA,EACD,OAAO;AAAA,IACN,MAAM,QAAQ;AACb,UAAI,QAAQ;AAAC,aAAK,YAAY;AAAA,MAAG,OAAO;AAAC,aAAK,YAAY;AAAA,MAAE;AAAA,IAC7D;AAAA,EACA;AAAA,EACD,SAAS;AAAA,IACR,OAAO;AACN,UAAI,KAAK,SAAS,YAAY,KAAK,aAAa;AAAU;AAC1D,WAAK,MAAM,WAAW;AAAA,IACtB;AAAA,IACD,YAAY;AACX,UAAI,KAAK,SAAS,UAAU;AAC3B,aAAK,MAAM,WAAW;AAAA,MACvB;AAAA,IACA;AAAA,IACD,aAAa;AAAA,IAAC;AAAA,EACd;AAAA,EACD,UAAU;AACT,QAAI,YAAY;AAQhB,SAAK,YAAY;AAAA,EAClB;;;;;;;;;;;;;;;;;;;;AC7DF,GAAG,gBAAgB,SAAS;"}