custom-vxe-table 3.0.4 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.common.js +2 -0
- package/lib/index.umd.js +2 -0
- package/lib/index.umd.min.js +1 -1
- package/package.json +1 -1
package/lib/index.common.js
CHANGED
|
@@ -95415,6 +95415,8 @@ const lang_messages = {
|
|
|
95415
95415
|
}
|
|
95416
95416
|
};
|
|
95417
95417
|
const lang_i18n = Object(vue_i18n["createI18n"])({
|
|
95418
|
+
legacy: false,
|
|
95419
|
+
globalInjection: true,
|
|
95418
95420
|
locale: utils_storage.getO("language") || 'zh_cn',
|
|
95419
95421
|
messages: lang_messages
|
|
95420
95422
|
});
|
package/lib/index.umd.js
CHANGED
|
@@ -95424,6 +95424,8 @@ const lang_messages = {
|
|
|
95424
95424
|
}
|
|
95425
95425
|
};
|
|
95426
95426
|
const lang_i18n = Object(vue_i18n["createI18n"])({
|
|
95427
|
+
legacy: false,
|
|
95428
|
+
globalInjection: true,
|
|
95427
95429
|
locale: utils_storage.getO("language") || 'zh_cn',
|
|
95428
95430
|
messages: lang_messages
|
|
95429
95431
|
});
|
package/lib/index.umd.min.js
CHANGED
|
@@ -329,7 +329,7 @@ function Wf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
329
329
|
* vuex v4.1.0
|
|
330
330
|
* (c) 2022 Evan You
|
|
331
331
|
* @license MIT
|
|
332
|
-
*/function s_(e){return void 0===e&&(e=null),Object(i["inject"])(null!==e?e:l_)}function u_(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function c_(e){return null!==e&&"object"===typeof e}function d_(e){return e&&"function"===typeof e.then}function f_(e,t){if(!e)throw new Error("[vuex] "+t)}function m_(e,t){return function(){return e(t)}}function p_(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function h_(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;__(e,n,[],e._modules.root,!0),v_(e,n,t)}function v_(e,t,n){var r=e._state,a=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var o=e._wrappedGetters,l={},s={},u=Object(i["effectScope"])(!0);u.run((function(){u_(o,(function(t,n){l[n]=m_(t,e),s[n]=Object(i["computed"])((function(){return l[n]()})),Object.defineProperty(e.getters,n,{get:function(){return s[n].value},enumerable:!0})}))})),e._state=Object(i["reactive"])({data:t}),e._scope=u,e.strict&&M_(e),r&&n&&e._withCommit((function(){r.data=null})),a&&a.stop()}function __(e,t,n,r,a){var o=!n.length,i=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[i]&&console.error("[vuex] duplicate namespace "+i+" for the namespaced module "+n.join("/")),e._modulesNamespaceMap[i]=r),!o&&!a){var l=O_(t,n.slice(0,-1)),s=n[n.length-1];e._withCommit((function(){s in l&&console.warn('[vuex] state field "'+s+'" was overridden by a module with the same name at "'+n.join(".")+'"'),l[s]=r.state}))}var u=r.context=b_(e,i,n);r.forEachMutation((function(t,n){var r=i+n;y_(e,r,t,u)})),r.forEachAction((function(t,n){var r=t.root?n:i+n,a=t.handler||t;x_(e,r,a,u)})),r.forEachGetter((function(t,n){var r=i+n;w_(e,r,t,u)})),r.forEachChild((function(r,o){__(e,t,n.concat(o),r,a)}))}function b_(e,t,n){var r=""===t,a={dispatch:r?e.dispatch:function(n,r,a){var o=L_(n,r,a),i=o.payload,l=o.options,s=o.type;if(l&&l.root||(s=t+s,e._actions[s]))return e.dispatch(s,i);console.error("[vuex] unknown local action type: "+o.type+", global type: "+s)},commit:r?e.commit:function(n,r,a){var o=L_(n,r,a),i=o.payload,l=o.options,s=o.type;l&&l.root||(s=t+s,e._mutations[s])?e.commit(s,i,l):console.error("[vuex] unknown local mutation type: "+o.type+", global type: "+s)}};return Object.defineProperties(a,{getters:{get:r?function(){return e.getters}:function(){return g_(e,t)}},state:{get:function(){return O_(e.state,n)}}}),a}function g_(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach((function(a){if(a.slice(0,r)===t){var o=a.slice(r);Object.defineProperty(n,o,{get:function(){return e.getters[a]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function y_(e,t,n,r){var a=e._mutations[t]||(e._mutations[t]=[]);a.push((function(t){n.call(e,r.state,t)}))}function x_(e,t,n,r){var a=e._actions[t]||(e._actions[t]=[]);a.push((function(t){var a=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},t);return d_(a)||(a=Promise.resolve(a)),e._devtoolHook?a.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):a}))}function w_(e,t,n,r){e._wrappedGetters[t]?console.error("[vuex] duplicate getter key: "+t):e._wrappedGetters[t]=function(e){return n(r.state,r.getters,e.state,e.getters)}}function M_(e){Object(i["watch"])((function(){return e._state.data}),(function(){f_(e._committing,"do not mutate vuex store state outside mutation handlers.")}),{deep:!0,flush:"sync"})}function O_(e,t){return t.reduce((function(e,t){return e[t]}),e)}function L_(e,t,n){return c_(e)&&e.type&&(n=t,t=e,e=e.type),f_("string"===typeof e,"expects string as the type, but found "+typeof e+"."),{type:e,payload:t,options:n}}var k_="vuex bindings",j_="vuex:mutations",T_="vuex:actions",S_="vuex",D_=0;function Y_(e,t){Kd({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[k_]},(function(n){n.addTimelineLayer({id:j_,label:"Vuex Mutations",color:C_}),n.addTimelineLayer({id:T_,label:"Vuex Actions",color:C_}),n.addInspector({id:S_,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===e&&n.inspectorId===S_)if(n.filter){var r=[];I_(r,t._modules.root,n.filter,""),n.rootNodes=r}else n.rootNodes=[R_(t._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===e&&n.inspectorId===S_){var r=n.nodeId;g_(t,r),n.state=H_(W_(t._modules,r),"root"===r?t.getters:t._makeLocalGettersCache,r)}})),n.on.editInspectorState((function(n){if(n.app===e&&n.inspectorId===S_){var r=n.nodeId,a=n.path;"root"!==r&&(a=r.split("/").filter(Boolean).concat(a)),t._withCommit((function(){n.set(t._state.data,a,n.state.value)}))}})),t.subscribe((function(e,t){var r={};e.payload&&(r.payload=e.payload),r.state=t,n.notifyComponentUpdate(),n.sendInspectorTree(S_),n.sendInspectorState(S_),n.addTimelineEvent({layerId:j_,event:{time:Date.now(),title:e.type,data:r}})})),t.subscribeAction({before:function(e,t){var r={};e.payload&&(r.payload=e.payload),e._id=D_++,e._time=Date.now(),r.state=t,n.addTimelineEvent({layerId:T_,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:r}})},after:function(e,t){var r={},a=Date.now()-e._time;r.duration={_custom:{type:"duration",display:a+"ms",tooltip:"Action duration",value:a}},e.payload&&(r.payload=e.payload),r.state=t,n.addTimelineEvent({layerId:T_,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:r}})}})}))}var C_=8702998,E_=6710886,P_=16777215,N_={label:"namespaced",textColor:P_,backgroundColor:E_};function A_(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function R_(e,t){return{id:t||"root",label:A_(t),tags:e.namespaced?[N_]:[],children:Object.keys(e._children).map((function(n){return R_(e._children[n],t+n+"/")}))}}function I_(e,t,n,r){r.includes(n)&&e.push({id:r||"root",label:r.endsWith("/")?r.slice(0,r.length-1):r||"Root",tags:t.namespaced?[N_]:[]}),Object.keys(t._children).forEach((function(a){I_(e,t._children[a],n,r+a+"/")}))}function H_(e,t,n){t="root"===n?t:t[n];var r=Object.keys(t),a={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(r.length){var o=F_(t);a.getters=Object.keys(o).map((function(e){return{key:e.endsWith("/")?A_(e):e,editable:!1,value:V_((function(){return o[e]}))}}))}return a}function F_(e){var t={};return Object.keys(e).forEach((function(n){var r=n.split("/");if(r.length>1){var a=t,o=r.pop();r.forEach((function(e){a[e]||(a[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),a=a[e]._custom.value})),a[o]=V_((function(){return e[n]}))}else t[n]=V_((function(){return e[n]}))})),t}function W_(e,t){var n=t.split("/").filter((function(e){return e}));return n.reduce((function(e,r,a){var o=e[r];if(!o)throw new Error('Missing module "'+r+'" for path "'+t+'".');return a===n.length-1?o:o._children}),"root"===t?e:e.root._children)}function V_(e){try{return e()}catch(t){return t}}var B_=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"===typeof n?n():n)||{}},z_={namespaced:{configurable:!0}};z_.namespaced.get=function(){return!!this._rawModule.namespaced},B_.prototype.addChild=function(e,t){this._children[e]=t},B_.prototype.removeChild=function(e){delete this._children[e]},B_.prototype.getChild=function(e){return this._children[e]},B_.prototype.hasChild=function(e){return e in this._children},B_.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},B_.prototype.forEachChild=function(e){u_(this._children,e)},B_.prototype.forEachGetter=function(e){this._rawModule.getters&&u_(this._rawModule.getters,e)},B_.prototype.forEachAction=function(e){this._rawModule.actions&&u_(this._rawModule.actions,e)},B_.prototype.forEachMutation=function(e){this._rawModule.mutations&&u_(this._rawModule.mutations,e)},Object.defineProperties(B_.prototype,z_);var U_=function(e){this.register([],e,!1)};function $_(e,t,n){if(X_(e,n),t.update(n),n.modules)for(var r in n.modules){if(!t.getChild(r))return void console.warn("[vuex] trying to add a new module '"+r+"' on hot reloading, manual reload is needed");$_(e.concat(r),t.getChild(r),n.modules[r])}}U_.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},U_.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return t=t.getChild(n),e+(t.namespaced?n+"/":"")}),"")},U_.prototype.update=function(e){$_([],this.root,e)},U_.prototype.register=function(e,t,n){var r=this;void 0===n&&(n=!0),X_(e,t);var a=new B_(t,n);if(0===e.length)this.root=a;else{var o=this.get(e.slice(0,-1));o.addChild(e[e.length-1],a)}t.modules&&u_(t.modules,(function(t,a){r.register(e.concat(a),t,n)}))},U_.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],r=t.getChild(n);r?r.runtime&&t.removeChild(n):console.warn("[vuex] trying to unregister module '"+n+"', which is not registered")},U_.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var q_={assert:function(e){return"function"===typeof e},expected:"function"},G_={assert:function(e){return"function"===typeof e||"object"===typeof e&&"function"===typeof e.handler},expected:'function or object with "handler" function'},J_={getters:q_,mutations:q_,actions:G_};function X_(e,t){Object.keys(J_).forEach((function(n){if(t[n]){var r=J_[n];u_(t[n],(function(t,a){f_(r.assert(t),K_(e,n,a,t,r.expected))}))}}))}function K_(e,t,n,r,a){var o=t+" should be "+a+' but "'+t+"."+n+'"';return e.length>0&&(o+=' in module "'+e.join(".")+'"'),o+=" is "+JSON.stringify(r)+".",o}var Z_=function e(t){var n=this;void 0===t&&(t={}),f_("undefined"!==typeof Promise,"vuex requires a Promise polyfill in this browser."),f_(this instanceof e,"store must be called with the new operator.");var r=t.plugins;void 0===r&&(r=[]);var a=t.strict;void 0===a&&(a=!1);var o=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new U_(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var i=this,l=this,s=l.dispatch,u=l.commit;this.dispatch=function(e,t){return s.call(i,e,t)},this.commit=function(e,t,n){return u.call(i,e,t,n)},this.strict=a;var c=this._modules.root.state;__(this,c,[],this._modules.root),v_(this,c),r.forEach((function(e){return e(n)}))},Q_={state:{configurable:!0}};Z_.prototype.install=function(e,t){e.provide(t||l_,this),e.config.globalProperties.$store=this;var n=void 0===this._devtools||this._devtools;n&&Y_(e,this)},Q_.state.get=function(){return this._state.data},Q_.state.set=function(e){f_(!1,"use store.replaceState() to explicit replace store state.")},Z_.prototype.commit=function(e,t,n){var r=this,a=L_(e,t,n),o=a.type,i=a.payload,l=a.options,s={type:o,payload:i},u=this._mutations[o];u?(this._withCommit((function(){u.forEach((function(e){e(i)}))})),this._subscribers.slice().forEach((function(e){return e(s,r.state)})),l&&l.silent&&console.warn("[vuex] mutation type: "+o+". Silent option has been removed. Use the filter functionality in the vue-devtools")):console.error("[vuex] unknown mutation type: "+o)},Z_.prototype.dispatch=function(e,t){var n=this,r=L_(e,t),a=r.type,o=r.payload,i={type:a,payload:o},l=this._actions[a];if(l){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(i,n.state)}))}catch(u){console.warn("[vuex] error in before action subscribers: "),console.error(u)}var s=l.length>1?Promise.all(l.map((function(e){return e(o)}))):l[0](o);return new Promise((function(e,t){s.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(i,n.state)}))}catch(u){console.warn("[vuex] error in after action subscribers: "),console.error(u)}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(i,n.state,e)}))}catch(u){console.warn("[vuex] error in error action subscribers: "),console.error(u)}t(e)}))}))}console.error("[vuex] unknown action type: "+a)},Z_.prototype.subscribe=function(e,t){return p_(e,this._subscribers,t)},Z_.prototype.subscribeAction=function(e,t){var n="function"===typeof e?{before:e}:e;return p_(n,this._actionSubscribers,t)},Z_.prototype.watch=function(e,t,n){var r=this;return f_("function"===typeof e,"store.watch only accepts a function."),Object(i["watch"])((function(){return e(r.state,r.getters)}),t,Object.assign({},n))},Z_.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},Z_.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"===typeof e&&(e=[e]),f_(Array.isArray(e),"module path must be a string or an Array."),f_(e.length>0,"cannot register the root module by using registerModule."),this._modules.register(e,t),__(this,this.state,e,this._modules.get(e),n.preserveState),v_(this,this.state)},Z_.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),f_(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit((function(){var n=O_(t.state,e.slice(0,-1));delete n[e[e.length-1]]})),h_(this)},Z_.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),f_(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},Z_.prototype.hotUpdate=function(e){this._modules.update(e),h_(this,!0)},Z_.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(Z_.prototype,Q_);nb((function(e,t){var n={};return tb(t)||console.error("[vuex] mapState: mapper parameter must be either an Array or an Object"),eb(t).forEach((function(t){var r=t.key,a=t.val;n[r]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var r=rb(this.$store,"mapState",e);if(!r)return;t=r.context.state,n=r.context.getters}return"function"===typeof a?a.call(this,t,n):t[a]},n[r].vuex=!0})),n})),nb((function(e,t){var n={};return tb(t)||console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),eb(t).forEach((function(t){var r=t.key,a=t.val;n[r]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var r=this.$store.commit;if(e){var o=rb(this.$store,"mapMutations",e);if(!o)return;r=o.context.commit}return"function"===typeof a?a.apply(this,[r].concat(t)):r.apply(this.$store,[a].concat(t))}})),n})),nb((function(e,t){var n={};return tb(t)||console.error("[vuex] mapGetters: mapper parameter must be either an Array or an Object"),eb(t).forEach((function(t){var r=t.key,a=t.val;a=e+a,n[r]=function(){if(!e||rb(this.$store,"mapGetters",e)){if(a in this.$store.getters)return this.$store.getters[a];console.error("[vuex] unknown getter: "+a)}},n[r].vuex=!0})),n})),nb((function(e,t){var n={};return tb(t)||console.error("[vuex] mapActions: mapper parameter must be either an Array or an Object"),eb(t).forEach((function(t){var r=t.key,a=t.val;n[r]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var r=this.$store.dispatch;if(e){var o=rb(this.$store,"mapActions",e);if(!o)return;r=o.context.dispatch}return"function"===typeof a?a.apply(this,[r].concat(t)):r.apply(this.$store,[a].concat(t))}})),n}));function eb(e){return tb(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function tb(e){return Array.isArray(e)||c_(e)}function nb(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function rb(e,t,n){var r=e._modulesNamespaceMap[n];return r||console.error("[vuex] module namespace not found in "+t+"(): "+n),r}function ab(e){return new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=e=>n(e)})}var ob=Object(i["defineComponent"])({name:"custom-file-upload",components:{PlusOutlined:e_,UploadOutlined:i_},props:{fileList:{type:Array},limit:{type:Number,default:1},accept:{type:String,default:""},max:{type:Number,default:2048},disabled:{type:Boolean,default:!1},listType:{type:String,default:"text"}},emits:["update:fileList"],setup(e,t){const n=s_(),r="https://testapi.huajianlian.com/swiper/upload",a={authorization:n.getters.authorization},o=Object(i["ref"])(),l=Object(i["ref"])(),s=Object(i["ref"])(e.accept),u=Object(i["ref"])(e.limit),c=Object(i["ref"])(e.listType),d=Object(i["ref"])(e.disabled),f=Object(i["ref"])(!1),m=Object(i["ref"])("");Object(i["onMounted"])(()=>{l.value=e.fileList,o.value=e.fileList});const p=t=>{console.log("----in before-upload----"+t);let n=e.max&&e.max>0;if(n){if(n&&t.size/1024>e.max)return Ur.error(`文件大小超出限制, ${t.size/1024}k 大于 ${e.max}k`),!1}else console.log("文件大小和类型无限制");return!0},h=()=>{f.value=!1},v=async e=>{"picture-card"===c.value?(e.url||e.preview||(e.preview=await ab(e.originFileObj)),m.value=e.url||e.preview,f.value=!0):(console.log("------downloadRes----",e.url),_(e.url,e.realfilename))},_=async(e,t)=>{let n=await fetch(e),r=await n.blob(),a=window.URL.createObjectURL(r),o=document.createElement("a");o.href=a,o.download=t,o.click(),o.remove()},b=e=>{if(console.log("----upload change----",e),"done"===e.file.status){const t={uid:e.file.uid,name:e.file.response.data.fileName,realfilename:e.file.response.data.realfilename,status:"done",url:e.file.response.data.dest+e.file.response.data.fileName};o.value.push(t)}else"removed"===e.file.status&&(o.value=o.value.filter(t=>t.uid!==e.file.uid));console.log("------handlechange---r_fileList-",o.value),t.emit("update:fileList",l.value)};return{url:r,headers:a,previewVisible:f,previewImage:m,c_fileList:l,c_limit:u,c_accept:s,c_listType:c,c_disabled:d,handleCancel:h,handlePreview:v,handleChange:b,beforeUpload:p}}});n("332f");const ib=Ya()(ob,[["render",Gv]]);var lb=ib;lb.install=function(e){e.component(lb.name,lb)};var sb=lb;Ea.install=function(e){e.component(Ea.name,Ea)};var ub=Ea,cb=n("0251"),db=n("b7e8"),fb=n.n(db),mb=n("591a"),pb=n.n(mb);const hb={zh_cn:{...fb.a},en_us:{...pb.a}},vb=Object(cb["createI18n"])({locale:Gr.getO("language")||"zh_cn",messages:hb});var _b=vb;n("778e");const bb=[ch,dh,vh,Bv,sb,ub],gb=e=>{Rd.setup({i18n:(e,t)=>_b.global.t(e,t)}),e.use(Rd),bb.map(t=>e.component(t.name,t))};var yb={install:gb,CustomTable:ch,CustomButtons:dh,CustomSelect:vh,CustomSelectH:Bv,CustomFileUpload:sb,CustomIcon:ub};t["default"]=yb},fbf1:function(e,t,n){"use strict";
|
|
332
|
+
*/function s_(e){return void 0===e&&(e=null),Object(i["inject"])(null!==e?e:l_)}function u_(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function c_(e){return null!==e&&"object"===typeof e}function d_(e){return e&&"function"===typeof e.then}function f_(e,t){if(!e)throw new Error("[vuex] "+t)}function m_(e,t){return function(){return e(t)}}function p_(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function h_(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;__(e,n,[],e._modules.root,!0),v_(e,n,t)}function v_(e,t,n){var r=e._state,a=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var o=e._wrappedGetters,l={},s={},u=Object(i["effectScope"])(!0);u.run((function(){u_(o,(function(t,n){l[n]=m_(t,e),s[n]=Object(i["computed"])((function(){return l[n]()})),Object.defineProperty(e.getters,n,{get:function(){return s[n].value},enumerable:!0})}))})),e._state=Object(i["reactive"])({data:t}),e._scope=u,e.strict&&M_(e),r&&n&&e._withCommit((function(){r.data=null})),a&&a.stop()}function __(e,t,n,r,a){var o=!n.length,i=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[i]&&console.error("[vuex] duplicate namespace "+i+" for the namespaced module "+n.join("/")),e._modulesNamespaceMap[i]=r),!o&&!a){var l=O_(t,n.slice(0,-1)),s=n[n.length-1];e._withCommit((function(){s in l&&console.warn('[vuex] state field "'+s+'" was overridden by a module with the same name at "'+n.join(".")+'"'),l[s]=r.state}))}var u=r.context=b_(e,i,n);r.forEachMutation((function(t,n){var r=i+n;y_(e,r,t,u)})),r.forEachAction((function(t,n){var r=t.root?n:i+n,a=t.handler||t;x_(e,r,a,u)})),r.forEachGetter((function(t,n){var r=i+n;w_(e,r,t,u)})),r.forEachChild((function(r,o){__(e,t,n.concat(o),r,a)}))}function b_(e,t,n){var r=""===t,a={dispatch:r?e.dispatch:function(n,r,a){var o=L_(n,r,a),i=o.payload,l=o.options,s=o.type;if(l&&l.root||(s=t+s,e._actions[s]))return e.dispatch(s,i);console.error("[vuex] unknown local action type: "+o.type+", global type: "+s)},commit:r?e.commit:function(n,r,a){var o=L_(n,r,a),i=o.payload,l=o.options,s=o.type;l&&l.root||(s=t+s,e._mutations[s])?e.commit(s,i,l):console.error("[vuex] unknown local mutation type: "+o.type+", global type: "+s)}};return Object.defineProperties(a,{getters:{get:r?function(){return e.getters}:function(){return g_(e,t)}},state:{get:function(){return O_(e.state,n)}}}),a}function g_(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach((function(a){if(a.slice(0,r)===t){var o=a.slice(r);Object.defineProperty(n,o,{get:function(){return e.getters[a]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function y_(e,t,n,r){var a=e._mutations[t]||(e._mutations[t]=[]);a.push((function(t){n.call(e,r.state,t)}))}function x_(e,t,n,r){var a=e._actions[t]||(e._actions[t]=[]);a.push((function(t){var a=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},t);return d_(a)||(a=Promise.resolve(a)),e._devtoolHook?a.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):a}))}function w_(e,t,n,r){e._wrappedGetters[t]?console.error("[vuex] duplicate getter key: "+t):e._wrappedGetters[t]=function(e){return n(r.state,r.getters,e.state,e.getters)}}function M_(e){Object(i["watch"])((function(){return e._state.data}),(function(){f_(e._committing,"do not mutate vuex store state outside mutation handlers.")}),{deep:!0,flush:"sync"})}function O_(e,t){return t.reduce((function(e,t){return e[t]}),e)}function L_(e,t,n){return c_(e)&&e.type&&(n=t,t=e,e=e.type),f_("string"===typeof e,"expects string as the type, but found "+typeof e+"."),{type:e,payload:t,options:n}}var k_="vuex bindings",j_="vuex:mutations",T_="vuex:actions",S_="vuex",D_=0;function Y_(e,t){Kd({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[k_]},(function(n){n.addTimelineLayer({id:j_,label:"Vuex Mutations",color:C_}),n.addTimelineLayer({id:T_,label:"Vuex Actions",color:C_}),n.addInspector({id:S_,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===e&&n.inspectorId===S_)if(n.filter){var r=[];I_(r,t._modules.root,n.filter,""),n.rootNodes=r}else n.rootNodes=[R_(t._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===e&&n.inspectorId===S_){var r=n.nodeId;g_(t,r),n.state=H_(W_(t._modules,r),"root"===r?t.getters:t._makeLocalGettersCache,r)}})),n.on.editInspectorState((function(n){if(n.app===e&&n.inspectorId===S_){var r=n.nodeId,a=n.path;"root"!==r&&(a=r.split("/").filter(Boolean).concat(a)),t._withCommit((function(){n.set(t._state.data,a,n.state.value)}))}})),t.subscribe((function(e,t){var r={};e.payload&&(r.payload=e.payload),r.state=t,n.notifyComponentUpdate(),n.sendInspectorTree(S_),n.sendInspectorState(S_),n.addTimelineEvent({layerId:j_,event:{time:Date.now(),title:e.type,data:r}})})),t.subscribeAction({before:function(e,t){var r={};e.payload&&(r.payload=e.payload),e._id=D_++,e._time=Date.now(),r.state=t,n.addTimelineEvent({layerId:T_,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:r}})},after:function(e,t){var r={},a=Date.now()-e._time;r.duration={_custom:{type:"duration",display:a+"ms",tooltip:"Action duration",value:a}},e.payload&&(r.payload=e.payload),r.state=t,n.addTimelineEvent({layerId:T_,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:r}})}})}))}var C_=8702998,E_=6710886,P_=16777215,N_={label:"namespaced",textColor:P_,backgroundColor:E_};function A_(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function R_(e,t){return{id:t||"root",label:A_(t),tags:e.namespaced?[N_]:[],children:Object.keys(e._children).map((function(n){return R_(e._children[n],t+n+"/")}))}}function I_(e,t,n,r){r.includes(n)&&e.push({id:r||"root",label:r.endsWith("/")?r.slice(0,r.length-1):r||"Root",tags:t.namespaced?[N_]:[]}),Object.keys(t._children).forEach((function(a){I_(e,t._children[a],n,r+a+"/")}))}function H_(e,t,n){t="root"===n?t:t[n];var r=Object.keys(t),a={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(r.length){var o=F_(t);a.getters=Object.keys(o).map((function(e){return{key:e.endsWith("/")?A_(e):e,editable:!1,value:V_((function(){return o[e]}))}}))}return a}function F_(e){var t={};return Object.keys(e).forEach((function(n){var r=n.split("/");if(r.length>1){var a=t,o=r.pop();r.forEach((function(e){a[e]||(a[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),a=a[e]._custom.value})),a[o]=V_((function(){return e[n]}))}else t[n]=V_((function(){return e[n]}))})),t}function W_(e,t){var n=t.split("/").filter((function(e){return e}));return n.reduce((function(e,r,a){var o=e[r];if(!o)throw new Error('Missing module "'+r+'" for path "'+t+'".');return a===n.length-1?o:o._children}),"root"===t?e:e.root._children)}function V_(e){try{return e()}catch(t){return t}}var B_=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"===typeof n?n():n)||{}},z_={namespaced:{configurable:!0}};z_.namespaced.get=function(){return!!this._rawModule.namespaced},B_.prototype.addChild=function(e,t){this._children[e]=t},B_.prototype.removeChild=function(e){delete this._children[e]},B_.prototype.getChild=function(e){return this._children[e]},B_.prototype.hasChild=function(e){return e in this._children},B_.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},B_.prototype.forEachChild=function(e){u_(this._children,e)},B_.prototype.forEachGetter=function(e){this._rawModule.getters&&u_(this._rawModule.getters,e)},B_.prototype.forEachAction=function(e){this._rawModule.actions&&u_(this._rawModule.actions,e)},B_.prototype.forEachMutation=function(e){this._rawModule.mutations&&u_(this._rawModule.mutations,e)},Object.defineProperties(B_.prototype,z_);var U_=function(e){this.register([],e,!1)};function $_(e,t,n){if(X_(e,n),t.update(n),n.modules)for(var r in n.modules){if(!t.getChild(r))return void console.warn("[vuex] trying to add a new module '"+r+"' on hot reloading, manual reload is needed");$_(e.concat(r),t.getChild(r),n.modules[r])}}U_.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},U_.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return t=t.getChild(n),e+(t.namespaced?n+"/":"")}),"")},U_.prototype.update=function(e){$_([],this.root,e)},U_.prototype.register=function(e,t,n){var r=this;void 0===n&&(n=!0),X_(e,t);var a=new B_(t,n);if(0===e.length)this.root=a;else{var o=this.get(e.slice(0,-1));o.addChild(e[e.length-1],a)}t.modules&&u_(t.modules,(function(t,a){r.register(e.concat(a),t,n)}))},U_.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],r=t.getChild(n);r?r.runtime&&t.removeChild(n):console.warn("[vuex] trying to unregister module '"+n+"', which is not registered")},U_.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var q_={assert:function(e){return"function"===typeof e},expected:"function"},G_={assert:function(e){return"function"===typeof e||"object"===typeof e&&"function"===typeof e.handler},expected:'function or object with "handler" function'},J_={getters:q_,mutations:q_,actions:G_};function X_(e,t){Object.keys(J_).forEach((function(n){if(t[n]){var r=J_[n];u_(t[n],(function(t,a){f_(r.assert(t),K_(e,n,a,t,r.expected))}))}}))}function K_(e,t,n,r,a){var o=t+" should be "+a+' but "'+t+"."+n+'"';return e.length>0&&(o+=' in module "'+e.join(".")+'"'),o+=" is "+JSON.stringify(r)+".",o}var Z_=function e(t){var n=this;void 0===t&&(t={}),f_("undefined"!==typeof Promise,"vuex requires a Promise polyfill in this browser."),f_(this instanceof e,"store must be called with the new operator.");var r=t.plugins;void 0===r&&(r=[]);var a=t.strict;void 0===a&&(a=!1);var o=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new U_(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var i=this,l=this,s=l.dispatch,u=l.commit;this.dispatch=function(e,t){return s.call(i,e,t)},this.commit=function(e,t,n){return u.call(i,e,t,n)},this.strict=a;var c=this._modules.root.state;__(this,c,[],this._modules.root),v_(this,c),r.forEach((function(e){return e(n)}))},Q_={state:{configurable:!0}};Z_.prototype.install=function(e,t){e.provide(t||l_,this),e.config.globalProperties.$store=this;var n=void 0===this._devtools||this._devtools;n&&Y_(e,this)},Q_.state.get=function(){return this._state.data},Q_.state.set=function(e){f_(!1,"use store.replaceState() to explicit replace store state.")},Z_.prototype.commit=function(e,t,n){var r=this,a=L_(e,t,n),o=a.type,i=a.payload,l=a.options,s={type:o,payload:i},u=this._mutations[o];u?(this._withCommit((function(){u.forEach((function(e){e(i)}))})),this._subscribers.slice().forEach((function(e){return e(s,r.state)})),l&&l.silent&&console.warn("[vuex] mutation type: "+o+". Silent option has been removed. Use the filter functionality in the vue-devtools")):console.error("[vuex] unknown mutation type: "+o)},Z_.prototype.dispatch=function(e,t){var n=this,r=L_(e,t),a=r.type,o=r.payload,i={type:a,payload:o},l=this._actions[a];if(l){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(i,n.state)}))}catch(u){console.warn("[vuex] error in before action subscribers: "),console.error(u)}var s=l.length>1?Promise.all(l.map((function(e){return e(o)}))):l[0](o);return new Promise((function(e,t){s.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(i,n.state)}))}catch(u){console.warn("[vuex] error in after action subscribers: "),console.error(u)}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(i,n.state,e)}))}catch(u){console.warn("[vuex] error in error action subscribers: "),console.error(u)}t(e)}))}))}console.error("[vuex] unknown action type: "+a)},Z_.prototype.subscribe=function(e,t){return p_(e,this._subscribers,t)},Z_.prototype.subscribeAction=function(e,t){var n="function"===typeof e?{before:e}:e;return p_(n,this._actionSubscribers,t)},Z_.prototype.watch=function(e,t,n){var r=this;return f_("function"===typeof e,"store.watch only accepts a function."),Object(i["watch"])((function(){return e(r.state,r.getters)}),t,Object.assign({},n))},Z_.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},Z_.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"===typeof e&&(e=[e]),f_(Array.isArray(e),"module path must be a string or an Array."),f_(e.length>0,"cannot register the root module by using registerModule."),this._modules.register(e,t),__(this,this.state,e,this._modules.get(e),n.preserveState),v_(this,this.state)},Z_.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),f_(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit((function(){var n=O_(t.state,e.slice(0,-1));delete n[e[e.length-1]]})),h_(this)},Z_.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),f_(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},Z_.prototype.hotUpdate=function(e){this._modules.update(e),h_(this,!0)},Z_.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(Z_.prototype,Q_);nb((function(e,t){var n={};return tb(t)||console.error("[vuex] mapState: mapper parameter must be either an Array or an Object"),eb(t).forEach((function(t){var r=t.key,a=t.val;n[r]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var r=rb(this.$store,"mapState",e);if(!r)return;t=r.context.state,n=r.context.getters}return"function"===typeof a?a.call(this,t,n):t[a]},n[r].vuex=!0})),n})),nb((function(e,t){var n={};return tb(t)||console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),eb(t).forEach((function(t){var r=t.key,a=t.val;n[r]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var r=this.$store.commit;if(e){var o=rb(this.$store,"mapMutations",e);if(!o)return;r=o.context.commit}return"function"===typeof a?a.apply(this,[r].concat(t)):r.apply(this.$store,[a].concat(t))}})),n})),nb((function(e,t){var n={};return tb(t)||console.error("[vuex] mapGetters: mapper parameter must be either an Array or an Object"),eb(t).forEach((function(t){var r=t.key,a=t.val;a=e+a,n[r]=function(){if(!e||rb(this.$store,"mapGetters",e)){if(a in this.$store.getters)return this.$store.getters[a];console.error("[vuex] unknown getter: "+a)}},n[r].vuex=!0})),n})),nb((function(e,t){var n={};return tb(t)||console.error("[vuex] mapActions: mapper parameter must be either an Array or an Object"),eb(t).forEach((function(t){var r=t.key,a=t.val;n[r]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var r=this.$store.dispatch;if(e){var o=rb(this.$store,"mapActions",e);if(!o)return;r=o.context.dispatch}return"function"===typeof a?a.apply(this,[r].concat(t)):r.apply(this.$store,[a].concat(t))}})),n}));function eb(e){return tb(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function tb(e){return Array.isArray(e)||c_(e)}function nb(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function rb(e,t,n){var r=e._modulesNamespaceMap[n];return r||console.error("[vuex] module namespace not found in "+t+"(): "+n),r}function ab(e){return new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=e=>n(e)})}var ob=Object(i["defineComponent"])({name:"custom-file-upload",components:{PlusOutlined:e_,UploadOutlined:i_},props:{fileList:{type:Array},limit:{type:Number,default:1},accept:{type:String,default:""},max:{type:Number,default:2048},disabled:{type:Boolean,default:!1},listType:{type:String,default:"text"}},emits:["update:fileList"],setup(e,t){const n=s_(),r="https://testapi.huajianlian.com/swiper/upload",a={authorization:n.getters.authorization},o=Object(i["ref"])(),l=Object(i["ref"])(),s=Object(i["ref"])(e.accept),u=Object(i["ref"])(e.limit),c=Object(i["ref"])(e.listType),d=Object(i["ref"])(e.disabled),f=Object(i["ref"])(!1),m=Object(i["ref"])("");Object(i["onMounted"])(()=>{l.value=e.fileList,o.value=e.fileList});const p=t=>{console.log("----in before-upload----"+t);let n=e.max&&e.max>0;if(n){if(n&&t.size/1024>e.max)return Ur.error(`文件大小超出限制, ${t.size/1024}k 大于 ${e.max}k`),!1}else console.log("文件大小和类型无限制");return!0},h=()=>{f.value=!1},v=async e=>{"picture-card"===c.value?(e.url||e.preview||(e.preview=await ab(e.originFileObj)),m.value=e.url||e.preview,f.value=!0):(console.log("------downloadRes----",e.url),_(e.url,e.realfilename))},_=async(e,t)=>{let n=await fetch(e),r=await n.blob(),a=window.URL.createObjectURL(r),o=document.createElement("a");o.href=a,o.download=t,o.click(),o.remove()},b=e=>{if(console.log("----upload change----",e),"done"===e.file.status){const t={uid:e.file.uid,name:e.file.response.data.fileName,realfilename:e.file.response.data.realfilename,status:"done",url:e.file.response.data.dest+e.file.response.data.fileName};o.value.push(t)}else"removed"===e.file.status&&(o.value=o.value.filter(t=>t.uid!==e.file.uid));console.log("------handlechange---r_fileList-",o.value),t.emit("update:fileList",l.value)};return{url:r,headers:a,previewVisible:f,previewImage:m,c_fileList:l,c_limit:u,c_accept:s,c_listType:c,c_disabled:d,handleCancel:h,handlePreview:v,handleChange:b,beforeUpload:p}}});n("332f");const ib=Ya()(ob,[["render",Gv]]);var lb=ib;lb.install=function(e){e.component(lb.name,lb)};var sb=lb;Ea.install=function(e){e.component(Ea.name,Ea)};var ub=Ea,cb=n("0251"),db=n("b7e8"),fb=n.n(db),mb=n("591a"),pb=n.n(mb);const hb={zh_cn:{...fb.a},en_us:{...pb.a}},vb=Object(cb["createI18n"])({legacy:!1,globalInjection:!0,locale:Gr.getO("language")||"zh_cn",messages:hb});var _b=vb;n("778e");const bb=[ch,dh,vh,Bv,sb,ub],gb=e=>{Rd.setup({i18n:(e,t)=>_b.global.t(e,t)}),e.use(Rd),bb.map(t=>e.component(t.name,t))};var yb={install:gb,CustomTable:ch,CustomButtons:dh,CustomSelect:vh,CustomSelectH:Bv,CustomFileUpload:sb,CustomIcon:ub};t["default"]=yb},fbf1:function(e,t,n){"use strict";
|
|
333
333
|
/*!
|
|
334
334
|
* vue-i18n v9.2.0-beta.26
|
|
335
335
|
* (c) 2021 kazuya kawaguchi
|