UNPKG

nimble-ui-pc

Version:

基础vue ui库 配置化组件 后台管理系统组件

1 lines 10.6 kB
module.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var s=e[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.l=!0,s.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="C3bz")}({"/TGq":function(t,e,n){"use strict";var i={extends:n("jeun").a},s=n("VU/8")(i,null,!1,null,null,null);e.a=s.exports},"0Zk/":function(t,e,n){"use strict";e.a=function(t,e){return Object(i.a)(t,e).replace(/^[a-z]/,function(t){return t.toUpperCase()})};var i=n("lXuC")},"1JEl":function(t,e,n){"use strict";e.a=function(t){t&&!t.install&&(t.install=function(e,n){e.mixin(Object(i.a)(t,[n]))});return t};var i=n("ekq3")},"2HHg":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){},BzdL:function(t,e){},C3bz:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("F/C+"),s=n("P6HH"),c=n("zorr"),u={extends:n("/TGq").a,name:"NupSidebar",components:{Submenu:s.a,MenuItem:c.a},props:{iconClass:{},menuList:{type:Array}},data:function(){return{selectItem:null}},watch:{$route:function(){this.getActiveItem()}},mounted:function(){this.getActiveItem()},methods:{getActiveItem:function(){for(var t=this.$route.path.split("/")||[],e=this.menuList||[],n=0;n<e.length;n++){var i=e[n],s=i.path.split("/")||[],c=t.slice(0,s.length);if(s.join("/")===c.join("/"))return this.selectMenu(i,n),i}},selectMenu:function(t,e,n){var i=!(!t.children||!t.children.length);this.selectItem=t,!i&&n||this.$emit("openSubmenu",i)},changeSidebar:function(){this.$emit("clickAction")},fixSidebar:function(){this.$emit("fixSideEvent")},closeMenu:function(t){var e=t;if(e&&"string"==typeof e)try{e=JSON.parse(e)}catch(t){e={}}this.$emit("closeMenu",e||{})},openMenu:function(t){var e=t;if(e&&"string"==typeof e)try{e=JSON.parse(e)}catch(t){e={}}this.$emit("openMenu",e||{})}}},a={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"nups_sidebar"},[n("div",{staticClass:"nups_sidebar-cont"},[n("ul",{staticClass:"nup_menu-list"},[t._l(t.menuList,function(e,i){return[e?n("li",{key:i,staticClass:"menu-item",class:[t.selectItem===e&&"nup_menu-active"]},[e.path?n("router-link",{key:e.path,staticClass:"nup_menu-title",attrs:{to:e.path},nativeOn:{click:function(n){t.selectMenu(e,i)}}},[n("menu-item",{attrs:{iconClass:t.iconClass,item:e}})],1):e.url?n("a",{staticClass:"nup_menu-title",attrs:{href:e.url,target:"_blank"}},[n("menu-item",{attrs:{iconClass:t.iconClass,item:e}})],1):n("menu-item",{staticClass:"nup_menu-title",attrs:{item:e,isArrow:!1},on:{click:function(n){t.selectMenu(e,i,!0)}}})],1):t._e()]})],2)]),t._v(" "),t.selectItem&&t.selectItem.children&&t.selectItem.children.length?n("div",{staticClass:"nup_sdebar-submenu"},[n("submenu",{attrs:{iconClass:t.iconClass,isShow:!0,path:t.selectItem.path,list:t.selectItem.children}})],1):t._e()])},staticRenderFns:[]};var r=n("VU/8")(u,a,!1,function(t){n("xkF4")},null,null).exports;e.default=Object(i.a)(r)},"F/C+":function(t,e,n){"use strict";var i=n("2HHg");e.a=i.a},FJHR:function(t,e){},P6HH:function(t,e,n){"use strict";var i=n("iNmd"),s=n("zorr"),c={extends:n("/TGq").a,name:"NupSubmenu",components:{MenuItem:s.a},props:{iconClass:{},path:{default:""},list:{},level:{type:Number,default:1},isShow:{}},data:function(){return{cpath:"",curSelectIndex:null,myShow:this.isShow,myStyle:{}}},mixins:[Object(i.a)("activeIndex")],watch:{isShow:function(t){this.setShow(t)},$route:function(t){this.cpath=t.path,this._lock&&(this._lock=!1,this.myActiveIndex=-1)},list:function(){var t=this;setTimeout(function(){t.setActiveIndex(t.curSelectIndex)},20)}},computed:{},mounted:function(){var t=this;setTimeout(function(){t.setShow(t.isShow)},20)},methods:{_filterItemClass:function(t){var e=["nup_menu-item-wrap"];return this.curSelectIndex===t&&e.push("cur-select-index"),e},setShow:function(t){var e=this;if(e.$el){t&&(e.myShow=t,e.myStyle={height:"0px"});var n=e.$el&&e.$el.childNodes[0],i=0,s=0;setTimeout(function(){var c=n.offsetHeight;t?s=c:i=c,e.myStyle={height:i+"px"},setTimeout(function(){e.myStyle={height:s+"px"},setTimeout(function(){e.myShow=t,e.myStyle=null},280)},20)},20)}},selectMenu:function(t,e){this.setActiveIndex(e,!0)},activeChildren:function(t,e){var n=this.myActiveIndex;this.curSelectIndex=e,(-1===n||!n&&0!==n&&null!==n)&&this.setActiveIndex(e)},setActiveIndex:function(t,e){this.myActiveIndex===t&&e?(this._lock=!0,this.myActiveIndex=null):(this._lock=!1,this.myActiveIndex=t)},getActivePath:function(t){var e=(((this.$route||{}).path||"")+"").split("/")||[],n=this.path||"",i=((n=n?n+"/":"")+(t&&t.path||"")).split("/")||[],s=e.slice(0,i.length);if(i.join("/")===s.join("/"))return i.length===e.length&&this.$emit("activeChildren",t),t.path}}},u={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.list&&t.list.length?n("div",{directives:[{name:"show",rawName:"v-show",value:t.myShow,expression:"myShow"}],staticClass:"nups_submenu",class:"nup_submenu-level"+t.level,style:t.myStyle},[n("ul",{staticClass:"nup_submenu"},[t._l(t.list,function(e,i){return[e?n("li",{key:i,staticClass:"nup_submenu-item",class:["nup_submenu-item-level"+t.level,t.myActiveIndex===i&&"nup_active",t.getActivePath(e,i)&&"cur_active",e.children&&e.children.length&&"nup_is-children"]},[n("div",{staticClass:"nup_submenu-title-wrap"},[!e.isUrl&&e.children?n("menu-item",{class:t._filterItemClass(i),attrs:{iconClass:t.iconClass,isArrow:!!e.children,item:e},on:{click:function(n){t.selectMenu(e,i)}}}):e.path?n("router-link",{class:t._filterItemClass(i),attrs:{to:t.path+(t.path&&e.path?"/":"")+(e.path||"")},nativeOn:{click:function(n){t.selectMenu(e,i)}}},[n("menu-item",{attrs:{iconClass:t.iconClass,item:e,isArrow:!!e.children}})],1):e.url?n("a",{class:t._filterItemClass(i),attrs:{target:"_blank",href:e.url}},[n("menu-item",{attrs:{iconClass:t.iconClass,item:e,isArrow:!!e.children}})],1):n("menu-item",{class:t._filterItemClass(i),attrs:{iconClass:t.iconClass,item:e,isArrow:!!e.children},on:{click:function(n){t.selectMenu(e,i)}}})],1),t._v(" "),e&&e.children&&e.children.length?[n("nup-submenu",{attrs:{iconClass:t.iconClass,isShow:t.myActiveIndex===i,level:t.level+1,path:t.path+(t.path&&e.path?"/":"")+(e.path||""),list:e.children},on:{activeChildren:function(n){t.activeChildren(e,i)}}})]:t._e()],2):t._e()]})],2)]):t._e()},staticRenderFns:[]};var a=n("VU/8")(c,u,!1,function(t){n("FJHR")},null,null);e.a=a.exports},SZml:function(t,e){},"VU/8":function(t,e){t.exports=function(t,e,n,i,s,c){var u,a=t=t||{},r=typeof t.default;"object"!==r&&"function"!==r||(u=t,a=t.default);var l,o="function"==typeof a?a.options:a;if(e&&(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0),n&&(o.functional=!0),s&&(o._scopeId=s),c?(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(c)},o._ssrRegister=l):i&&(l=i),l){var h=o.functional,m=h?o.render:o.beforeCreate;h?(o._injectStyles=l,o.render=function(t,e){return l.call(e),m(t,e)}):o.beforeCreate=m?[].concat(m,l):[l]}return{esModule:u,exports:a,options:o}}},"WGR+":function(t,e,n){"use strict";var i=n("0Zk/");e.a=i.a},c3qM:function(t,e,n){"use strict";n("BzdL");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},ceTd:function(t,e){},ehN1:function(t,e,n){"use strict";var i={extends:n("rHgN").a,name:"NuIcon",props:{iconClass:{default:"nu_icon"},icon:{type:String}}},s={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 c=n("VU/8")(i,s,!1,function(t){n("SZml")},null,null).exports,u=n("2HHg");e.a=Object(u.a)(c)},ekq3:function(t,e,n){"use strict";var i=n("zagf");e.a=i.a},iNmd:function(t,e,n){"use strict";var i=n("ekq3"),s=n("WGR+");var c=n("1JEl");e.a=Object(c.a)(function(t,e){var n;e=e||{};var c={};c[t=(t||"")+""]=e.value||{};var u="my"+Object(s.a)(t);return{props:c,data:function(){var n={};return n[u]=Object(i.a)(e.myValueInit||this[t],[this[t]],this),void 0===this.$options.propsData[t]&&void 0!==n[u]&&this.$emit("update:"+t,n[u]),n},watch:(n={},n[t]=function(t,n){!1!==Object(i.a)(e.mValueChange,[t,n],this)&&(this[u]=t)},n[u]=function(n,s){!1!==Object(i.a)(e.myValueChange,[n,s],this)&&this.$emit("update:"+t,n)},n)}})},jeun:function(t,e,n){"use strict";n("B/FW");var i=n("VU/8")({},null,!1,null,null,null);e.a=i.exports},lXuC:function(t,e,n){"use strict";e.a=function(t,e){var n="("+(e||"_|-")+")";return t=(t=(t=(t+"").replace(new RegExp(n+"?(?:(?:[A-Z]{2,}[A-Z]"+n+"*$)|(?:[A-Z]{2,}(?=[A-Z])))","g"),function(t){return(((e||"")+"").split("|")[0]||"-")+(t=t.replace(new RegExp(n),"")).toLowerCase()})).replace(new RegExp("(?:^"+n+"?([a-z]))|(?:"+n+"$)","gi"),function(t,e,n){return(n||"").toLowerCase()})).replace(new RegExp(n+"([a-z])","gi"),function(t,e,n){return(n||"").toUpperCase()})}},rHgN:function(t,e,n){"use strict";var i={extends:n("c3qM").a},s=n("VU/8")(i,null,!1,null,null,null);e.a=s.exports},xkF4: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}},zorr:function(t,e,n){"use strict";var i=n("ehN1"),s={extends:n("/TGq").a,components:{NuIcon:i.a},props:{iconClass:{},item:{},isArrow:{}},methods:{click:function(t){this.$emit("click",t)}}},c={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"nups_menuitem",on:{click:t.click}},[t.item.icon?n("nu-icon",{staticClass:"nup_menu-icon",attrs:{icon:t.item.icon,iconClass:t.iconClass}}):t._e(),t._v(" "),n("span",{staticClass:"nup_menu-text"},[t._v(t._s(t.item.name))]),t._v(" "),t.isArrow?n("i",{staticClass:"nup_menu-arrow el-icon-arrow-down",on:{click:function(e){t.$emit("arrowClick",e)}}}):t._e()],1)},staticRenderFns:[]};var u=n("VU/8")(s,c,!1,function(t){n("ceTd")},null,null);e.a=u.exports}});