Files
t/unpackage/dist/build/mp-weixin/components/hqs-popup/hqs-popup.js
T
2025-06-13 20:48:15 +08:00

11 lines
3.7 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/hqs-popup/hqs-popup"],{"049f":function(t,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e={components:{UniPopup:function(){o.e("components/hqs-popup/uni-popup").then(function(){return resolve(o("a8cf"))}.bind(null,o)).catch(o.oe)}},props:{value:Boolean,from:{type:String,default:"bottom"},round:{type:Number,default:10},width:{type:String,default:"60vw"},height:{type:String,default:"50vh"},showHeader:{type:Boolean,default:!0},title:String,showBack:Boolean,showClose:{type:[Boolean,String],default:!0},maskClick:{type:Boolean,default:!0}},data:function(){return{scrollTop:0,panStyle:"",showPopup:!1}},computed:{closeIcon:function(){return"string"==typeof this.showClose&&this.showClose},isVertical:function(){return["bottom","top"].includes(this.from)},conStyle:function(){var t=this.panStyle||"",n=this.round;return n>0&&(n+="px",n="bottom"==this.from?[n,n,0,0]:"left"==this.from?[0,n,n,0]:"right"==this.from?[n,0,0,n]:[0,0,n,n],t+="border-radius: ".concat(n.join(" "),";")),t}},watch:{value:function(t){t!=this.showPopup&&(t?this.open():this.close())},showPopup:function(t){this.$emit("input",t)}},mounted:function(){this.value&&this.open()},methods:{onScroll:function(t){this.scrollTop=t.detail.scrollTop},onTouch:function(t){var n=this,o=t.changedTouches[0]||t,e=o.pageX,i=o.pageY;if(["touchstart","mousedown"].includes(t.type))this.startX=e,this.startY=i,this.startTime=t.timeStamp;else{if(!this.startTime)return;var s=this.isVertical?"Y":"X",u=i-this.startY;"left"==this.from?u=this.startX-e:"right"==this.from?u=e-this.startX:"top"==this.from&&(u=-u),this.maskClick||(u/=3);var r=t.timeStamp-this.startTime,a=u/r;if(["touchend","mouseup"].includes(t.type))return this.panStyle&&(this.maskClick&&(u>120||a>.25)?this.close():this.panStyle="transform: translate".concat(s,"(0); transition: all ease 200ms;"),setTimeout((function(){n.panStyle=""}),300)),void(this.startTime=0);u>0&&("left"!=this.from&&"top"!=this.from||(u*=-1),this.panStyle="transform: translate".concat(s,"(").concat(u,"px); transition: none;"))}},onChange:function(t){var n=t.show;this.showPopup=n},open:function(){this.$refs.popup.open(),this.showPopup=!0},close:function(){this.$refs.popup.close(),this.showPopup=!1},onBack:function(){this.$emit("back")}}};n.default=e},"15c5":function(t,n,o){"use strict";o.r(n);var e=o("f740"),i=o("fea3");for(var s in i)["default"].indexOf(s)<0&&function(t){o.d(n,t,(function(){return i[t]}))}(s);o("c3c4");var u=o("828b"),r=Object(u["a"])(i["default"],e["b"],e["c"],!1,null,null,null,!1,e["a"],void 0);n["default"]=r.exports},6492:function(t,n,o){},c3c4:function(t,n,o){"use strict";var e=o("6492"),i=o.n(e);i.a},f740:function(t,n,o){"use strict";o.d(n,"b",(function(){return i})),o.d(n,"c",(function(){return s})),o.d(n,"a",(function(){return e}));var e={uniPopup:function(){return o.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(o.bind(null,"a1d3"))},uIcon:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(o.bind(null,"3094"))}},i=function(){var t=this.$createElement;this._self._c},s=[]},fea3:function(t,n,o){"use strict";o.r(n);var e=o("049f"),i=o.n(e);for(var s in e)["default"].indexOf(s)<0&&function(t){o.d(n,t,(function(){return e[t]}))}(s);n["default"]=i.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/hqs-popup/hqs-popup-create-component',
{
'components/hqs-popup/hqs-popup-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('df3c')['createComponent'](__webpack_require__("15c5"))
})
},
[['components/hqs-popup/hqs-popup-create-component']]
]);