nimble-ui
Version:
1 lines • 4.22 kB
JavaScript
module.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s="kuhF")}({"4qRk":function(t,e,n){"use strict";e.a=function(t){t&&!t.install&&(t.install=function(e){var n=t.name||"",i=e.component(n);i||e.component(n,t)});return t}},"B/FW":function(t,e){},Lv3q:function(t,e,n){"use strict";n("B/FW");var i=n("VU/8")({methods:{_onClick:function(t){this.$emit("click",t)},_onTap:function(t){this.$emit("tap",t)},_onClickItem:function(t){this.$emit("clickItem",t)}}},null,!1,null,null,null);e.a=i.exports},MKYu:function(t,e){},Nt7u:function(t,e,n){"use strict";var i=n("XAAj");e.a=i.a},"VU/8":function(t,e){t.exports=function(t,e,n,i,o,s){var r,u=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(r=t,u=t.default);var a,l="function"==typeof u?u.options:u;if(e&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0),n&&(l.functional=!0),o&&(l._scopeId=o),s?(a=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},l._ssrRegister=a):i&&(a=i),a){var f=l.functional,m=f?l.render:l.beforeCreate;f?(l._injectStyles=a,l.render=function(t,e){return a.call(e),m(t,e)}):l.beforeCreate=m?[].concat(m,a):[a]}return{esModule:r,exports:u,options:l}}},XAAj:function(t,e,n){"use strict";e.a=function(t){var e=document.createEvent("undefined"!=typeof MouseEvent?"MouseEvents":"Event");return e.initEvent(t,!0,!1),e}},ekq3:function(t,e,n){"use strict";var i=n("zagf");e.a=i.a},"ho/f":function(t,e,n){"use strict";var i={extends:n("Lv3q").a},o=n("VU/8")(i,null,!1,null,null,null);e.a=o.exports},kARP:function(t,e){},kuhF:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("Nt7u"),o={props:{nameText:{type:String},time:{type:Number,default:3e3}},mounted:function(){this._initCom()},beforeDestroy:function(){clearTimeout(this.timer)},methods:{_initCom:function(){var t=this;void 0!==t.timer&&null!==t.timer&&clearTimeout(t.timer),t.timer=setTimeout(function(){t.timer=null,t.$emit("close",Object(i.a)("close"))},t.time||3e3)}}},s={render:function(){var t=this.$createElement,e=this._self._c||t;return this.nameText?e("div",{staticClass:"nus_toastitem",domProps:{innerHTML:this._s(this.nameText)}}):this._e()},staticRenderFns:[]};var r=n("VU/8")(o,s,!1,function(t){n("MKYu")},null,null).exports,u=n("ho/f"),c=n("ekq3"),a={extends:u.a,name:"NuToast",components:{ToastItem:r},props:{isList:{default:!1},list:{type:Array}},data:function(){return{myIsList:this.isList,myList:this.list||[],itemData:null,lock:!1}},watch:{list:function(t){this.itemData=t},itemData:function(t){this.lock=!1,t&&(this.myIsList||(this.myList=[]),this.myList=this.myList.concat(t))}},methods:{_closePopup:function(t,e){var n=this,i=this.myList,o=0;if(t=t||0,i&&i.length)for(var s=0;s<i.length;s++){if(i[s]&&(o+=1)>t)return void Object(c.a)(e)}void 0!==n._settime&&null===n._settime&&clearTimeout(n._settime),n.lock||(n.lock=!0,n.$emit("closePopup"),n._settime=setTimeout(function(){n._settime=null,Object(c.a)(e)},200))},_onClose:function(t){var e=this;e._closePopup(1,function(){e.$set(e.myList,t,null)})}}},l={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.myList&&t.myList.length>0?n("div",{staticClass:"nus_toast"},[t._l(t.myList,function(e,i){return[e?n("toast-item",{key:i,staticClass:"nu_toast-item",attrs:{nameText:e.text,time:e.time},on:{close:function(e){e.stopPropagation(),t._onClose(i)}}}):t._e()]})],2):t._e()},staticRenderFns:[]};var f=n("VU/8")(a,l,!1,function(t){n("kARP")},null,null).exports,m=n("4qRk");e.default=Object(m.a)(f)},zagf:function(t,e,n){"use strict";e.a=function(t,e,n){var i=t;t instanceof Function&&(i=t.apply(n,e));return i}}});