@vxe-ui/core 4.0.3 → 4.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/README.en.md +1 -1
- package/README.md +1 -1
- package/README.zh-TW.md +1 -1
- package/es/src/core.js +6 -1
- package/es/src/log.js +1 -1
- package/lib/index.umd.js +10 -4
- package/lib/index.umd.min.js +1 -1
- package/lib/src/core.js +8 -1
- package/lib/src/core.min.js +1 -1
- package/lib/src/log.js +1 -1
- package/lib/src/log.min.js +1 -1
- package/package.json +2 -4
- package/packages/src/core.ts +7 -0
- package/types/core/index.d.ts +8 -1
- package/types/core/useFn.d.ts +1 -1
package/README.en.md
CHANGED
package/README.md
CHANGED
package/README.zh-TW.md
CHANGED
package/es/src/core.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import DomZIndex from 'dom-zindex';
|
|
3
|
+
import { createCommentVNode } from 'vue';
|
|
3
4
|
import { globalConfigStore } from './globalStore';
|
|
4
5
|
import { iconConfigStore } from './iconStore';
|
|
5
6
|
import { themeConfigStore } from './themeStore';
|
|
@@ -70,7 +71,7 @@ export function setIcon(options) {
|
|
|
70
71
|
export function getIcon(key) {
|
|
71
72
|
return arguments.length ? XEUtils.get(iconConfigStore, key) : iconConfigStore;
|
|
72
73
|
}
|
|
73
|
-
export const coreVersion = "4.0.
|
|
74
|
+
export const coreVersion = "4.0.5";
|
|
74
75
|
const installedPlugins = [];
|
|
75
76
|
export function use(Plugin, options) {
|
|
76
77
|
if (Plugin && Plugin.install) {
|
|
@@ -90,8 +91,12 @@ export function component(comp) {
|
|
|
90
91
|
components[comp.name] = comp;
|
|
91
92
|
}
|
|
92
93
|
}
|
|
94
|
+
export function renderHolderElement() {
|
|
95
|
+
return createCommentVNode();
|
|
96
|
+
}
|
|
93
97
|
export const VxeUI = {
|
|
94
98
|
coreVersion,
|
|
99
|
+
renderHolderElement,
|
|
95
100
|
setTheme,
|
|
96
101
|
getTheme,
|
|
97
102
|
setConfig,
|
package/es/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -1693,6 +1693,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1693
1693
|
log: function() { return /* reexport */ log; },
|
|
1694
1694
|
menus: function() { return /* reexport */ menus; },
|
|
1695
1695
|
permission: function() { return /* reexport */ permission; },
|
|
1696
|
+
renderHolderElement: function() { return /* reexport */ renderHolderElement; },
|
|
1696
1697
|
renderer: function() { return /* reexport */ renderer; },
|
|
1697
1698
|
setConfig: function() { return /* reexport */ setConfig; },
|
|
1698
1699
|
setI18n: function() { return /* reexport */ setI18n; },
|
|
@@ -1838,6 +1839,8 @@ var DomZIndex = {
|
|
|
1838
1839
|
getMax: getDomMaxZIndex
|
|
1839
1840
|
};
|
|
1840
1841
|
/* harmony default export */ var index_esm = (DomZIndex);
|
|
1842
|
+
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
1843
|
+
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(9274);
|
|
1841
1844
|
;// CONCATENATED MODULE: ./packages/src/globalStore.ts
|
|
1842
1845
|
const globalConfigStore = {
|
|
1843
1846
|
size: '',
|
|
@@ -1851,8 +1854,6 @@ const iconConfigStore = {};
|
|
|
1851
1854
|
const themeConfigStore = {
|
|
1852
1855
|
theme: ''
|
|
1853
1856
|
};
|
|
1854
|
-
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
1855
|
-
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(9274);
|
|
1856
1857
|
;// CONCATENATED MODULE: ./packages/src/i18nStore.ts
|
|
1857
1858
|
|
|
1858
1859
|
const i18nConfigStore = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
|
|
@@ -2129,7 +2130,7 @@ function createLog(type, name) {
|
|
|
2129
2130
|
return msg;
|
|
2130
2131
|
};
|
|
2131
2132
|
}
|
|
2132
|
-
const version = "4.0.
|
|
2133
|
+
const version = "4.0.5";
|
|
2133
2134
|
const log = {
|
|
2134
2135
|
create: createLog,
|
|
2135
2136
|
warn: createLog('warn', `v${version}`),
|
|
@@ -2619,6 +2620,7 @@ const useFns = {
|
|
|
2619
2620
|
|
|
2620
2621
|
|
|
2621
2622
|
|
|
2623
|
+
|
|
2622
2624
|
|
|
2623
2625
|
|
|
2624
2626
|
function setTheme(name) {
|
|
@@ -2673,7 +2675,7 @@ function setIcon(options) {
|
|
|
2673
2675
|
function getIcon(key) {
|
|
2674
2676
|
return arguments.length ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(iconConfigStore, key) : iconConfigStore;
|
|
2675
2677
|
}
|
|
2676
|
-
const coreVersion = "4.0.
|
|
2678
|
+
const coreVersion = "4.0.5";
|
|
2677
2679
|
const installedPlugins = [];
|
|
2678
2680
|
function use(Plugin, options) {
|
|
2679
2681
|
if (Plugin && Plugin.install) {
|
|
@@ -2693,8 +2695,12 @@ function component(comp) {
|
|
|
2693
2695
|
components[comp.name] = comp;
|
|
2694
2696
|
}
|
|
2695
2697
|
}
|
|
2698
|
+
function renderHolderElement() {
|
|
2699
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)();
|
|
2700
|
+
}
|
|
2696
2701
|
const VxeUI = {
|
|
2697
2702
|
coreVersion,
|
|
2703
|
+
renderHolderElement,
|
|
2698
2704
|
setTheme,
|
|
2699
2705
|
getTheme,
|
|
2700
2706
|
setConfig,
|
package/lib/index.umd.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue"),require("xe-utils")):"function"==typeof define&&define.amd?define([,"xe-utils"],e):"object"==typeof exports?exports.VxeCore=e(require("vue"),require("xe-utils")):t.VxeCore=e(t.Vue,t.XEUtils)}("undefined"!=typeof self?self:this,function(Ct,Tt){return function(){"use strict";var i={9274:function(t){t.exports=Ct},8871:function(t){t.exports=Tt},9306:function(t,e,n){var r=n(4901),o=n(6823),i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not a function")}},8551:function(t,e,n){var r=n(34),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not an object")}},9617:function(t,e,n){function r(c){return function(t,e,n){var r=a(t),o=f(r);if(0!==o){var i,u=s(n,o);if(c&&e!=e){for(;u<o;)if((i=r[u++])!=i)return!0}else for(;u<o;u++)if((c||u in r)&&r[u]===e)return c||u||0}return!c&&-1}}var a=n(5397),s=n(5610),f=n(6198);t.exports={includes:r(!0),indexOf:r(!1)}},4527:function(t,e,n){var r=n(3724),o=n(4376),i=TypeError,u=Object.getOwnPropertyDescriptor,n=r&&!function(){if(void 0!==this)return 1;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=n?function(t,e){if(o(t)&&!u(t,"length").writable)throw new i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},4576:function(t,e,n){var n=n(9504),r=n({}.toString),o=n("".slice);t.exports=function(t){return o(r(t),8,-1)}},7740:function(t,e,n){var a=n(9297),s=n(5031),f=n(7347),l=n(4913);t.exports=function(t,e,n){for(var r=s(e),o=l.f,i=f.f,u=0;u<r.length;u++){var c=r[u];a(t,c)||n&&a(n,c)||o(t,c,i(e,c))}}},6699:function(t,e,n){var r=n(3724),o=n(4913),i=n(6980);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},6980:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6840:function(t,e,n){var u=n(4901),c=n(4913),a=n(283),s=n(9433);t.exports=function(t,e,n,r){var o=(r=r||{}).enumerable,i=void 0!==r.name?r.name:e;if(u(n)&&a(n,i,r),r.global)o?t[e]=n:s(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:c.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t}},9433:function(t,e,n){var r=n(4475),o=Object.defineProperty;t.exports=function(e,n){try{o(r,e,{value:n,configurable:!0,writable:!0})}catch(t){r[e]=n}return n}},3724:function(t,e,n){n=n(9039);t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},4055:function(t,e,n){var r=n(4475),n=n(34),o=r.document,i=n(o)&&n(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},6837:function(t){var e=TypeError;t.exports=function(t){if(9007199254740991<t)throw e("Maximum allowed index exceeded");return t}},9392:function(t){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7388:function(t,e,n){var r,o,i=n(4475),n=n(9392),u=i.process,i=i.Deno,u=u&&u.versions||i&&i.version,i=u&&u.v8;!(o=i?0<(r=i.split("."))[0]&&r[0]<4?1:+(r[0]+r[1]):o)&&n&&(!(r=n.match(/Edge\/(\d+)/))||74<=r[1])&&(r=n.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},8727:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:function(t,e,n){var s=n(4475),f=n(7347).f,l=n(6699),p=n(6840),d=n(9433),h=n(7740),v=n(2796);t.exports=function(t,e){var n,r,o,i=t.target,u=t.global,c=t.stat,a=u?s:c?s[i]||d(i,{}):s[i]&&s[i].prototype;if(a)for(n in e){if(r=e[n],o=t.dontCallGetSet?(o=f(a,n))&&o.value:a[n],!v(u?n:i+(c?".":"#")+n,t.forced)&&void 0!==o){if(typeof r==typeof o)continue;h(r,o)}(t.sham||o&&o.sham)&&l(r,"sham",!0),p(a,n,r,t)}}},9039:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},616:function(t,e,n){n=n(9039);t.exports=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},9565:function(t,e,n){var n=n(616),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},350:function(t,e,n){var r=n(3724),n=n(9297),o=Function.prototype,i=r&&Object.getOwnPropertyDescriptor,n=n(o,"name"),u=n&&"something"===function(){}.name,r=n&&(!r||i(o,"name").configurable);t.exports={EXISTS:n,PROPER:u,CONFIGURABLE:r}},9504:function(t,e,n){var n=n(616),r=Function.prototype,o=r.call,r=n&&r.bind.bind(o,o);t.exports=n?r:function(t){return function(){return o.apply(t,arguments)}}},7751:function(t,e,n){var r=n(4475),o=n(4901);t.exports=function(t,e){return arguments.length<2?(n=r[t],o(n)?n:void 0):r[t]&&r[t][e];var n}},5966:function(t,e,n){var r=n(9306),o=n(4117);t.exports=function(t,e){t=t[e];return o(t)?void 0:r(t)}},4475:function(t,e,n){function r(t){return t&&t.Math===Math&&t}t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:function(t,e,n){var r=n(9504),o=n(8981),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},421:function(t){t.exports={}},5917:function(t,e,n){var r=n(3724),o=n(9039),i=n(4055);t.exports=!r&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},7055:function(t,e,n){var r=n(9504),o=n(9039),i=n(4576),u=Object,c=r("".split);t.exports=o(function(){return!u("z").propertyIsEnumerable(0)})?function(t){return"String"===i(t)?c(t,""):u(t)}:u},3706:function(t,e,n){var r=n(9504),o=n(4901),n=n(7629),i=r(Function.toString);o(n.inspectSource)||(n.inspectSource=function(t){return i(t)}),t.exports=n.inspectSource},1181:function(t,e,n){var r,o,i,u,c=n(8622),a=n(4475),s=n(34),f=n(6699),l=n(9297),p=n(7629),d=n(6119),n=n(421),h="Object already initialized",v=a.TypeError,a=a.WeakMap,g=c||p.state?((i=p.state||(p.state=new a)).get=i.get,i.has=i.has,i.set=i.set,r=function(t,e){if(i.has(t))throw new v(h);return e.facade=t,i.set(t,e),e},o=function(t){return i.get(t)||{}},function(t){return i.has(t)}):(n[u=d("state")]=!0,r=function(t,e){if(l(t,u))throw new v(h);return e.facade=t,f(t,u,e),e},o=function(t){return l(t,u)?t[u]:{}},function(t){return l(t,u)});t.exports={set:r,get:o,has:g,enforce:function(t){return g(t)?o(t):r(t,{})},getterFor:function(e){return function(t){if(s(t)&&(t=o(t)).type===e)return t;throw new v("Incompatible receiver, "+e+" required")}}}},4376:function(t,e,n){var r=n(4576);t.exports=Array.isArray||function(t){return"Array"===r(t)}},4901:function(t){var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},2796:function(t,e,n){function r(t,e){return(t=a[c(t)])===f||t!==s&&(i(e)?o(e):!!e)}var o=n(9039),i=n(4901),u=/#|\.prototype\./,c=r.normalize=function(t){return String(t).replace(u,".").toLowerCase()},a=r.data={},s=r.NATIVE="N",f=r.POLYFILL="P";t.exports=r},4117:function(t){t.exports=function(t){return null==t}},34:function(t,e,n){var r=n(4901);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},6395:function(t){t.exports=!1},757:function(t,e,n){var r=n(7751),o=n(4901),i=n(1625),n=n(7040),u=Object;t.exports=n?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,u(t))}},6198:function(t,e,n){var r=n(8014);t.exports=function(t){return r(t.length)}},283:function(t,e,n){var r=n(9504),o=n(9039),i=n(4901),u=n(9297),c=n(3724),a=n(350).CONFIGURABLE,s=n(3706),n=n(1181),f=n.enforce,l=n.get,p=String,d=Object.defineProperty,h=r("".slice),v=r("".replace),g=r([].join),m=c&&!o(function(){return 8!==d(function(){},"length",{value:8}).length}),b=String(String).split("String"),n=t.exports=function(t,e,n){"Symbol("===h(p(e),0,7)&&(e="["+v(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!u(t,"name")||a&&t.name!==e)&&(c?d(t,"name",{value:e,configurable:!0}):t.name=e),m&&n&&u(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&u(n,"constructor")&&n.constructor?c&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}n=f(t);return u(n,"source")||(n.source=g(b,"string"==typeof e?e:"")),t};Function.prototype.toString=n(function(){return i(this)&&l(this).source||s(this)},"toString")},741:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){t=+t;return(0<t?n:e)(t)}},4913:function(t,e,n){var r=n(3724),o=n(5917),i=n(8686),u=n(8551),c=n(6969),a=TypeError,s=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",p="configurable",d="writable";e.f=r?i?function(t,e,n){var r;return u(t),e=c(e),u(n),"function"==typeof t&&"prototype"===e&&"value"in n&&d in n&&!n[d]&&(r=f(t,e))&&r[d]&&(t[e]=n.value,n={configurable:(p in n?n:r)[p],enumerable:(l in n?n:r)[l],writable:!1}),s(t,e,n)}:s:function(t,e,n){if(u(t),e=c(e),u(n),o)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new a("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7347:function(t,e,n){var r=n(3724),o=n(9565),i=n(8773),u=n(6980),c=n(5397),a=n(6969),s=n(9297),f=n(5917),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=c(t),e=a(e),f)try{return l(t,e)}catch(t){}if(s(t,e))return u(!o(i.f,t,e),t[e])}},8480:function(t,e,n){var r=n(1828),o=n(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},3717:function(t,e){e.f=Object.getOwnPropertySymbols},1625:function(t,e,n){n=n(9504);t.exports=n({}.isPrototypeOf)},1828:function(t,e,n){var r=n(9504),u=n(9297),c=n(5397),a=n(9617).indexOf,s=n(421),f=r([].push);t.exports=function(t,e){var n,r=c(t),o=0,i=[];for(n in r)!u(s,n)&&u(r,n)&&f(i,n);for(;e.length>o;)!u(r,n=e[o++])||~a(i,n)||f(i,n);return i}},8773:function(t,e){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){t=r(this,t);return!!t&&t.enumerable}:n},4270:function(t,e,n){var o=n(9565),i=n(4901),u=n(34),c=TypeError;t.exports=function(t,e){var n,r;if("string"===e&&i(n=t.toString)&&!u(r=o(n,t)))return r;if(i(n=t.valueOf)&&!u(r=o(n,t)))return r;if("string"!==e&&i(n=t.toString)&&!u(r=o(n,t)))return r;throw new c("Can't convert object to primitive value")}},5031:function(t,e,n){var r=n(7751),o=n(9504),i=n(8480),u=n(3717),c=n(8551),a=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(c(t)),n=u.f;return n?a(e,n(t)):e}},7750:function(t,e,n){var r=n(4117),o=TypeError;t.exports=function(t){if(r(t))throw new o("Can't call method on "+t);return t}},6119:function(t,e,n){var r=n(5745),o=n(3392),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},7629:function(t,e,n){var r=n(6395),o=n(4475),n=n(9433),i="__core-js_shared__",t=t.exports=o[i]||n(i,{});(t.versions||(t.versions=[])).push({version:"3.37.1",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(t,e,n){var r=n(7629);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},4495:function(t,e,n){var r=n(7388),o=n(9039),i=n(4475).String;t.exports=!!Object.getOwnPropertySymbols&&!o(function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41})},5610:function(t,e,n){var r=n(1291),o=Math.max,i=Math.min;t.exports=function(t,e){t=r(t);return t<0?o(t+e,0):i(t,e)}},5397:function(t,e,n){var r=n(7055),o=n(7750);t.exports=function(t){return r(o(t))}},1291:function(t,e,n){var r=n(741);t.exports=function(t){t=+t;return t!=t||0==t?0:r(t)}},8014:function(t,e,n){var r=n(1291),o=Math.min;t.exports=function(t){t=r(t);return 0<t?o(t,9007199254740991):0}},8981:function(t,e,n){var r=n(7750),o=Object;t.exports=function(t){return o(r(t))}},2777:function(t,e,n){var r=n(9565),o=n(34),i=n(757),u=n(5966),c=n(4270),n=n(8227),a=TypeError,s=n("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n=u(t,s);if(n){if(n=r(n,t,e=void 0===e?"default":e),!o(n)||i(n))return n;throw new a("Can't convert object to primitive value")}return c(t,e=void 0===e?"number":e)}},6969:function(t,e,n){var r=n(2777),o=n(757);t.exports=function(t){t=r(t,"string");return o(t)?t:t+""}},6823:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},3392:function(t,e,n){var n=n(9504),r=0,o=Math.random(),i=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+i(++r+o,36)}},7040:function(t,e,n){n=n(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:function(t,e,n){var r=n(3724),n=n(9039);t.exports=r&&n(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8622:function(t,e,n){var r=n(4475),n=n(4901),r=r.WeakMap;t.exports=n(r)&&/native code/.test(String(r))},8227:function(t,e,n){var r=n(4475),o=n(5745),i=n(9297),u=n(3392),c=n(4495),n=n(7040),a=r.Symbol,s=o("wks"),f=n?a.for||a:a&&a.withoutSetter||u;t.exports=function(t){return i(s,t)||(s[t]=c&&i(a,t)?a[t]:f("Symbol."+t)),s[t]}},4114:function(t,e,n){var r=n(6518),i=n(8981),u=n(6198),c=n(4527),a=n(6837);r({target:"Array",proto:!0,arity:1,forced:n(9039)(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=i(this),n=u(e),r=arguments.length;a(n+r);for(var o=0;o<r;o++)e[n]=arguments[o],n++;return c(e,n),n}})}},N={};function r(t){var e=N[t];return void 0!==e||(e=N[t]={exports:{}},i[t].call(e.exports,e,e.exports,r)),e.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.p="";var e={};{r.r(e),r.d(e,{GLOBAL_EVENT_KEYS:function(){return O},VxeUI:function(){return F},clipboard:function(){return xt},commands:function(){return R},component:function(){return lt},coreVersion:function(){return St},createEvent:function(){return vt},default:function(){return pt},formats:function(){return A},getComponent:function(){return ft},getConfig:function(){return ut},getI18n:function(){return v},getIcon:function(){return at},getLanguage:function(){return Q},getTheme:function(){return nt},globalEvents:function(){return gt},globalResize:function(){return yt},handleCheckInfo:function(){return m},hasLanguage:function(){return J},hooks:function(){return Et},interceptor:function(){return k},log:function(){return C},menus:function(){return I},permission:function(){return wt},renderer:function(){return M},setConfig:function(){return it},setI18n:function(){return ot},setIcon:function(){return ct},setLanguage:function(){return rt},setTheme:function(){return b},use:function(){return st},useFns:function(){return Ot},usePermission:function(){return et},useSize:function(){return tt},validators:function(){return L}}),"undefined"!=typeof window&&(n=(n=window.document.currentScript)&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(r.p=n[1]),r(4114);var n=r(8871),f=r.n(n),o=null,D="z-index-manage",u={m:1e3,s:1e3};function W(){return"undefined"!=typeof document}function V(){return o||!W()||(o=document.getElementById(D))||((o=document.createElement("div")).id=D,o.style.display="none",document.body.appendChild(o),c(u.m),s(u.s)),o}function B(n){return function(t){var e;return t&&(t=Number(t),u[n]=t,e=V())&&(e.dataset?e.dataset[n]=t+"":e.setAttribute("data-"+n,t+"")),u[n]}}var c=B("m");function U(r,o){return function(t){var e=V(),n=(n=e&&(e=e.dataset?e.dataset[r]:e.getAttribute("data-"+r))?Number(e):n)||u[r];return t?Number(t)<n?o():t:n}}var a=U("m",$);function $(){return c(a()+1)}var s=B("s"),G=U("s",X);function q(){return a()+G()}function X(){return s(G()+1),q()}var K={setCurrent:c,getCurrent:a,getNext:$,setSubCurrent:s,getSubCurrent:q,getSubNext:X,getMax:function(){var t=0;if(W())for(var e=document.body.getElementsByTagName("*"),n=0;n<e.length;n++){var r=e[n];r&&r.style&&1===r.nodeType&&(r=r.style.zIndex)&&/^\d+$/.test(r)&&(t=Math.max(t,Number(r)))}return t}};const y={size:"",version:1,zIndex:999,resizeInterval:500},x={},w={theme:""};var l=r(9274);const E=(0,l.reactive)({language:"",langMaps:{}});function p(t){return(p="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})(t)}function H(t){t=function(t,e){if("object"!=p(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);if("object"!=p(n=n.call(t,e||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==p(t)?t:t+""}function d(t,e,n){(e=H(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}const O={F2:"F2",ESCAPE:"Escape",ENTER:"Enter",TAB:"Tab",DELETE:"Delete",BACKSPACE:"Backspace",SPACEBAR:" ",CONTEXT_MENU:"ContextMenu",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",R:"R",P:"P",Z:"Z",X:"X",C:"C",V:"V",M:"M"},S=(n=f().browse(),{" ":"Spacebar",Apps:O.CONTEXT_MENU,Del:O.DELETE,Up:O.ARROW_UP,Down:O.ARROW_DOWN,Left:O.ARROW_LEFT,Right:O.ARROW_RIGHT}),dt=n.firefox?"DOMMouseScroll":"mousewheel",j=[];function h(n){const r=n.type===dt;j.forEach(({type:t,cb:e})=>{n.cancelBubble||(t===n.type||r&&"mousewheel"===t)&&e(n)})}class ht{constructor(t,e,n){d(this,"$event",void 0),this.$event=t,Object.assign(this,e,n)}stopPropagation(){var t=this.$event;t&&t.stopPropagation()}preventDefault(){var t=this.$event;t&&t.preventDefault()}}const vt=(t,e,n)=>new ht(t,e,n),gt={on(t,e,n){j.push({comp:t,type:e,cb:n})},off(e,n){f().remove(j,t=>t.comp===e&&t.type===n)},hasKey(t,e){t=t.key;return e=e.toLowerCase(),!(!t||e!==t.toLowerCase()&&(!S[t]||S[t].toLowerCase()!==e))}};n.isDoc&&(n.msie||(window.addEventListener("copy",h,!1),window.addEventListener("cut",h,!1),window.addEventListener("paste",h,!1)),document.addEventListener("keydown",h,!1),document.addEventListener("contextmenu",h,!1),window.addEventListener("mousedown",h,!1),window.addEventListener("blur",h,!1),window.addEventListener("resize",h,!1),window.addEventListener(dt,f().throttle(h,100,{leading:!0,trailing:!1}),{passive:!0,capture:!1}));let t;const P=[],mt=500;function Y(){P.length&&(P.forEach(i=>{i.tarList.forEach(t=>{var{target:e,width:n,heighe:r}=t,o=e.clientWidth,e=e.clientHeight;(o&&n!==o||e&&r!==e)&&(t.width=o,t.heighe=e,setTimeout(i.callback))})}),Z())}function Z(){clearTimeout(t),t=setTimeout(Y,y.resizeInterval||mt)}class bt{constructor(t){d(this,"tarList",[]),d(this,"callback",void 0),this.callback=t}observe(e){var t;e&&(t=this["tarList"],t.some(t=>t.target===e)||t.push({target:e,width:e.clientWidth,heighe:e.clientHeight}),P.length||Z(),P.some(t=>t===this)||P.push(this))}unobserve(e){f().remove(P,t=>t.tarList.some(t=>t.target===e))}disconnect(){f().remove(P,t=>t===this)}}const yt={create(t){return new(window.ResizeObserver||bt)(t)}};function v(t,e){var{langMaps:n,language:r}=E;return f().toFormatString(f().get(n[r],t,t),e)}function J(t){var e=E["langMaps"];return!!e[t]}function Q(){var t=E["language"];return t}function g(n,r){return function(t,e){t=`[vxe ${r||""}] `+v(t,e);return console[n](t),t}}const C={create:g,warn:g("warn","v4.0.3"),err:g("error","v4.0.3")},T={},M={mixin(t){return f().each(t,(t,e)=>M.add(e,t)),M},get(t){return T[t]||null},add(n,t){if(n&&t){const r=T[n];r?(f().each(t,(t,e)=>{f().eqNull(r[e])||r[e]===t||C.warn("vxe.error.coverProp",["Renderer."+n,e])}),Object.assign(r,t)):T[n]=t}return M},forEach(t){return f().objectEach(T,t),M},delete(t){return delete T[t],M}},L=new(n=class{constructor(){d(this,"store",{})}mixin(t){return f().each(t,(t,e)=>{this.add(e,t)}),this}has(t){return!!this.get(t)}get(t){return this.store[t]}add(n,t){var e=this.store[n];{const r=f().keys(e);f().each(t,(t,e)=>{r.includes(e)&&C.warn("vxe.error.coverProp",[n,e])})}return this.store[n]=e?f().merge(e,t):t,this}delete(t){delete this.store[t]}forEach(t){f().objectEach(this.store,t)}}),I=(Object.assign(L,{_name:"Validators"}),new class{constructor(){d(this,"store",{})}mixin(t){return f().each(t,(t,e)=>{this.add(e,t)}),this}has(t){return!!this.get(t)}get(t){return this.store[t]}add(n,t){var e=this.store[n];f().isFunction(t)&&(C.warn("vxe.error.delProp",["menus -> callback","menuMethod"]),t={menuMethod:t});{const r=f().keys(e);f().each(t,(t,e)=>{r.includes(e)&&C.warn("vxe.error.coverProp",[n,e])})}return this.store[n]=e?f().merge(e,t):t,this}delete(t){delete this.store[t]}forEach(t){f().objectEach(this.store,t)}}),A=(Object.assign(I,{_name:"Menus"}),new class{constructor(){d(this,"store",{})}mixin(t){return f().each(t,(t,e)=>{this.add(e,t)}),this}has(t){return!!this.get(t)}get(t){return this.store[t]}add(n,t){var e=this.store[n];f().isFunction(t)&&(C.warn("vxe.error.delProp",["formats -> callback","cellFormatMethod"]),t={cellFormatMethod:t});{const r=f().keys(e);f().each(t,(t,e)=>{r.includes(e)&&C.warn("vxe.error.coverProp",[n,e])})}return this.store[n]=e?f().merge(e,t):t,this}delete(t){delete this.store[t]}forEach(t){f().objectEach(this.store,t)}}),R=(Object.assign(A,{_name:"Formats"}),new class{constructor(){d(this,"store",{})}mixin(t){return f().each(t,(t,e)=>{this.add(e,t)}),this}has(t){return!!this.get(t)}get(t){return this.store[t]}add(n,t){var e=this.store[n];f().isFunction(t)&&(C.warn("vxe.error.delProp",["commands -> callback","commandMethod"]),t={commandMethod:t});{const r=f().keys(e);f().each(t,(t,e)=>{r.includes(e)&&C.warn("vxe.error.coverProp",[n,e])})}return this.store[n]=e?f().merge(e,t):t,this}delete(t){delete this.store[t]}forEach(t){f().objectEach(this.store,t)}}),_=(Object.assign(R,{_name:"Commands"}),{}),k={mixin(t){return f().each(t,(t,e)=>{k.add(e,t)}),k},get(t){return _[t]||[]},add(e,n){n=(n=f().isFunction(n)?{tableInterceptorMethod:n}:n).tableInterceptorMethod;if(n){let t=_[e];-1<(t=t||(_[e]=[])).indexOf(n)&&C.warn("vxe.error.coverProp",["Interceptor",e]),t.push(n)}return k},delete(t,e){var n=_[t];if(n){const r=(e=f().isFunction(e)?{tableInterceptorMethod:e}:e)?e.tableInterceptorMethod:null;r?f().remove(n,t=>t===r):delete _[t]}}};let i;const z={text:"",html:""},xt={getStore(){return z},setStore(t){Object.assign(z,t||{})},copy(t){let e=!1;try{var n=f().toValueString(t);r=n,i||((i=document.createElement("textarea")).id="$VxeCopy",(o=i.style).width="48px",o.height="24px",o.position="fixed",o.zIndex="0",o.left="-500px",o.top="-500px",document.body.appendChild(i)),i.value=r,i.select(),i.setSelectionRange(0,i.value.length),e=document.execCommand("copy"),i.blur(),z.text=n,z.html=""}catch(t){}var r,o;return e}};function m(t,e){let i=!0,u=!1;var c=e||y.permissionMethod;if(t&&c){i=!1;let r=!(u=!0),o=!1;var a=String(t).split("|");for(let n=0;n<a.length;n++){let t=!0,e=!1;var s=c({code:a[n]});if(f().isBoolean(s)?t=s:s&&(t=!!s.visible,e=!!s.disabled),e||o||(o=!0,u=e),t&&!r&&(r=!0,i=t),r&&o)break}}return{code:t,visible:i,disabled:u}}const wt={getCheckInfo(t){return m(t)},checkVisible(t){return m(t).visible},checkDisable(t){return m(t).disabled}},Et=new n;function tt(t){const e=(0,l.inject)("xeSizeInfo",null);var n=(0,l.computed)(()=>t.size||(e?e.value:null));return(0,l.provide)("xeSizeInfo",n),{computeSize:n}}function et(t){return{computePermissionInfo:(0,l.computed)(()=>m(t.permissionCode,t.permissionMethod))}}const Ot={useSize:tt,usePermission:et};function b(t){var e,t=t&&"default"!==t?t:"light";return w.theme=t,"undefined"!=typeof document&&(e=document.documentElement)&&e.setAttribute("data-vxe-ui-theme",t),F}function nt(){return w.theme}function rt(t){return E.language=t||"zh-CN",F}function ot(t,e){return E.langMaps[t]=Object.assign({},e),F}function it(t){return t&&(t.zIndex&&K.setCurrent(t.zIndex),t.theme&&b(t.theme),f().merge(y,t)),F}function ut(t,e){return arguments.length?f().get(y,t,e):y}function ct(t){return t&&Object.assign(x,t),F}function at(t){return arguments.length?f().get(x,t):x}const St="4.0.3",jt=[];function st(t,e){return t&&t.install&&-1===jt.indexOf(t)&&(t.install(F,e),jt.push(t)),F}const Pt={};function ft(t){return Pt[t]||null}function lt(t){t&&t.name&&(Pt[t.name]=t)}const F={coreVersion:St,setTheme:b,getTheme:nt,setConfig:it,getConfig:ut,setIcon:ct,getIcon:at,setLanguage:rt,hasLanguage:J,getLanguage:Q,setI18n:ot,getI18n:v,globalEvents:gt,GLOBAL_EVENT_KEYS:O,createEvent:vt,globalResize:yt,renderer:M,validators:L,menus:I,formats:A,commands:R,interceptor:k,clipboard:xt,log:C,permission:wt,hooks:Et,component:lt,getComponent:ft,useFns:Ot,use:st};b();var pt=F}return e}()});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue"),require("xe-utils")):"function"==typeof define&&define.amd?define([,"xe-utils"],e):"object"==typeof exports?exports.VxeCore=e(require("vue"),require("xe-utils")):t.VxeCore=e(t.Vue,t.XEUtils)}("undefined"!=typeof self?self:this,function(Tt,Mt){return function(){"use strict";var i={9274:function(t){t.exports=Tt},8871:function(t){t.exports=Mt},9306:function(t,e,n){var r=n(4901),o=n(6823),i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not a function")}},8551:function(t,e,n){var r=n(34),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not an object")}},9617:function(t,e,n){function r(c){return function(t,e,n){var r=a(t),o=f(r);if(0!==o){var i,u=s(n,o);if(c&&e!=e){for(;u<o;)if((i=r[u++])!=i)return!0}else for(;u<o;u++)if((c||u in r)&&r[u]===e)return c||u||0}return!c&&-1}}var a=n(5397),s=n(5610),f=n(6198);t.exports={includes:r(!0),indexOf:r(!1)}},4527:function(t,e,n){var r=n(3724),o=n(4376),i=TypeError,u=Object.getOwnPropertyDescriptor,n=r&&!function(){if(void 0!==this)return 1;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=n?function(t,e){if(o(t)&&!u(t,"length").writable)throw new i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},4576:function(t,e,n){var n=n(9504),r=n({}.toString),o=n("".slice);t.exports=function(t){return o(r(t),8,-1)}},7740:function(t,e,n){var a=n(9297),s=n(5031),f=n(7347),l=n(4913);t.exports=function(t,e,n){for(var r=s(e),o=l.f,i=f.f,u=0;u<r.length;u++){var c=r[u];a(t,c)||n&&a(n,c)||o(t,c,i(e,c))}}},6699:function(t,e,n){var r=n(3724),o=n(4913),i=n(6980);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},6980:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6840:function(t,e,n){var u=n(4901),c=n(4913),a=n(283),s=n(9433);t.exports=function(t,e,n,r){var o=(r=r||{}).enumerable,i=void 0!==r.name?r.name:e;if(u(n)&&a(n,i,r),r.global)o?t[e]=n:s(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:c.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t}},9433:function(t,e,n){var r=n(4475),o=Object.defineProperty;t.exports=function(e,n){try{o(r,e,{value:n,configurable:!0,writable:!0})}catch(t){r[e]=n}return n}},3724:function(t,e,n){n=n(9039);t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},4055:function(t,e,n){var r=n(4475),n=n(34),o=r.document,i=n(o)&&n(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},6837:function(t){var e=TypeError;t.exports=function(t){if(9007199254740991<t)throw e("Maximum allowed index exceeded");return t}},9392:function(t){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7388:function(t,e,n){var r,o,i=n(4475),n=n(9392),u=i.process,i=i.Deno,u=u&&u.versions||i&&i.version,i=u&&u.v8;!(o=i?0<(r=i.split("."))[0]&&r[0]<4?1:+(r[0]+r[1]):o)&&n&&(!(r=n.match(/Edge\/(\d+)/))||74<=r[1])&&(r=n.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},8727:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:function(t,e,n){var s=n(4475),f=n(7347).f,l=n(6699),p=n(6840),d=n(9433),h=n(7740),v=n(2796);t.exports=function(t,e){var n,r,o,i=t.target,u=t.global,c=t.stat,a=u?s:c?s[i]||d(i,{}):s[i]&&s[i].prototype;if(a)for(n in e){if(r=e[n],o=t.dontCallGetSet?(o=f(a,n))&&o.value:a[n],!v(u?n:i+(c?".":"#")+n,t.forced)&&void 0!==o){if(typeof r==typeof o)continue;h(r,o)}(t.sham||o&&o.sham)&&l(r,"sham",!0),p(a,n,r,t)}}},9039:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},616:function(t,e,n){n=n(9039);t.exports=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},9565:function(t,e,n){var n=n(616),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},350:function(t,e,n){var r=n(3724),n=n(9297),o=Function.prototype,i=r&&Object.getOwnPropertyDescriptor,n=n(o,"name"),u=n&&"something"===function(){}.name,r=n&&(!r||i(o,"name").configurable);t.exports={EXISTS:n,PROPER:u,CONFIGURABLE:r}},9504:function(t,e,n){var n=n(616),r=Function.prototype,o=r.call,r=n&&r.bind.bind(o,o);t.exports=n?r:function(t){return function(){return o.apply(t,arguments)}}},7751:function(t,e,n){var r=n(4475),o=n(4901);t.exports=function(t,e){return arguments.length<2?(n=r[t],o(n)?n:void 0):r[t]&&r[t][e];var n}},5966:function(t,e,n){var r=n(9306),o=n(4117);t.exports=function(t,e){t=t[e];return o(t)?void 0:r(t)}},4475:function(t,e,n){function r(t){return t&&t.Math===Math&&t}t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:function(t,e,n){var r=n(9504),o=n(8981),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},421:function(t){t.exports={}},5917:function(t,e,n){var r=n(3724),o=n(9039),i=n(4055);t.exports=!r&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},7055:function(t,e,n){var r=n(9504),o=n(9039),i=n(4576),u=Object,c=r("".split);t.exports=o(function(){return!u("z").propertyIsEnumerable(0)})?function(t){return"String"===i(t)?c(t,""):u(t)}:u},3706:function(t,e,n){var r=n(9504),o=n(4901),n=n(7629),i=r(Function.toString);o(n.inspectSource)||(n.inspectSource=function(t){return i(t)}),t.exports=n.inspectSource},1181:function(t,e,n){var r,o,i,u,c=n(8622),a=n(4475),s=n(34),f=n(6699),l=n(9297),p=n(7629),d=n(6119),n=n(421),h="Object already initialized",v=a.TypeError,a=a.WeakMap,g=c||p.state?((i=p.state||(p.state=new a)).get=i.get,i.has=i.has,i.set=i.set,r=function(t,e){if(i.has(t))throw new v(h);return e.facade=t,i.set(t,e),e},o=function(t){return i.get(t)||{}},function(t){return i.has(t)}):(n[u=d("state")]=!0,r=function(t,e){if(l(t,u))throw new v(h);return e.facade=t,f(t,u,e),e},o=function(t){return l(t,u)?t[u]:{}},function(t){return l(t,u)});t.exports={set:r,get:o,has:g,enforce:function(t){return g(t)?o(t):r(t,{})},getterFor:function(e){return function(t){if(s(t)&&(t=o(t)).type===e)return t;throw new v("Incompatible receiver, "+e+" required")}}}},4376:function(t,e,n){var r=n(4576);t.exports=Array.isArray||function(t){return"Array"===r(t)}},4901:function(t){var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},2796:function(t,e,n){function r(t,e){return(t=a[c(t)])===f||t!==s&&(i(e)?o(e):!!e)}var o=n(9039),i=n(4901),u=/#|\.prototype\./,c=r.normalize=function(t){return String(t).replace(u,".").toLowerCase()},a=r.data={},s=r.NATIVE="N",f=r.POLYFILL="P";t.exports=r},4117:function(t){t.exports=function(t){return null==t}},34:function(t,e,n){var r=n(4901);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},6395:function(t){t.exports=!1},757:function(t,e,n){var r=n(7751),o=n(4901),i=n(1625),n=n(7040),u=Object;t.exports=n?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,u(t))}},6198:function(t,e,n){var r=n(8014);t.exports=function(t){return r(t.length)}},283:function(t,e,n){var r=n(9504),o=n(9039),i=n(4901),u=n(9297),c=n(3724),a=n(350).CONFIGURABLE,s=n(3706),n=n(1181),f=n.enforce,l=n.get,p=String,d=Object.defineProperty,h=r("".slice),v=r("".replace),g=r([].join),m=c&&!o(function(){return 8!==d(function(){},"length",{value:8}).length}),b=String(String).split("String"),n=t.exports=function(t,e,n){"Symbol("===h(p(e),0,7)&&(e="["+v(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!u(t,"name")||a&&t.name!==e)&&(c?d(t,"name",{value:e,configurable:!0}):t.name=e),m&&n&&u(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&u(n,"constructor")&&n.constructor?c&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}n=f(t);return u(n,"source")||(n.source=g(b,"string"==typeof e?e:"")),t};Function.prototype.toString=n(function(){return i(this)&&l(this).source||s(this)},"toString")},741:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){t=+t;return(0<t?n:e)(t)}},4913:function(t,e,n){var r=n(3724),o=n(5917),i=n(8686),u=n(8551),c=n(6969),a=TypeError,s=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",p="configurable",d="writable";e.f=r?i?function(t,e,n){var r;return u(t),e=c(e),u(n),"function"==typeof t&&"prototype"===e&&"value"in n&&d in n&&!n[d]&&(r=f(t,e))&&r[d]&&(t[e]=n.value,n={configurable:(p in n?n:r)[p],enumerable:(l in n?n:r)[l],writable:!1}),s(t,e,n)}:s:function(t,e,n){if(u(t),e=c(e),u(n),o)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new a("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7347:function(t,e,n){var r=n(3724),o=n(9565),i=n(8773),u=n(6980),c=n(5397),a=n(6969),s=n(9297),f=n(5917),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=c(t),e=a(e),f)try{return l(t,e)}catch(t){}if(s(t,e))return u(!o(i.f,t,e),t[e])}},8480:function(t,e,n){var r=n(1828),o=n(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},3717:function(t,e){e.f=Object.getOwnPropertySymbols},1625:function(t,e,n){n=n(9504);t.exports=n({}.isPrototypeOf)},1828:function(t,e,n){var r=n(9504),u=n(9297),c=n(5397),a=n(9617).indexOf,s=n(421),f=r([].push);t.exports=function(t,e){var n,r=c(t),o=0,i=[];for(n in r)!u(s,n)&&u(r,n)&&f(i,n);for(;e.length>o;)!u(r,n=e[o++])||~a(i,n)||f(i,n);return i}},8773:function(t,e){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){t=r(this,t);return!!t&&t.enumerable}:n},4270:function(t,e,n){var o=n(9565),i=n(4901),u=n(34),c=TypeError;t.exports=function(t,e){var n,r;if("string"===e&&i(n=t.toString)&&!u(r=o(n,t)))return r;if(i(n=t.valueOf)&&!u(r=o(n,t)))return r;if("string"!==e&&i(n=t.toString)&&!u(r=o(n,t)))return r;throw new c("Can't convert object to primitive value")}},5031:function(t,e,n){var r=n(7751),o=n(9504),i=n(8480),u=n(3717),c=n(8551),a=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(c(t)),n=u.f;return n?a(e,n(t)):e}},7750:function(t,e,n){var r=n(4117),o=TypeError;t.exports=function(t){if(r(t))throw new o("Can't call method on "+t);return t}},6119:function(t,e,n){var r=n(5745),o=n(3392),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},7629:function(t,e,n){var r=n(6395),o=n(4475),n=n(9433),i="__core-js_shared__",t=t.exports=o[i]||n(i,{});(t.versions||(t.versions=[])).push({version:"3.37.1",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(t,e,n){var r=n(7629);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},4495:function(t,e,n){var r=n(7388),o=n(9039),i=n(4475).String;t.exports=!!Object.getOwnPropertySymbols&&!o(function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41})},5610:function(t,e,n){var r=n(1291),o=Math.max,i=Math.min;t.exports=function(t,e){t=r(t);return t<0?o(t+e,0):i(t,e)}},5397:function(t,e,n){var r=n(7055),o=n(7750);t.exports=function(t){return r(o(t))}},1291:function(t,e,n){var r=n(741);t.exports=function(t){t=+t;return t!=t||0==t?0:r(t)}},8014:function(t,e,n){var r=n(1291),o=Math.min;t.exports=function(t){t=r(t);return 0<t?o(t,9007199254740991):0}},8981:function(t,e,n){var r=n(7750),o=Object;t.exports=function(t){return o(r(t))}},2777:function(t,e,n){var r=n(9565),o=n(34),i=n(757),u=n(5966),c=n(4270),n=n(8227),a=TypeError,s=n("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n=u(t,s);if(n){if(n=r(n,t,e=void 0===e?"default":e),!o(n)||i(n))return n;throw new a("Can't convert object to primitive value")}return c(t,e=void 0===e?"number":e)}},6969:function(t,e,n){var r=n(2777),o=n(757);t.exports=function(t){t=r(t,"string");return o(t)?t:t+""}},6823:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},3392:function(t,e,n){var n=n(9504),r=0,o=Math.random(),i=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+i(++r+o,36)}},7040:function(t,e,n){n=n(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:function(t,e,n){var r=n(3724),n=n(9039);t.exports=r&&n(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8622:function(t,e,n){var r=n(4475),n=n(4901),r=r.WeakMap;t.exports=n(r)&&/native code/.test(String(r))},8227:function(t,e,n){var r=n(4475),o=n(5745),i=n(9297),u=n(3392),c=n(4495),n=n(7040),a=r.Symbol,s=o("wks"),f=n?a.for||a:a&&a.withoutSetter||u;t.exports=function(t){return i(s,t)||(s[t]=c&&i(a,t)?a[t]:f("Symbol."+t)),s[t]}},4114:function(t,e,n){var r=n(6518),i=n(8981),u=n(6198),c=n(4527),a=n(6837);r({target:"Array",proto:!0,arity:1,forced:n(9039)(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=i(this),n=u(e),r=arguments.length;a(n+r);for(var o=0;o<r;o++)e[n]=arguments[o],n++;return c(e,n),n}})}},F={};function r(t){var e=F[t];return void 0!==e||(e=F[t]={exports:{}},i[t].call(e.exports,e,e.exports,r)),e.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.p="";var e={};{r.r(e),r.d(e,{GLOBAL_EVENT_KEYS:function(){return O},VxeUI:function(){return z},clipboard:function(){return wt},commands:function(){return R},component:function(){return lt},coreVersion:function(){return jt},createEvent:function(){return gt},default:function(){return dt},formats:function(){return A},getComponent:function(){return ft},getConfig:function(){return ut},getI18n:function(){return v},getIcon:function(){return at},getLanguage:function(){return Q},getTheme:function(){return nt},globalEvents:function(){return mt},globalResize:function(){return xt},handleCheckInfo:function(){return m},hasLanguage:function(){return J},hooks:function(){return Ot},interceptor:function(){return k},log:function(){return C},menus:function(){return I},permission:function(){return Et},renderHolderElement:function(){return pt},renderer:function(){return M},setConfig:function(){return it},setI18n:function(){return ot},setIcon:function(){return ct},setLanguage:function(){return rt},setTheme:function(){return b},use:function(){return st},useFns:function(){return St},usePermission:function(){return et},useSize:function(){return tt},validators:function(){return L}}),"undefined"!=typeof window&&(n=(n=window.document.currentScript)&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(r.p=n[1]),r(4114);var n=r(8871),f=r.n(n),o=null,D="z-index-manage",u={m:1e3,s:1e3};function V(){return"undefined"!=typeof document}function W(){return o||!V()||(o=document.getElementById(D))||((o=document.createElement("div")).id=D,o.style.display="none",document.body.appendChild(o),c(u.m),s(u.s)),o}function B(n){return function(t){var e;return t&&(t=Number(t),u[n]=t,e=W())&&(e.dataset?e.dataset[n]=t+"":e.setAttribute("data-"+n,t+"")),u[n]}}var c=B("m");function U(r,o){return function(t){var e=W(),n=(n=e&&(e=e.dataset?e.dataset[r]:e.getAttribute("data-"+r))?Number(e):n)||u[r];return t?Number(t)<n?o():t:n}}var a=U("m",$);function $(){return c(a()+1)}var s=B("s"),G=U("s",H);function q(){return a()+G()}function H(){return s(G()+1),q()}var X={setCurrent:c,getCurrent:a,getNext:$,setSubCurrent:s,getSubCurrent:q,getSubNext:H,getMax:function(){var t=0;if(V())for(var e=document.body.getElementsByTagName("*"),n=0;n<e.length;n++){var r=e[n];r&&r.style&&1===r.nodeType&&(r=r.style.zIndex)&&/^\d+$/.test(r)&&(t=Math.max(t,Number(r)))}return t}},l=r(9274);const y={size:"",version:1,zIndex:999,resizeInterval:500},x={},w={theme:""},E=(0,l.reactive)({language:"",langMaps:{}});function p(t){return(p="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})(t)}function K(t){t=function(t,e){if("object"!=p(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);if("object"!=p(n=n.call(t,e||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==p(t)?t:t+""}function d(t,e,n){(e=K(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}const O={F2:"F2",ESCAPE:"Escape",ENTER:"Enter",TAB:"Tab",DELETE:"Delete",BACKSPACE:"Backspace",SPACEBAR:" ",CONTEXT_MENU:"ContextMenu",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",R:"R",P:"P",Z:"Z",X:"X",C:"C",V:"V",M:"M"},S=(n=f().browse(),{" ":"Spacebar",Apps:O.CONTEXT_MENU,Del:O.DELETE,Up:O.ARROW_UP,Down:O.ARROW_DOWN,Left:O.ARROW_LEFT,Right:O.ARROW_RIGHT}),ht=n.firefox?"DOMMouseScroll":"mousewheel",j=[];function h(n){const r=n.type===ht;j.forEach(({type:t,cb:e})=>{n.cancelBubble||(t===n.type||r&&"mousewheel"===t)&&e(n)})}class vt{constructor(t,e,n){d(this,"$event",void 0),this.$event=t,Object.assign(this,e,n)}stopPropagation(){var t=this.$event;t&&t.stopPropagation()}preventDefault(){var t=this.$event;t&&t.preventDefault()}}const gt=(t,e,n)=>new vt(t,e,n),mt={on(t,e,n){j.push({comp:t,type:e,cb:n})},off(e,n){f().remove(j,t=>t.comp===e&&t.type===n)},hasKey(t,e){t=t.key;return e=e.toLowerCase(),!(!t||e!==t.toLowerCase()&&(!S[t]||S[t].toLowerCase()!==e))}};n.isDoc&&(n.msie||(window.addEventListener("copy",h,!1),window.addEventListener("cut",h,!1),window.addEventListener("paste",h,!1)),document.addEventListener("keydown",h,!1),document.addEventListener("contextmenu",h,!1),window.addEventListener("mousedown",h,!1),window.addEventListener("blur",h,!1),window.addEventListener("resize",h,!1),window.addEventListener(ht,f().throttle(h,100,{leading:!0,trailing:!1}),{passive:!0,capture:!1}));let t;const P=[],bt=500;function Y(){P.length&&(P.forEach(i=>{i.tarList.forEach(t=>{var{target:e,width:n,heighe:r}=t,o=e.clientWidth,e=e.clientHeight;(o&&n!==o||e&&r!==e)&&(t.width=o,t.heighe=e,setTimeout(i.callback))})}),Z())}function Z(){clearTimeout(t),t=setTimeout(Y,y.resizeInterval||bt)}class yt{constructor(t){d(this,"tarList",[]),d(this,"callback",void 0),this.callback=t}observe(e){var t;e&&(t=this["tarList"],t.some(t=>t.target===e)||t.push({target:e,width:e.clientWidth,heighe:e.clientHeight}),P.length||Z(),P.some(t=>t===this)||P.push(this))}unobserve(e){f().remove(P,t=>t.tarList.some(t=>t.target===e))}disconnect(){f().remove(P,t=>t===this)}}const xt={create(t){return new(window.ResizeObserver||yt)(t)}};function v(t,e){var{langMaps:n,language:r}=E;return f().toFormatString(f().get(n[r],t,t),e)}function J(t){var e=E["langMaps"];return!!e[t]}function Q(){var t=E["language"];return t}function g(n,r){return function(t,e){t=`[vxe ${r||""}] `+v(t,e);return console[n](t),t}}const C={create:g,warn:g("warn","v4.0.5"),err:g("error","v4.0.5")},T={},M={mixin(t){return f().each(t,(t,e)=>M.add(e,t)),M},get(t){return T[t]||null},add(n,t){if(n&&t){const r=T[n];r?(f().each(t,(t,e)=>{f().eqNull(r[e])||r[e]===t||C.warn("vxe.error.coverProp",["Renderer."+n,e])}),Object.assign(r,t)):T[n]=t}return M},forEach(t){return f().objectEach(T,t),M},delete(t){return delete T[t],M}},L=new(n=class{constructor(){d(this,"store",{})}mixin(t){return f().each(t,(t,e)=>{this.add(e,t)}),this}has(t){return!!this.get(t)}get(t){return this.store[t]}add(n,t){var e=this.store[n];{const r=f().keys(e);f().each(t,(t,e)=>{r.includes(e)&&C.warn("vxe.error.coverProp",[n,e])})}return this.store[n]=e?f().merge(e,t):t,this}delete(t){delete this.store[t]}forEach(t){f().objectEach(this.store,t)}}),I=(Object.assign(L,{_name:"Validators"}),new class{constructor(){d(this,"store",{})}mixin(t){return f().each(t,(t,e)=>{this.add(e,t)}),this}has(t){return!!this.get(t)}get(t){return this.store[t]}add(n,t){var e=this.store[n];f().isFunction(t)&&(C.warn("vxe.error.delProp",["menus -> callback","menuMethod"]),t={menuMethod:t});{const r=f().keys(e);f().each(t,(t,e)=>{r.includes(e)&&C.warn("vxe.error.coverProp",[n,e])})}return this.store[n]=e?f().merge(e,t):t,this}delete(t){delete this.store[t]}forEach(t){f().objectEach(this.store,t)}}),A=(Object.assign(I,{_name:"Menus"}),new class{constructor(){d(this,"store",{})}mixin(t){return f().each(t,(t,e)=>{this.add(e,t)}),this}has(t){return!!this.get(t)}get(t){return this.store[t]}add(n,t){var e=this.store[n];f().isFunction(t)&&(C.warn("vxe.error.delProp",["formats -> callback","cellFormatMethod"]),t={cellFormatMethod:t});{const r=f().keys(e);f().each(t,(t,e)=>{r.includes(e)&&C.warn("vxe.error.coverProp",[n,e])})}return this.store[n]=e?f().merge(e,t):t,this}delete(t){delete this.store[t]}forEach(t){f().objectEach(this.store,t)}}),R=(Object.assign(A,{_name:"Formats"}),new class{constructor(){d(this,"store",{})}mixin(t){return f().each(t,(t,e)=>{this.add(e,t)}),this}has(t){return!!this.get(t)}get(t){return this.store[t]}add(n,t){var e=this.store[n];f().isFunction(t)&&(C.warn("vxe.error.delProp",["commands -> callback","commandMethod"]),t={commandMethod:t});{const r=f().keys(e);f().each(t,(t,e)=>{r.includes(e)&&C.warn("vxe.error.coverProp",[n,e])})}return this.store[n]=e?f().merge(e,t):t,this}delete(t){delete this.store[t]}forEach(t){f().objectEach(this.store,t)}}),_=(Object.assign(R,{_name:"Commands"}),{}),k={mixin(t){return f().each(t,(t,e)=>{k.add(e,t)}),k},get(t){return _[t]||[]},add(e,n){n=(n=f().isFunction(n)?{tableInterceptorMethod:n}:n).tableInterceptorMethod;if(n){let t=_[e];-1<(t=t||(_[e]=[])).indexOf(n)&&C.warn("vxe.error.coverProp",["Interceptor",e]),t.push(n)}return k},delete(t,e){var n=_[t];if(n){const r=(e=f().isFunction(e)?{tableInterceptorMethod:e}:e)?e.tableInterceptorMethod:null;r?f().remove(n,t=>t===r):delete _[t]}}};let i;const N={text:"",html:""},wt={getStore(){return N},setStore(t){Object.assign(N,t||{})},copy(t){let e=!1;try{var n=f().toValueString(t);r=n,i||((i=document.createElement("textarea")).id="$VxeCopy",(o=i.style).width="48px",o.height="24px",o.position="fixed",o.zIndex="0",o.left="-500px",o.top="-500px",document.body.appendChild(i)),i.value=r,i.select(),i.setSelectionRange(0,i.value.length),e=document.execCommand("copy"),i.blur(),N.text=n,N.html=""}catch(t){}var r,o;return e}};function m(t,e){let i=!0,u=!1;var c=e||y.permissionMethod;if(t&&c){i=!1;let r=!(u=!0),o=!1;var a=String(t).split("|");for(let n=0;n<a.length;n++){let t=!0,e=!1;var s=c({code:a[n]});if(f().isBoolean(s)?t=s:s&&(t=!!s.visible,e=!!s.disabled),e||o||(o=!0,u=e),t&&!r&&(r=!0,i=t),r&&o)break}}return{code:t,visible:i,disabled:u}}const Et={getCheckInfo(t){return m(t)},checkVisible(t){return m(t).visible},checkDisable(t){return m(t).disabled}},Ot=new n;function tt(t){const e=(0,l.inject)("xeSizeInfo",null);var n=(0,l.computed)(()=>t.size||(e?e.value:null));return(0,l.provide)("xeSizeInfo",n),{computeSize:n}}function et(t){return{computePermissionInfo:(0,l.computed)(()=>m(t.permissionCode,t.permissionMethod))}}const St={useSize:tt,usePermission:et};function b(t){var e,t=t&&"default"!==t?t:"light";return w.theme=t,"undefined"!=typeof document&&(e=document.documentElement)&&e.setAttribute("data-vxe-ui-theme",t),z}function nt(){return w.theme}function rt(t){return E.language=t||"zh-CN",z}function ot(t,e){return E.langMaps[t]=Object.assign({},e),z}function it(t){return t&&(t.zIndex&&X.setCurrent(t.zIndex),t.theme&&b(t.theme),f().merge(y,t)),z}function ut(t,e){return arguments.length?f().get(y,t,e):y}function ct(t){return t&&Object.assign(x,t),z}function at(t){return arguments.length?f().get(x,t):x}const jt="4.0.5",Pt=[];function st(t,e){return t&&t.install&&-1===Pt.indexOf(t)&&(t.install(z,e),Pt.push(t)),z}const Ct={};function ft(t){return Ct[t]||null}function lt(t){t&&t.name&&(Ct[t.name]=t)}function pt(){return(0,l.createCommentVNode)()}const z={coreVersion:jt,renderHolderElement:pt,setTheme:b,getTheme:nt,setConfig:it,getConfig:ut,setIcon:ct,getIcon:at,setLanguage:rt,hasLanguage:J,getLanguage:Q,setI18n:ot,getI18n:v,globalEvents:mt,GLOBAL_EVENT_KEYS:O,createEvent:gt,globalResize:xt,renderer:M,validators:L,menus:I,formats:A,commands:R,interceptor:k,clipboard:wt,log:C,permission:Et,hooks:Ot,component:lt,getComponent:ft,useFns:St,use:st};b();var dt=z}return e}()});
|
package/lib/src/core.js
CHANGED
|
@@ -16,6 +16,7 @@ var _exportNames = {
|
|
|
16
16
|
use: true,
|
|
17
17
|
getComponent: true,
|
|
18
18
|
component: true,
|
|
19
|
+
renderHolderElement: true,
|
|
19
20
|
VxeUI: true
|
|
20
21
|
};
|
|
21
22
|
exports.VxeUI = void 0;
|
|
@@ -25,6 +26,7 @@ exports.getComponent = getComponent;
|
|
|
25
26
|
exports.getConfig = getConfig;
|
|
26
27
|
exports.getIcon = getIcon;
|
|
27
28
|
exports.getTheme = getTheme;
|
|
29
|
+
exports.renderHolderElement = renderHolderElement;
|
|
28
30
|
exports.setConfig = setConfig;
|
|
29
31
|
exports.setI18n = setI18n;
|
|
30
32
|
exports.setIcon = setIcon;
|
|
@@ -33,6 +35,7 @@ exports.setTheme = setTheme;
|
|
|
33
35
|
exports.use = use;
|
|
34
36
|
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
35
37
|
var _domZindex = _interopRequireDefault(require("dom-zindex"));
|
|
38
|
+
var _vue = require("vue");
|
|
36
39
|
var _globalStore = require("./globalStore");
|
|
37
40
|
var _iconStore = require("./iconStore");
|
|
38
41
|
var _themeStore = require("./themeStore");
|
|
@@ -258,7 +261,7 @@ function setIcon(options) {
|
|
|
258
261
|
function getIcon(key) {
|
|
259
262
|
return arguments.length ? _xeUtils.default.get(_iconStore.iconConfigStore, key) : _iconStore.iconConfigStore;
|
|
260
263
|
}
|
|
261
|
-
const coreVersion = exports.coreVersion = "4.0.
|
|
264
|
+
const coreVersion = exports.coreVersion = "4.0.5";
|
|
262
265
|
const installedPlugins = [];
|
|
263
266
|
function use(Plugin, options) {
|
|
264
267
|
if (Plugin && Plugin.install) {
|
|
@@ -278,8 +281,12 @@ function component(comp) {
|
|
|
278
281
|
components[comp.name] = comp;
|
|
279
282
|
}
|
|
280
283
|
}
|
|
284
|
+
function renderHolderElement() {
|
|
285
|
+
return (0, _vue.createCommentVNode)();
|
|
286
|
+
}
|
|
281
287
|
const VxeUI = exports.VxeUI = {
|
|
282
288
|
coreVersion,
|
|
289
|
+
renderHolderElement,
|
|
283
290
|
setTheme,
|
|
284
291
|
getTheme,
|
|
285
292
|
setConfig,
|
package/lib/src/core.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={setTheme:!0,getTheme:!0,setLanguage:!0,setI18n:!0,setConfig:!0,getConfig:!0,setIcon:!0,getIcon:!0,coreVersion:!0,use:!0,getComponent:!0,component:!0,VxeUI:!0},_xeUtils=(exports.VxeUI=void 0,exports.component=component,exports.default=exports.coreVersion=void 0,exports.getComponent=getComponent,exports.getConfig=getConfig,exports.getIcon=getIcon,exports.getTheme=getTheme,exports.setConfig=setConfig,exports.setI18n=setI18n,exports.setIcon=setIcon,exports.setLanguage=setLanguage,exports.setTheme=setTheme,exports.use=use,_interopRequireDefault(require("xe-utils"))),_domZindex=_interopRequireDefault(require("dom-zindex")),_globalStore=require("./globalStore"),_iconStore=require("./iconStore"),_themeStore=require("./themeStore"),_i18nStore=require("./i18nStore"),_event=require("./event"),_resize=(Object.keys(_event).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_event[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _event[e]}})}),require("./resize")),_i18n=(Object.keys(_resize).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_resize[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _resize[e]}})}),require("./i18n")),_renderer=(Object.keys(_i18n).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_i18n[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _i18n[e]}})}),require("./renderer")),_validators=(Object.keys(_renderer).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_renderer[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _renderer[e]}})}),require("./validators")),_menus=(Object.keys(_validators).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_validators[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _validators[e]}})}),require("./menus")),_formats=(Object.keys(_menus).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_menus[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _menus[e]}})}),require("./formats")),_commands=(Object.keys(_formats).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_formats[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _formats[e]}})}),require("./commands")),_interceptor=(Object.keys(_commands).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_commands[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _commands[e]}})}),require("./interceptor")),_clipboard=(Object.keys(_interceptor).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_interceptor[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _interceptor[e]}})}),require("./clipboard")),_permission=(Object.keys(_clipboard).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_clipboard[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _clipboard[e]}})}),require("./permission")),_log=(Object.keys(_permission).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_permission[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _permission[e]}})}),require("./log")),_hooks=(Object.keys(_log).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_log[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _log[e]}})}),require("./hooks")),_useFns=(Object.keys(_hooks).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_hooks[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _hooks[e]}})}),require("./useFns"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function setTheme(e){var t,e=e&&"default"!==e?e:"light";return _themeStore.themeConfigStore.theme=e,"undefined"!=typeof document&&(t=document.documentElement)&&t.setAttribute("data-vxe-ui-theme",e),VxeUI}function getTheme(){return _themeStore.themeConfigStore.theme}function setLanguage(e){return _i18nStore.i18nConfigStore.language=e||"zh-CN",VxeUI}function setI18n(e,t){return _i18nStore.i18nConfigStore.langMaps[e]=Object.assign({},t),VxeUI}function setConfig(e){return e&&(e.zIndex&&_domZindex.default.setCurrent(e.zIndex),e.theme&&setTheme(e.theme),_xeUtils.default.merge(_globalStore.globalConfigStore,e)),VxeUI}function getConfig(e,t){return arguments.length?_xeUtils.default.get(_globalStore.globalConfigStore,e,t):_globalStore.globalConfigStore}function setIcon(e){return e&&Object.assign(_iconStore.iconConfigStore,e),VxeUI}function getIcon(e){return arguments.length?_xeUtils.default.get(_iconStore.iconConfigStore,e):_iconStore.iconConfigStore}Object.keys(_useFns).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_useFns[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _useFns[e]}})});const coreVersion=exports.coreVersion="4.0.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={setTheme:!0,getTheme:!0,setLanguage:!0,setI18n:!0,setConfig:!0,getConfig:!0,setIcon:!0,getIcon:!0,coreVersion:!0,use:!0,getComponent:!0,component:!0,renderHolderElement:!0,VxeUI:!0},_xeUtils=(exports.VxeUI=void 0,exports.component=component,exports.default=exports.coreVersion=void 0,exports.getComponent=getComponent,exports.getConfig=getConfig,exports.getIcon=getIcon,exports.getTheme=getTheme,exports.renderHolderElement=renderHolderElement,exports.setConfig=setConfig,exports.setI18n=setI18n,exports.setIcon=setIcon,exports.setLanguage=setLanguage,exports.setTheme=setTheme,exports.use=use,_interopRequireDefault(require("xe-utils"))),_domZindex=_interopRequireDefault(require("dom-zindex")),_vue=require("vue"),_globalStore=require("./globalStore"),_iconStore=require("./iconStore"),_themeStore=require("./themeStore"),_i18nStore=require("./i18nStore"),_event=require("./event"),_resize=(Object.keys(_event).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_event[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _event[e]}})}),require("./resize")),_i18n=(Object.keys(_resize).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_resize[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _resize[e]}})}),require("./i18n")),_renderer=(Object.keys(_i18n).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_i18n[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _i18n[e]}})}),require("./renderer")),_validators=(Object.keys(_renderer).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_renderer[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _renderer[e]}})}),require("./validators")),_menus=(Object.keys(_validators).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_validators[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _validators[e]}})}),require("./menus")),_formats=(Object.keys(_menus).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_menus[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _menus[e]}})}),require("./formats")),_commands=(Object.keys(_formats).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_formats[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _formats[e]}})}),require("./commands")),_interceptor=(Object.keys(_commands).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_commands[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _commands[e]}})}),require("./interceptor")),_clipboard=(Object.keys(_interceptor).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_interceptor[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _interceptor[e]}})}),require("./clipboard")),_permission=(Object.keys(_clipboard).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_clipboard[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _clipboard[e]}})}),require("./permission")),_log=(Object.keys(_permission).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_permission[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _permission[e]}})}),require("./log")),_hooks=(Object.keys(_log).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_log[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _log[e]}})}),require("./hooks")),_useFns=(Object.keys(_hooks).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_hooks[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _hooks[e]}})}),require("./useFns"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function setTheme(e){var t,e=e&&"default"!==e?e:"light";return _themeStore.themeConfigStore.theme=e,"undefined"!=typeof document&&(t=document.documentElement)&&t.setAttribute("data-vxe-ui-theme",e),VxeUI}function getTheme(){return _themeStore.themeConfigStore.theme}function setLanguage(e){return _i18nStore.i18nConfigStore.language=e||"zh-CN",VxeUI}function setI18n(e,t){return _i18nStore.i18nConfigStore.langMaps[e]=Object.assign({},t),VxeUI}function setConfig(e){return e&&(e.zIndex&&_domZindex.default.setCurrent(e.zIndex),e.theme&&setTheme(e.theme),_xeUtils.default.merge(_globalStore.globalConfigStore,e)),VxeUI}function getConfig(e,t){return arguments.length?_xeUtils.default.get(_globalStore.globalConfigStore,e,t):_globalStore.globalConfigStore}function setIcon(e){return e&&Object.assign(_iconStore.iconConfigStore,e),VxeUI}function getIcon(e){return arguments.length?_xeUtils.default.get(_iconStore.iconConfigStore,e):_iconStore.iconConfigStore}Object.keys(_useFns).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_useFns[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _useFns[e]}})});const coreVersion=exports.coreVersion="4.0.5",installedPlugins=[];function use(e,t){return e&&e.install&&-1===installedPlugins.indexOf(e)&&(e.install(VxeUI,t),installedPlugins.push(e)),VxeUI}const components={};function getComponent(e){return components[e]||null}function component(e){e&&e.name&&(components[e.name]=e)}function renderHolderElement(){return(0,_vue.createCommentVNode)()}const VxeUI=exports.VxeUI={coreVersion:coreVersion,renderHolderElement:renderHolderElement,setTheme:setTheme,getTheme:getTheme,setConfig:setConfig,getConfig:getConfig,setIcon:setIcon,getIcon:getIcon,setLanguage:setLanguage,hasLanguage:_i18n.hasLanguage,getLanguage:_i18n.getLanguage,setI18n:setI18n,getI18n:_i18n.getI18n,globalEvents:_event.globalEvents,GLOBAL_EVENT_KEYS:_event.GLOBAL_EVENT_KEYS,createEvent:_event.createEvent,globalResize:_resize.globalResize,renderer:_renderer.renderer,validators:_validators.validators,menus:_menus.menus,formats:_formats.formats,commands:_commands.commands,interceptor:_interceptor.interceptor,clipboard:_clipboard.clipboard,log:_log.log,permission:_permission.permission,hooks:_hooks.hooks,component:component,getComponent:getComponent,useFns:_useFns.useFns,use:use};setTheme();var _default=exports.default=VxeUI;
|
package/lib/src/log.js
CHANGED
package/lib/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.log=void 0;var _i18n=require("./i18n");function createLog(o,n){return function(e,r){e=`[vxe ${n||""}] `+(0,_i18n.getI18n)(e,r);return console[o](e),e}}const version="4.0.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.log=void 0;var _i18n=require("./i18n");function createLog(o,n){return function(e,r){e=`[vxe ${n||""}] `+(0,_i18n.getI18n)(e,r);return console[o](e),e}}const version="4.0.5",log=exports.log={create:createLog,warn:createLog("warn","v"+version),err:createLog("error","v"+version)};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vxe-ui/core",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5",
|
|
4
4
|
"description": "Vxe UI core library",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"jsdelivr": "lib/index.umd.js",
|
|
22
22
|
"typings": "types/index.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"dom-zindex": "^1.0.
|
|
24
|
+
"dom-zindex": "^1.0.5",
|
|
25
25
|
"xe-utils": "^3.5.30"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
@@ -31,9 +31,7 @@
|
|
|
31
31
|
"@typescript-eslint/parser": "^6.21.0",
|
|
32
32
|
"@vue/cli-plugin-babel": "~5.0.0",
|
|
33
33
|
"@vue/cli-plugin-eslint": "~5.0.0",
|
|
34
|
-
"@vue/cli-plugin-router": "~5.0.0",
|
|
35
34
|
"@vue/cli-plugin-typescript": "~5.0.0",
|
|
36
|
-
"@vue/cli-plugin-vuex": "~5.0.0",
|
|
37
35
|
"@vue/cli-service": "~5.0.0",
|
|
38
36
|
"@vue/eslint-config-standard": "^6.1.0",
|
|
39
37
|
"@vue/eslint-config-typescript": "^9.1.0",
|
package/packages/src/core.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import DomZIndex from 'dom-zindex'
|
|
3
|
+
import { createCommentVNode } from 'vue'
|
|
3
4
|
import { globalConfigStore } from './globalStore'
|
|
4
5
|
import { iconConfigStore } from './iconStore'
|
|
5
6
|
import { themeConfigStore } from './themeStore'
|
|
@@ -107,9 +108,15 @@ export function component (comp: any) {
|
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
110
|
|
|
111
|
+
export function renderHolderElement () {
|
|
112
|
+
return createCommentVNode()
|
|
113
|
+
}
|
|
114
|
+
|
|
110
115
|
export const VxeUI: VxeUIExport = {
|
|
111
116
|
coreVersion,
|
|
112
117
|
|
|
118
|
+
renderHolderElement,
|
|
119
|
+
|
|
113
120
|
setTheme,
|
|
114
121
|
getTheme,
|
|
115
122
|
setConfig,
|
package/types/core/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VNode } from 'vue'
|
|
1
2
|
import { VxeGlobalConfig } from './global-config'
|
|
2
3
|
import { VxeGlobalIcon } from './global-icon'
|
|
3
4
|
import { VxeGlobalThemeName } from './global-theme'
|
|
@@ -42,6 +43,8 @@ export const getComponent: VxeGlobalGetComponentMethod
|
|
|
42
43
|
|
|
43
44
|
export const coreVersion: string
|
|
44
45
|
|
|
46
|
+
export function renderHolderElement(): VNode
|
|
47
|
+
|
|
45
48
|
export const renderer: VxeGlobalRenderer
|
|
46
49
|
|
|
47
50
|
export const validators: VxeGlobalValidators
|
|
@@ -80,6 +83,10 @@ export interface VxeUIExport {
|
|
|
80
83
|
* 版本号
|
|
81
84
|
*/
|
|
82
85
|
coreVersion: string
|
|
86
|
+
/**
|
|
87
|
+
* 渲染一个占位元素
|
|
88
|
+
*/
|
|
89
|
+
renderHolderElement: typeof renderHolderElement
|
|
83
90
|
/**
|
|
84
91
|
* 设置全局主题
|
|
85
92
|
*/
|
|
@@ -101,7 +108,7 @@ export interface VxeUIExport {
|
|
|
101
108
|
*/
|
|
102
109
|
setIcon: typeof setIcon
|
|
103
110
|
/**
|
|
104
|
-
*
|
|
111
|
+
* 判断是否已经安装了该语言包,如果已安装则返回 true
|
|
105
112
|
*/
|
|
106
113
|
hasLanguage: typeof hasLanguage
|
|
107
114
|
/**
|