u-toast.js 4.6 KB

1234567891011
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uview-ui/components/u-toast/u-toast"],{986:function(n,e,t){"use strict";t.r(e);var o=t(987),i=t(989);for(var r in i)["default"].indexOf(r)<0&&function(n){t.d(e,n,(function(){return i[n]}))}(r);t(991);var u,c=t(37),s=Object(c["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,"413e7fe0",null,!1,o["components"],u);s.options.__file="uview-ui/components/u-toast/u-toast.vue",e["default"]=s.exports},987:function(n,e,t){"use strict";t.r(e);var o=t(988);t.d(e,"render",(function(){return o["render"]})),t.d(e,"staticRenderFns",(function(){return o["staticRenderFns"]})),t.d(e,"recyclableRender",(function(){return o["recyclableRender"]})),t.d(e,"components",(function(){return o["components"]}))},988:function(n,e,t){"use strict";var o;t.r(e),t.d(e,"render",(function(){return i})),t.d(e,"staticRenderFns",(function(){return u})),t.d(e,"recyclableRender",(function(){return r})),t.d(e,"components",(function(){return o}));try{o={uOverlay:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-overlay/u-overlay")]).then(t.bind(null,1474))},uLoadingIcon:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-loading-icon/u-loading-icon")]).then(t.bind(null,1458))},uIcon:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-icon/u-icon")]).then(t.bind(null,860))},uGap:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-gap/u-gap")]).then(t.bind(null,1506))}}}catch(c){if(-1===c.message.indexOf("Cannot find module")||-1===c.message.indexOf(".vue"))throw c;console.error(c.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 n=this,e=n.$createElement,t=(n._self._c,n.__get_style([n.contentStyle]));n.$mp.data=Object.assign({},{$root:{s0:t}})},r=!1,u=[];i._withStripped=!0},989:function(n,e,t){"use strict";t.r(e);var o=t(990),i=t.n(o);for(var r in o)["default"].indexOf(r)<0&&function(n){t.d(e,n,(function(){return o[n]}))}(r);e["default"]=i.a},990:function(n,e,t){"use strict";(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={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 e="rgb(255, 255, 255)";return["error","warning","success","primary"].includes(this.tmpConfig.type)&&(e=n.$u.hexToRgb(n.$u.color[this.tmpConfig.type])),e},contentStyle:function(){var e=n.$u.sys().windowHeight,t={},o=0;return"top"===this.tmpConfig.position?o=.25*-e:"bottom"===this.tmpConfig.position&&(o=.25*e),t.transform="translateY(".concat(o,"px)"),t}},created:function(){var n=this;["primary","success","error","warning","default","loading"].map((function(e){n[e]=function(t){return n.show({type:e,message:t})}}))},methods:{show:function(e){var t=this;this.tmpConfig=n.$u.deepMerge(this.config,e),this.clearTimer(),this.isShow=!0,this.timer=setTimeout((function(){t.clearTimer(),"function"===typeof t.tmpConfig.complete&&t.tmpConfig.complete()}),this.tmpConfig.duration)},hide:function(){this.clearTimer()},clearTimer:function(){this.isShow=!1,clearTimeout(this.timer),this.timer=null}},beforeDestroy:function(){this.clearTimer()}};e.default=t}).call(this,t(2)["default"])},991:function(n,e,t){"use strict";t.r(e);var o=t(992),i=t.n(o);for(var r in o)["default"].indexOf(r)<0&&function(n){t.d(e,n,(function(){return o[n]}))}(r);e["default"]=i.a},992:function(n,e,t){}}]);
  2. //# sourceMappingURL=../../../../.sourcemap/mp-weixin/uview-ui/components/u-toast/u-toast.js.map
  3. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  4. 'uview-ui/components/u-toast/u-toast-create-component',
  5. {
  6. 'uview-ui/components/u-toast/u-toast-create-component':(function(module, exports, __webpack_require__){
  7. __webpack_require__('2')['createComponent'](__webpack_require__(986))
  8. })
  9. },
  10. [['uview-ui/components/u-toast/u-toast-create-component']]
  11. ]);