nimble-ui
Version:
1 lines • 13.5 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="YfRm")}({"2tHm":function(t,e,n){"use strict";var i=n("zagf");e.a=function(t,e,n,o){var s=o/(n/e);!function n(c,a){setTimeout(function(){Object(i.a)(t,[a]),(o>0&&a<o||o<0&&a>o)&&c>0?n(c-e,a+s):Object(i.a)(t,[o])},e)}(n,0)}},"3AwK":function(t,e,n){"use strict";function i(t,e){var n=e.value,i=n,o=function(t){var e={};t&&(t.poster?e.srcAttr="poster":(t.background||t.backgroundImage||t.bg)&&(e.srcAttr="background"));return e}(e.modifiers),s=(o&&o.srcAttr||"src")+"",c=/background/i.test(s);n instanceof Object&&(i=n.src),c?t.style.backgroundImage="url("+i+")":t[s]=i}Object.defineProperty(e,"__esModule",{value:!0});var o=n("p84V");e.default=Object(o.a)(function(){return{bind:i,inserted:i,update:i}},"lazy")},"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}},"5Ojd":function(t,e){},"5fCB":function(t,e,n){"use strict";var i=n("E5mE"),o=n("eY/N");e.a=function t(){for(var e=!0,n=void 0,s=arguments.length,c=Array(s),a=0;a<s;a++)c[a]=arguments[a];if(c instanceof Array&&(n=c.slice(0,1)[0]),"boolean"==typeof n&&(e=n,c.splice(0,1),e||(n=c.splice(0,1)[0])),c&&c.length<1)return"boolean"==typeof n?c[1]:n;e&&(n=null);for(var r=0;r<c.length;r++){var l=c[r];if(l instanceof Object)if(e){for(var u in n&&n instanceof Object||(n=l instanceof Array?[]:{}),l)if(l.hasOwnProperty(u)){var f=l[u];if(d(f)){var p=d(n[u])&&n[u]||(f instanceof Array?[]:{});n[u]=t(p,f)}else void 0!==f?n[u]=f:void 0!==n[u]&&(n[u]=f)}}else n=n&&n instanceof Object?Object.assign(n,l):l}return n;function d(t){return t&&(Object(i.a)(t,"Array")||Object(o.a)(t))||!1}}},"6D8K":function(t,e){},"B/FW":function(t,e){},BOJz:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={extends:n("ho/f").a,name:"NuTag",props:{nameText:{type:[String,Number],default:"标签"},styleName:{type:String,default:""}}},o={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"nus_tag",class:[t.styleName&&"nu_tag-"+t.styleName||""],on:{click:function(e){t._onClick(e)},tap:function(e){t._onTap(e)}}},[n("span",{staticClass:"nu_tag",attrs:{"data-text":t.nameText||t.text}})])},staticRenderFns:[]};var s=n("VU/8")(i,o,!1,function(t){n("HNS/")},null,null).exports,c=n("4qRk");e.default=Object(c.a)(s)},Cljp:function(t,e){},E5mE:function(t,e,n){"use strict";e.a=function(t,e){var n=!1;try{n=Object.prototype.toString.call(t)==="[object "+e+"]"}catch(t){}return n}},"HNS/":function(t,e){},Lbtb:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("N1Ww"),o=n("d0AA"),s={extends:i.a,name:"NuImgc",components:{NuAspect:o.default},props:{aspect:{type:[Boolean,String,Number]},className:{type:String}}},c={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"nus_imgc"},[t.imgUrl?n("nu-aspect",{staticClass:"nu_img-wrap",attrs:{aspect:t.aspect,className:t.className},on:{click:t._onClick,tap:t._onTap}},[t.isLazy?n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.myLazyOptions,expression:"myLazyOptions"}],staticClass:"nu_imgc-img",attrs:{alt:""}}):n("img",{staticClass:"nu_imgc-img",attrs:{src:t.imgUrl,alt:""}}),t._v(" "),t._t("default")],2):t._e()],1)},staticRenderFns:[]};var a=n("VU/8")(s,c,!1,function(t){n("hvU/")},null,null).exports,r=n("4qRk");e.default=Object(r.a)(a)},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},LySh:function(t,e){},MEnT:function(t,e,n){"use strict";e.a=function(t){if("undefined"==typeof HTMLElement||!(t instanceof HTMLElement))return window;var e=t;for(;e&&e!==document.body&&e!==document.documentElement;){if(e!==t){if(e._isScroll)return e;if(!e.parentNode)break;if(!1!==e._isScroll){if(/(scroll|auto)/.test(o(e)))return e._isScroll=!0,e;e._isScroll=!1}}e=e.parentNode}return window};var i=n("fk+x");function o(t){return Object(i.a)(t,"overflow")+Object(i.a)(t,"overflow-y")+Object(i.a)(t,"overflow-x")}},N1Ww:function(t,e,n){"use strict";var i=n("rRBi"),o=n("ho/f"),s=n("caJ4"),c=n("3AwK"),a={extends:o.a,props:{imgUrl:{type:String},lazyOptions:{type:Object},isLazy:{type:Boolean,default:!0},aspect:{type:[String,Number]}},computed:{myLazyOptions:function(){var t=this,e=Object(i.a)(!1,{isWrap:!t.aspect},t.lazyOptions,{src:t.imgUrl});if(e&&e.loading){var n=e.loading;e.loading=function(i){try{n.call(e,i)}catch(t){}t.$emit("imgLoading",i)}}else e.loading=function(e){t.$emit("imgLoading",e)};return e}},beforeCreate:function(){Object(s.a)(this.constructor,c.default)}};var r=n("VU/8")(a,null,!1,function(t){n("zaQa")},null,null);e.a=r.exports},"VU/8":function(t,e){t.exports=function(t,e,n,i,o,s){var c,a=t=t||{},r=typeof t.default;"object"!==r&&"function"!==r||(c=t,a=t.default);var l,u="function"==typeof a?a.options:a;if(e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId=o),s?(l=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)},u._ssrRegister=l):i&&(l=i),l){var f=u.functional,p=f?u.render:u.beforeCreate;f?(u._injectStyles=l,u.render=function(t,e){return l.call(e),p(t,e)}):u.beforeCreate=p?[].concat(p,l):[l]}return{esModule:c,exports:a,options:u}}},Wxd7:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={extends:n("ho/f").a,name:"NuIcon",props:{iconClass:{default:"nu_icon"},icon:{type:String}}},o={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"nus_icon",class:t.iconClass,on:{click:function(e){t._onClick(e)},tap:function(e){t._onTap(e)}}},[t._t("default",[t._v("\n "+t._s(t.icon)+"\n ")]),t._v(" "),t._t("hook_ext")],2)},staticRenderFns:[]};var s=n("VU/8")(i,o,!1,function(t){n("6D8K")},null,null).exports,c=n("4qRk");e.default=Object(c.a)(s)},YfRm:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("ekq3"),o=n("xp1T"),s=n("2tHm"),c=n("rRBi"),a=n("ho/f"),r=n("iB7C"),l="scrollChange",u={extends:a.a,name:"NuFloaticon",components:{NuFunicon:r.default},props:{lazyOptions:{type:Object},list:{type:[Array,Function,Boolean]},scrollEl:{},iconClass:{type:String},filterShowList:{type:Function}},data:function(){return{myList:this._filterList(),showList:[]}},mounted:function(){var t=this;t.$nextTick(function(){setTimeout(function(){t._addEvt(),t._setShowList()})})},watch:{scrollEl:function(){this._addEvt()},list:function(){this.myList=this._filterList()},myList:function(){this._setShowList()}},beforeDestroy:function(){var t=this._getScrollEl();t&&t.removeEventListener("scroll",this._onScroll)},methods:{_addEvt:function(){var t=this._getScrollEl();this._removeEvt(),t&&(t.removeEventListener("scroll",this._onScroll),t.addEventListener("scroll",this._onScroll))},_removeEvt:function(){var t=this._getScrollEl();t&&t.removeEventListener("scroll",this._onScroll)},_getScrollEl:function(t){var e=!t&&this._scrollElCache||null,n=this.scrollEl;return e||(e=n?"string"==typeof n?document.querySelector(n):n:Object(o.a)(this.$el)),this._scrollElCache=e,e},_filterList:function(){var t=[{type:"goTop",flag:"goTop",icon:""}],e=Object(i.a)(this.list||t,[t]);return void 0!==e&&!0!==e||(e=t),e instanceof Array||(e=[e]),e},_setShowList:function(){var t=this.myList||[],e=this._getScrollEl(),n=e||{},o=n.scrollTop||n.scrollY,s=Object(i.a)(this.filterShowList,[{list:Object(c.a)(!0,t),top:o,el:e,showList:this.showList}]);return void 0===s&&(s=(s=t.filter(function(t){return"goTop"!==(t.type||"")||(o||0)>300})).length===t.length?t:s),this.showList=s,s},_onScroll:function(t){t=t||{},this._setShowList(),this.$emit(l,{Event:t,data:{list:this.myList,showList:this.showList,el:t&&t.target,top:t&&t.target&&t.target.scrollTop}})},_toTop:function(){var t=this,e=t._getScrollEl();if(e&&!t._locked){var n=e.scrollY||e.scrollTop||0;Object(s.a)(function(i){!function(n,i){var o=i+n;e===window?e.scrollTo({top:o,behavior:"instant"}):e.scrollTop=o;t._locked=o!==top}(i,n)},10,200,0-n)}},_handle:function(t){switch((t=t||{}).type||""){case"goTop":this._toTop()}},_click:function(t,e){switch(this._handle(e),this._clickItem(t,e),t&&t.type){case"click":this._onClick(t);break;case"tap":this._onTap(t)}},_clickItem:function(t,e){e=e||{},this._onClickItem({Event:t,data:{item:e,list:this.myList,el:this.scrollDom,top:this.scrollDom&&this.scrollDom.scrollTop}})}}},f={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.showList&&t.showList.length>0?n("div",{staticClass:"nus_floaticon"},[n("div",{staticClass:"nu_floaticon-wrap"},[t._l(t.showList,function(e,i){return[e?n("div",{key:i,staticClass:"nu_floatIcon-item",class:[e.className||""]},[n("nu-funicon",{staticClass:"nu_floatIcon",attrs:{iconClass:t.iconClass,icon:e.icon,imgUrl:e.imgUrl,nameText:e.text,lazyOptions:t.lazyOptions},on:{click:function(n){t._click(n,e)},tap:function(n){t._click(n,e)}}})],1):t._e()]})],2)]):t._e()},staticRenderFns:[]};var p=n("VU/8")(u,f,!1,function(t){n("5Ojd")},null,null).exports,d=n("4qRk");e.default=Object(d.a)(p)},caJ4:function(t,e,n){"use strict";e.a=function(t,e,n){t.use(e,n)}},d0AA:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("ho/f"),o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s={name:"NuAspect",extends:i.a,props:{aspect:{type:[Boolean,String,Number]},className:{type:String}},data:function(){return{isClass:!1}},computed:{myAspect:function(){var t=this.aspect;if(this.isClass=!1,!0===t||t+""=="1")t="nu_aspect",this.isClass=!0;else{t=((t||"")+"").replace("%","");var e=parseFloat(t,10);if(isNaN(e))this.isClass=!0;else switch(void 0===e?"undefined":o(e)){case"number":(t=Math.abs(t))>5?t+="%":t>0&&(t=100*t+"%")}}return t}}},c={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"nus_aspect",class:[t.myAspect&&"nu_aspect-base",t.isClass&&t.myAspect,!t.myAspect&&t.className],style:t.myAspect&&!t.isClass&&{paddingTop:t.myAspect},on:{click:t._onClick,tap:t._onTap}},[t.myAspect?n("div",{staticClass:"nu_aspect-wrap",class:t.className},[n("div",{staticClass:"nu_aspect-cont"},[t._t("default")],2)]):[t._t("default")]],2)},staticRenderFns:[]};var a=n("VU/8")(s,c,!1,function(t){n("LySh")},null,null).exports,r=n("4qRk");e.default=Object(r.a)(a)},"eY/N":function(t,e,n){"use strict";e.a=function(t){if(!Object(i.a)(t,"Object"))return!1;var e=Object.getPrototypeOf(t);if(!e)return!0;var n=o.call(e,"constructor")&&e.constructor;return"function"==typeof n&&o.toString.call(n)===o.toString.call(Object)};var i=n("E5mE"),o=Object.prototype.hasOwnProperty},ekq3:function(t,e,n){"use strict";var i=n("zagf");e.a=i.a},"fk+x":function(t,e,n){"use strict";e.a=function(t,e){return("undefined"!=typeof getComputedStyle?getComputedStyle(t,null).getPropertyValue(e):t.style[e])||""}},"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},"hvU/":function(t,e){},iB7C:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("ho/f"),o=n("Wxd7"),s=n("Lbtb"),c=n("BOJz"),a={extends:i.a,name:"NuFunicon",components:{NuIcon:o.default,NuImgc:s.default,NuTag:c.default},props:{lazyOptions:{type:Object},isLazy:{type:Boolean,default:!0},icon:{type:String},iconClass:{},imgUrl:{type:String},nameText:{type:String}}},r={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"nus_funicon",on:{click:function(e){t._onClick(e)},tap:function(e){t._onTap(e)}}},[t._t("default",[t.imgUrl?n("div",{staticClass:"nu_fun-icon"},[n("nu-imgc",{attrs:{aspect:!0,imgUrl:t.imgUrl,isLazy:t.isLazy,lazyOptions:t.lazyOptions}},[t._t("hook_ext")],2)],1):t.icon?n("nu-icon",{staticClass:"nu_fun-icon",attrs:{icon:t.icon,iconClass:t.iconClass}},[n("template",{slot:"hook_ext"},[t._t("hook_ext")],2)],2):t._e()]),t._v(" "),t._t("hook_nameText",[t.nameText?n("nu-tag",{staticClass:"nu_text",attrs:{nameText:t.nameText}}):t._e()])],2)},staticRenderFns:[]};var l=n("VU/8")(a,r,!1,function(t){n("Cljp")},null,null).exports,u=n("4qRk");e.default=Object(u.a)(l)},p84V:function(t,e,n){"use strict";e.a=function(t,e){t&&!t.install&&(t.install=function(n,o){var s=n.directive(e);if(!s){var c=Object(i.a)(t,[o]);c&&n.directive(e,c.directive||c)}});return t};var i=n("ekq3")},rRBi:function(t,e,n){"use strict";var i=n("5fCB");e.a=i.a},xp1T:function(t,e,n){"use strict";var i=n("MEnT");e.a=i.a},zaQa:function(t,e){},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}}});