u-popup.js 6.1 KB

1234567891011
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["node-modules/uview-ui/components/u-popup/u-popup"],{481:function(e,t,n){"use strict";n.r(t);var o=n(482),i=n(484);for(var r in i)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(r);n(486);var s,u=n(32),a=Object(u["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,"52d4ddd1",null,!1,o["components"],s);a.options.__file="node_modules/uview-ui/components/u-popup/u-popup.vue",t["default"]=a.exports},482:function(e,t,n){"use strict";n.r(t);var o=n(483);n.d(t,"render",(function(){return o["render"]})),n.d(t,"staticRenderFns",(function(){return o["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return o["recyclableRender"]})),n.d(t,"components",(function(){return o["components"]}))},483:function(e,t,n){"use strict";var o;n.r(t),n.d(t,"render",(function(){return i})),n.d(t,"staticRenderFns",(function(){return s})),n.d(t,"recyclableRender",(function(){return r})),n.d(t,"components",(function(){return o}));try{o={uMask:function(){return n.e("node-modules/uview-ui/components/u-mask/u-mask").then(n.bind(null,539))},uIcon:function(){return n.e("node-modules/uview-ui/components/u-icon/u-icon").then(n.bind(null,518))}}}catch(u){if(-1===u.message.indexOf("Cannot find module")||-1===u.message.indexOf(".vue"))throw u;console.error(u.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var i=function(){var e=this,t=e.$createElement,n=(e._self._c,e.visibleSync?e.__get_style([e.customStyle,{zIndex:e.uZindex-1}]):null),o=e.visibleSync?e.__get_style([e.style]):null,i=e.visibleSync&&"center"==e.mode?e.__get_style([e.centerStyle]):null;e.$mp.data=Object.assign({},{$root:{s0:n,s1:o,s2:i}})},r=!1,s=[];i._withStripped=!0},484:function(e,t,n){"use strict";n.r(t);var o=n(485),i=n.n(o);for(var r in o)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(r);t["default"]=i.a},485:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={name:"u-popup",props:{show:{type:Boolean,default:!1},mode:{type:String,default:"left"},mask:{type:Boolean,default:!0},length:{type:[Number,String],default:"auto"},zoom:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!1},maskCloseAble:{type:Boolean,default:!0},customStyle:{type:Object,default:function(){return{}}},value:{type:Boolean,default:!1},popup:{type:Boolean,default:!0},borderRadius:{type:[Number,String],default:0},zIndex:{type:[Number,String],default:""},closeable:{type:Boolean,default:!1},closeIcon:{type:String,default:"close"},closeIconPos:{type:String,default:"top-right"},closeIconColor:{type:String,default:"#909399"},closeIconSize:{type:[String,Number],default:"30"},width:{type:String,default:""},height:{type:String,default:""},negativeTop:{type:[String,Number],default:0},maskCustomStyle:{type:Object,default:function(){return{}}},duration:{type:[String,Number],default:250}},data:function(){return{visibleSync:!1,showDrawer:!1,timer:null,closeFromInner:!1}},computed:{style:function(){var e={};if("left"==this.mode||"right"==this.mode?e={width:this.width?this.getUnitValue(this.width):this.getUnitValue(this.length),height:"100%",transform:"translate3D(".concat("left"==this.mode?"-100%":"100%",",0px,0px)")}:"top"!=this.mode&&"bottom"!=this.mode||(e={width:"100%",height:this.height?this.getUnitValue(this.height):this.getUnitValue(this.length),transform:"translate3D(0px,".concat("top"==this.mode?"-100%":"100%",",0px)")}),e.zIndex=this.uZindex,this.borderRadius){switch(this.mode){case"left":e.borderRadius="0 ".concat(this.borderRadius,"rpx ").concat(this.borderRadius,"rpx 0");break;case"top":e.borderRadius="0 0 ".concat(this.borderRadius,"rpx ").concat(this.borderRadius,"rpx");break;case"right":e.borderRadius="".concat(this.borderRadius,"rpx 0 0 ").concat(this.borderRadius,"rpx");break;case"bottom":e.borderRadius="".concat(this.borderRadius,"rpx ").concat(this.borderRadius,"rpx 0 0");break;default:}e.overflow="hidden"}return this.duration&&(e.transition="all ".concat(this.duration/1e3,"s linear")),e},centerStyle:function(){var e={};return e.width=this.width?this.getUnitValue(this.width):this.getUnitValue(this.length),e.height=this.height?this.getUnitValue(this.height):"auto",e.zIndex=this.uZindex,e.marginTop="-".concat(this.$u.addUnit(this.negativeTop)),this.borderRadius&&(e.borderRadius="".concat(this.borderRadius,"rpx"),e.overflow="hidden"),e},uZindex:function(){return this.zIndex?this.zIndex:this.$u.zIndex.popup}},watch:{value:function(e){e?this.open():this.closeFromInner||this.close(),this.closeFromInner=!1}},mounted:function(){this.value&&this.open()},methods:{getUnitValue:function(e){return/(%|px|rpx|auto)$/.test(e)?e:e+"rpx"},maskClick:function(){this.close()},close:function(){this.closeFromInner=!0,this.change("showDrawer","visibleSync",!1)},modeCenterClose:function(e){"center"==e&&this.maskCloseAble&&this.close()},open:function(){this.change("visibleSync","showDrawer",!0)},change:function(e,t,n){var o=this;1==this.popup&&this.$emit("input",n),this[e]=n,this.timer=n?setTimeout((function(){o[t]=n,o.$emit(n?"open":"close")}),50):setTimeout((function(){o[t]=n,o.$emit(n?"open":"close")}),this.duration)}}};t.default=o},486:function(e,t,n){"use strict";n.r(t);var o=n(487),i=n.n(o);for(var r in o)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(r);t["default"]=i.a},487:function(e,t,n){}}]);
  2. //# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-ui/components/u-popup/u-popup.js.map
  3. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  4. 'node-modules/uview-ui/components/u-popup/u-popup-create-component',
  5. {
  6. 'node-modules/uview-ui/components/u-popup/u-popup-create-component':(function(module, exports, __webpack_require__){
  7. __webpack_require__('2')['createComponent'](__webpack_require__(481))
  8. })
  9. },
  10. [['node-modules/uview-ui/components/u-popup/u-popup-create-component']]
  11. ]);