12345678910 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uview-ui/components/u-toast/u-toast"],{"36bd":function(n,t,e){"use strict";e.r(t);var i=e("aa59"),o=e("9be9");for(var r in o)["default"].indexOf(r)<0&&function(n){e.d(t,n,(function(){return o[n]}))}(r);e("8ee9");var u,c=e("f0c5"),a=Object(c["a"])(o["default"],i["b"],i["c"],!1,null,"009bf3c0",null,!1,i["a"],u);t["default"]=a.exports},8236:function(n,t,e){},"8ee9":function(n,t,e){"use strict";var i=e("8236"),o=e.n(i);o.a},"9be9":function(n,t,e){"use strict";e.r(t);var i=e("a84a"),o=e.n(i);for(var r in i)["default"].indexOf(r)<0&&function(n){e.d(t,n,(function(){return i[n]}))}(r);t["default"]=o.a},a84a:function(n,t,e){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={name:"u-toast",mixins:[n.$u.mpMixin,n.$u.mixin],data:function(){return{isShow:!1,timer:null,config:{message:"",type:"",duration:2e3,icon:!0,position:"center",complete:null,overlay:!1,loading:!1},tmpConfig:{}}},computed:{iconName:function(){return this.tmpConfig.icon&&"none"!=this.tmpConfig.icon&&["error","warning","success","primary"].includes(this.tmpConfig.type)?n.$u.type2icon(this.tmpConfig.type):""},overlayStyle:function(){var n={justifyContent:"center",alignItems:"center",display:"flex",backgroundColor:"rgba(0, 0, 0, 0)"};return n},iconStyle:function(){var n={marginRight:"4px"};return n},loadingIconColor:function(){var t="rgb(255, 255, 255)";return["error","warning","success","primary"].includes(this.tmpConfig.type)&&(t=n.$u.hexToRgb(n.$u.color[this.tmpConfig.type])),t},contentStyle:function(){var t=n.$u.sys().windowHeight,e={},i=0;return"top"===this.tmpConfig.position?i=.25*-t:"bottom"===this.tmpConfig.position&&(i=.25*t),e.transform="translateY(".concat(i,"px)"),e}},created:function(){var n=this;["primary","success","error","warning","default","loading"].map((function(t){n[t]=function(e){return n.show({type:t,message:e})}}))},methods:{show:function(t){var e=this;this.tmpConfig=n.$u.deepMerge(this.config,t),this.clearTimer(),this.isShow=!0,this.timer=setTimeout((function(){e.clearTimer(),"function"===typeof e.tmpConfig.complete&&e.tmpConfig.complete()}),this.tmpConfig.duration)},hide:function(){this.clearTimer()},clearTimer:function(){this.isShow=!1,clearTimeout(this.timer),this.timer=null}},beforeDestroy:function(){this.clearTimer()}};t.default=e}).call(this,e("543d")["default"])},aa59:function(n,t,e){"use strict";e.d(t,"b",(function(){return o})),e.d(t,"c",(function(){return r})),e.d(t,"a",(function(){return i}));var i={uOverlay:function(){return Promise.all([e.e("common/vendor"),e.e("uview-ui/components/u-overlay/u-overlay")]).then(e.bind(null,"5b7f"))},uLoadingIcon:function(){return Promise.all([e.e("common/vendor"),e.e("uview-ui/components/u-loading-icon/u-loading-icon")]).then(e.bind(null,"7d3d"))},uIcon:function(){return Promise.all([e.e("common/vendor"),e.e("uview-ui/components/u-icon/u-icon")]).then(e.bind(null,"01eb"))},uGap:function(){return Promise.all([e.e("common/vendor"),e.e("uview-ui/components/u-gap/u-gap")]).then(e.bind(null,"464a"))}},o=function(){var n=this,t=n.$createElement,e=(n._self._c,n.__get_style([n.contentStyle]));n.$mp.data=Object.assign({},{$root:{s0:e}})},r=[]}}]);
- ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
- 'uview-ui/components/u-toast/u-toast-create-component',
- {
- 'uview-ui/components/u-toast/u-toast-create-component':(function(module, exports, __webpack_require__){
- __webpack_require__('543d')['createComponent'](__webpack_require__("36bd"))
- })
- },
- [['uview-ui/components/u-toast/u-toast-create-component']]
- ]);
|