weiyun-ui
Version:
UI library For Vue
2 lines • 7.32 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("wy-permission-button",[],e):"object"==typeof exports?exports["wy-permission-button"]=e():t["wy-permission-button"]=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=594)}({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 u=new Date,c=n(u,"-");i.setAttribute("download","".concat(t,"-").concat(c,".").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 u=o[i],c=0,a=u.length;c<a;c++)if(u[c]===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,u,c){var a,f="function"==typeof t?t.options:t;if(e&&(f.render=e,f.staticRenderFns=n,f._compiled=!0),r&&(f.functional=!0),i&&(f._scopeId="data-v-"+i),u?(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(u)},f._ssrRegister=a):o&&(a=c?function(){o.call(this,(f.functional?this.parent:this).$root.$options.shadowRoot)}:o),a)if(f.functional){f._injectStyles=a;var s=f.render;f.render=function(t,e){return a.call(e),s(t,e)}}else{var l=f.beforeCreate;f.beforeCreate=l?[].concat(l,a):[a]}return{exports:t,options:f}}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 u(){throw new Error("clearTimeout has not been defined")}function c(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:u}catch(t){r=u}}();var a,f=[],s=!1,l=-1;function p(){s&&a&&(s=!1,a.length?f=a.concat(f):l=-1,f.length&&d())}function d(){if(!s){var t=c(p);s=!0;for(var e=f.length;e;){for(a=f,f=[];++l<e;)a&&a[l].run();l=-1,e=f.length}a=null,s=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===u||!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];f.push(new h(t,e)),1!==f.length||s||c(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}))},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}},594:function(t,e,n){"use strict";n.r(e);n(31);var r=function(){var t=this._self._c;return this.visible?t("el-button",this._b({attrs:{loading:this.loading},on:{click:this.handleClick}},"el-button",this.$attrs,!1),[this._t("default")],2):this._e()};r._withStripped=!0;var o={name:"wy-permission-button",mixins:[n(293).a],inheritAttrs:!1,props:{},data:function(){return{}},methods:{},watch:{},created:function(){},mounted:function(){},computed:{},beforeDestroy:function(){}},i=n(27),u=Object(i.a)(o,r,[],!1,null,"54ceb43c",null).exports;u.install=function(t){t.component(u.name,u)};e.default=u},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),u=Object.defineProperty;e.f=n(4)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(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