UNPKG

weiyun-ui

Version:

UI library For Vue

2 lines 7.4 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("wy-permission-icon",[],e):"object"==typeof exports?exports["wy-permission-icon"]=e():t["wy-permission-icon"]=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},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=595)}({128:function(t,e,n){"use strict";(function(t){function n(t,e){if(null!=t){var n=new Date(t);return n.getFullYear()+e+(n.getMonth()+1)+e+n.getDate()}}function r(t){var e=[];try{if(t){var n=localStorage.getItem(t);n&&(e=JSON.parse(n))}}catch(t){console.log("getBizActionList e=>",t)}finally{return e}}var o=t?t.env:null,i=o&&o.baseYiiUrl?o.baseYiiUrl:o.baseUrl?o.baseUrl:"";e.a={formatDateWithSeperator:n,exportBlogObject:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"xlsx",o=window.URL.createObjectURL(e),i=document.createElement("a");i.style.display="none",i.href=o;var c=new Date,u=n(c,"-");i.setAttribute("download","".concat(t,"-").concat(u,".").concat(r)),document.body.appendChild(i),i.click()},baseYiiUrl:i,getPermission:function(t,e){var n=!1,o=r(e);for(var i in o)if(o.hasOwnProperty(i))for(var c=o[i],u=0,a=c.length;u<a;u++)if(c[u]===t){n=!0;break}return n},getBizActionList:r}}).call(this,n(300))},2:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},24:function(t,e,n){var r=n(6);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},27:function(t,e,n){"use strict";function r(t,e,n,r,o,i,c,u){var a,s="function"==typeof t?t.options:t;if(e&&(s.render=e,s.staticRenderFns=n,s._compiled=!0),r&&(s.functional=!0),i&&(s._scopeId="data-v-"+i),c?(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__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},s._ssrRegister=a):o&&(a=u?function(){o.call(this,(s.functional?this.parent:this).$root.$options.shadowRoot)}:o),a)if(s.functional){s._injectStyles=a;var f=s.render;s.render=function(t,e){return a.call(e),f(t,e)}}else{var l=s.beforeCreate;s.beforeCreate=l?[].concat(l,a):[a]}return{exports:t,options:s}}n.d(e,"a",(function(){return r}))},293:function(t,e,n){"use strict";var r=n(128);e.a={props:{loading:{type:Boolean,default:!1},pID:{type:String,default:""}},data:function(){return{visible:!1}},methods:{handleClick:function(){this.$emit("click",{})},hasPermission:function(){return r.a.getPermission(this.pID,this.bizActionListKey)}},mounted:function(){},created:function(){this.visible=this.pID&&this.hasPermission()},computed:{}}},300:function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:c}catch(t){r=c}}();var a,s=[],f=!1,l=-1;function p(){f&&a&&(f=!1,a.length?s=a.concat(s):l=-1,s.length&&d())}function d(){if(!f){var t=u(p);f=!0;for(var e=s.length;e;){for(a=s,s=[];++l<e;)a&&a[l].run();l=-1,e=s.length}a=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===c||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new h(t,e)),1!==s.length||f||u(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},31:function(t,e,n){var r=n(7).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(4)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},33:function(t,e,n){var r=n(6),o=n(2).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},4:function(t,e,n){t.exports=!n(8)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},41:function(t,e,n){t.exports=!n(4)&&!n(8)((function(){return 7!=Object.defineProperty(n(33)("div"),"a",{get:function(){return 7}}).a}))},421:function(t,e,n){},5:function(t,e,n){var r=n(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},557:function(t,e,n){"use strict";n(421)},595:function(t,e,n){"use strict";n.r(e);n(31);var r=function(){var t=this._self._c;return this.visible?t("i",this._b({staticClass:"wy-permission-icon",attrs:{loading:this.loading},on:{click:this.handleClick}},"i",this.$attrs,!1),[this._t("default")],2):this._e()};r._withStripped=!0;var o={name:"wy-permission-icon",mixins:[n(293).a],inheritAttrs:!1,props:{},data:function(){return{}},methods:{},watch:{},created:function(){},mounted:function(){},computed:{},beforeDestroy:function(){}},i=(n(557),n(27)),c=Object(i.a)(o,r,[],!1,null,"c7cbc8aa",null).exports;c.install=function(t){t.component(c.name,c)};e.default=c},6:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},7:function(t,e,n){var r=n(5),o=n(41),i=n(24),c=Object.defineProperty;e.f=n(4)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},8:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}}}).default})); //# sourceMappingURL=index.js.map