eeeeeeuuuu-ui
Version:
uView UI,是uni-app生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水
12 lines (11 loc) • 2.39 kB
JavaScript
require('../../../app.js');
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uview-ui/components/u-toast/u-toast"],{"08ec":function(i,t,e){"use strict";(function(i){t["a"]={name:"u-toast",props:{zIndex:{type:[Number,String],default:""}},data(){return{isShow:!1,timer:null,config:{params:{},title:"",type:"",duration:2e3,isTab:!1,url:"",icon:!0,position:"center",callback:null,back:!1}}},computed:{iconName(){if(["error","warning","success","info"].indexOf(this.config.type)>=0&&this.config.icon){let i=this.$u.type2icon(this.config.type);return i}},uZIndex(){return this.isShow?this.zIndex?this.zIndex:this.$u.zIndex.toast:"999999"}},methods:{show(i){this.config=this.$u.deepMerge(this.config,i),this.timer&&(clearTimeout(this.timer),this.timer=null),this.isShow=!0,this.timer=setTimeout(()=>{this.isShow=!1,clearTimeout(this.timer),this.timer=null,"function"===typeof this.config.callback&&this.config.callback(),this.timeEnd()},this.config.duration)},hide(){this.isShow=!1,this.timer&&(clearTimeout(this.timer),this.timer=null)},timeEnd(){if(this.config.url){if("/"!=this.config.url[0]&&(this.config.url="/"+this.config.url),Object.keys(this.config.params).length){let i="";/.*\/.*\?.*=.*/.test(this.config.url)?(i=this.$u.queryParams(this.config.params,!1),this.config.url=this.config.url+"&"+i):(i=this.$u.queryParams(this.config.params),this.config.url+=i)}this.config.isTab?i.switchTab({url:this.config.url}):i.navigateTo({url:this.config.url})}else this.config.back&&this.$u.route({type:"back"})}}}}).call(this,e("543d")["default"])},"6e88":function(i,t,e){"use strict";e.r(t);var s,n={uIcon:function(){return e.e("uview-ui/components/u-icon/u-icon").then(e.bind(null,"ece6"))}},c=function(){var i=this,t=i.$createElement;i._self._c},o=[],u=e("08ec"),r=u["a"],h=(e("f23e"),e("f0c5")),a=Object(h["a"])(r,c,o,!1,null,"b33de616",null,!1,n,s);t["default"]=a.exports},c1c3:function(i,t,e){},f23e:function(i,t,e){"use strict";var s=e("c1c3"),n=e.n(s);n.a}}]);
;(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__("6e88"))
})
},
[['uview-ui/components/u-toast/u-toast-create-component']]
]);