@vxe-ui/core 1.0.12 → 3.0.0-alpha.0
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/LICENSE +21 -21
- package/README.md +29 -31
- package/es/src/core.js +4 -4
- package/es/src/i18nStore.js +2 -3
- package/es/src/log.js +1 -1
- package/es/src/mixins.js +35 -0
- package/es/src/permission.js +36 -14
- package/lib/index.umd.js +187 -132
- package/lib/index.umd.min.js +1 -1
- package/lib/src/core.js +6 -6
- package/lib/src/core.min.js +1 -1
- package/lib/src/i18n.min.js +1 -1
- package/lib/src/i18nStore.js +2 -3
- package/lib/src/i18nStore.min.js +1 -1
- package/lib/src/log.js +1 -1
- package/lib/src/log.min.js +1 -1
- package/lib/src/mixins.js +44 -0
- package/lib/src/mixins.min.js +1 -0
- package/lib/src/permission.js +37 -15
- package/lib/src/permission.min.js +1 -1
- package/lib/src/resize.min.js +1 -1
- package/package.json +77 -78
- package/packages/index.ts +4 -4
- package/packages/src/clipboard.ts +53 -53
- package/packages/src/commands.ts +62 -62
- package/packages/src/core.ts +167 -167
- package/packages/src/event.ts +113 -113
- package/packages/src/formats.ts +62 -62
- package/packages/src/globalStore.ts +8 -8
- package/packages/src/hooks.ts +5 -5
- package/packages/src/i18n.ts +19 -19
- package/packages/src/i18nStore.ts +9 -11
- package/packages/src/iconStore.ts +3 -3
- package/packages/src/interceptor.ts +65 -65
- package/packages/src/log.ts +19 -19
- package/packages/src/menus.ts +62 -62
- package/packages/src/mixins.ts +38 -0
- package/packages/src/permission.ts +61 -39
- package/packages/src/renderer.ts +50 -50
- package/packages/src/resize.ts +89 -89
- package/packages/src/store.ts +49 -49
- package/packages/src/themeStore.ts +7 -7
- package/packages/src/validators.ts +9 -9
- package/types/core/clipboard.d.ts +13 -13
- package/types/core/commands.d.ts +19 -19
- package/types/core/components.d.ts +4 -4
- package/types/core/formats.d.ts +19 -19
- package/types/core/global-config.d.ts +55 -55
- package/types/core/global-event.d.ts +39 -39
- package/types/core/global-icon.d.ts +6 -6
- package/types/core/global-lang.d.ts +14 -1
- package/types/core/global-resize.d.ts +3 -3
- package/types/core/global-theme.d.ts +1 -1
- package/types/core/hooks.d.ts +14 -14
- package/types/core/index.d.ts +224 -224
- package/types/core/interceptor.d.ts +22 -22
- package/types/core/log.d.ts +8 -8
- package/types/core/menus.d.ts +19 -19
- package/types/core/mixins.d.ts +7 -0
- package/types/core/permission.d.ts +10 -10
- package/types/core/renderer.d.ts +14 -14
- package/types/core/validators.d.ts +19 -19
- package/types/index.d.ts +10 -10
- package/types/tool/common.d.ts +99 -99
- package/types/tool/index.d.ts +2 -2
- package/types/tool/util.d.ts +4 -4
- package/README.en.md +0 -31
- package/README.zh-TW.md +0 -31
- package/es/src/useFns.js +0 -23
- package/lib/src/useFns.js +0 -33
- package/lib/src/useFns.min.js +0 -1
- package/packages/src/useFns.ts +0 -34
- package/types/core/useFn.d.ts +0 -27
package/lib/index.umd.js
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory(require("
|
|
3
|
+
module.exports = factory(require("xe-utils"));
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define([
|
|
5
|
+
define(["xe-utils"], factory);
|
|
6
6
|
else if(typeof exports === 'object')
|
|
7
|
-
exports["VxeCore"] = factory(require("
|
|
7
|
+
exports["VxeCore"] = factory(require("xe-utils"));
|
|
8
8
|
else
|
|
9
|
-
root["VxeCore"] = factory(root["
|
|
10
|
-
})((typeof self !== 'undefined' ? self : this), function(
|
|
9
|
+
root["VxeCore"] = factory(root["XEUtils"]);
|
|
10
|
+
})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8871__) {
|
|
11
11
|
return /******/ (function() { // webpackBootstrap
|
|
12
12
|
/******/ "use strict";
|
|
13
13
|
/******/ var __webpack_modules__ = ({
|
|
14
14
|
|
|
15
|
-
/***/ 9274:
|
|
16
|
-
/***/ (function(module) {
|
|
17
|
-
|
|
18
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__9274__;
|
|
19
|
-
|
|
20
|
-
/***/ }),
|
|
21
|
-
|
|
22
15
|
/***/ 8871:
|
|
23
16
|
/***/ (function(module) {
|
|
24
17
|
|
|
@@ -137,7 +130,7 @@ module.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
|
|
|
137
130
|
|
|
138
131
|
/***/ }),
|
|
139
132
|
|
|
140
|
-
/***/
|
|
133
|
+
/***/ 2195:
|
|
141
134
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
142
135
|
|
|
143
136
|
|
|
@@ -250,16 +243,16 @@ module.exports = function (O, key, value, options) {
|
|
|
250
243
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
251
244
|
|
|
252
245
|
|
|
253
|
-
var
|
|
246
|
+
var globalThis = __webpack_require__(4576);
|
|
254
247
|
|
|
255
248
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
256
249
|
var defineProperty = Object.defineProperty;
|
|
257
250
|
|
|
258
251
|
module.exports = function (key, value) {
|
|
259
252
|
try {
|
|
260
|
-
defineProperty(
|
|
253
|
+
defineProperty(globalThis, key, { value: value, configurable: true, writable: true });
|
|
261
254
|
} catch (error) {
|
|
262
|
-
|
|
255
|
+
globalThis[key] = value;
|
|
263
256
|
} return value;
|
|
264
257
|
};
|
|
265
258
|
|
|
@@ -285,10 +278,10 @@ module.exports = !fails(function () {
|
|
|
285
278
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
286
279
|
|
|
287
280
|
|
|
288
|
-
var
|
|
281
|
+
var globalThis = __webpack_require__(4576);
|
|
289
282
|
var isObject = __webpack_require__(34);
|
|
290
283
|
|
|
291
|
-
var document =
|
|
284
|
+
var document = globalThis.document;
|
|
292
285
|
// typeof document.createElement is 'object' in old IE
|
|
293
286
|
var EXISTS = isObject(document) && isObject(document.createElement);
|
|
294
287
|
|
|
@@ -314,24 +307,47 @@ module.exports = function (it) {
|
|
|
314
307
|
|
|
315
308
|
/***/ }),
|
|
316
309
|
|
|
317
|
-
/***/
|
|
310
|
+
/***/ 8727:
|
|
318
311
|
/***/ (function(module) {
|
|
319
312
|
|
|
320
313
|
|
|
321
|
-
|
|
314
|
+
// IE8- don't enum bug keys
|
|
315
|
+
module.exports = [
|
|
316
|
+
'constructor',
|
|
317
|
+
'hasOwnProperty',
|
|
318
|
+
'isPrototypeOf',
|
|
319
|
+
'propertyIsEnumerable',
|
|
320
|
+
'toLocaleString',
|
|
321
|
+
'toString',
|
|
322
|
+
'valueOf'
|
|
323
|
+
];
|
|
322
324
|
|
|
323
325
|
|
|
324
326
|
/***/ }),
|
|
325
327
|
|
|
326
|
-
/***/
|
|
328
|
+
/***/ 2839:
|
|
327
329
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
328
330
|
|
|
329
331
|
|
|
330
|
-
var
|
|
331
|
-
|
|
332
|
+
var globalThis = __webpack_require__(4576);
|
|
333
|
+
|
|
334
|
+
var navigator = globalThis.navigator;
|
|
335
|
+
var userAgent = navigator && navigator.userAgent;
|
|
332
336
|
|
|
333
|
-
|
|
334
|
-
|
|
337
|
+
module.exports = userAgent ? String(userAgent) : '';
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
/***/ }),
|
|
341
|
+
|
|
342
|
+
/***/ 9519:
|
|
343
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
var globalThis = __webpack_require__(4576);
|
|
347
|
+
var userAgent = __webpack_require__(2839);
|
|
348
|
+
|
|
349
|
+
var process = globalThis.process;
|
|
350
|
+
var Deno = globalThis.Deno;
|
|
335
351
|
var versions = process && process.versions || Deno && Deno.version;
|
|
336
352
|
var v8 = versions && versions.v8;
|
|
337
353
|
var match, version;
|
|
@@ -356,31 +372,13 @@ if (!version && userAgent) {
|
|
|
356
372
|
module.exports = version;
|
|
357
373
|
|
|
358
374
|
|
|
359
|
-
/***/ }),
|
|
360
|
-
|
|
361
|
-
/***/ 8727:
|
|
362
|
-
/***/ (function(module) {
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
// IE8- don't enum bug keys
|
|
366
|
-
module.exports = [
|
|
367
|
-
'constructor',
|
|
368
|
-
'hasOwnProperty',
|
|
369
|
-
'isPrototypeOf',
|
|
370
|
-
'propertyIsEnumerable',
|
|
371
|
-
'toLocaleString',
|
|
372
|
-
'toString',
|
|
373
|
-
'valueOf'
|
|
374
|
-
];
|
|
375
|
-
|
|
376
|
-
|
|
377
375
|
/***/ }),
|
|
378
376
|
|
|
379
377
|
/***/ 6518:
|
|
380
378
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
381
379
|
|
|
382
380
|
|
|
383
|
-
var
|
|
381
|
+
var globalThis = __webpack_require__(4576);
|
|
384
382
|
var getOwnPropertyDescriptor = (__webpack_require__(7347).f);
|
|
385
383
|
var createNonEnumerableProperty = __webpack_require__(6699);
|
|
386
384
|
var defineBuiltIn = __webpack_require__(6840);
|
|
@@ -409,11 +407,11 @@ module.exports = function (options, source) {
|
|
|
409
407
|
var STATIC = options.stat;
|
|
410
408
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
411
409
|
if (GLOBAL) {
|
|
412
|
-
target =
|
|
410
|
+
target = globalThis;
|
|
413
411
|
} else if (STATIC) {
|
|
414
|
-
target =
|
|
412
|
+
target = globalThis[TARGET] || defineGlobalProperty(TARGET, {});
|
|
415
413
|
} else {
|
|
416
|
-
target =
|
|
414
|
+
target = globalThis[TARGET] && globalThis[TARGET].prototype;
|
|
417
415
|
}
|
|
418
416
|
if (target) for (key in source) {
|
|
419
417
|
sourceProperty = source[key];
|
|
@@ -532,7 +530,7 @@ module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
|
|
|
532
530
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
533
531
|
|
|
534
532
|
|
|
535
|
-
var
|
|
533
|
+
var globalThis = __webpack_require__(4576);
|
|
536
534
|
var isCallable = __webpack_require__(4901);
|
|
537
535
|
|
|
538
536
|
var aFunction = function (argument) {
|
|
@@ -540,7 +538,7 @@ var aFunction = function (argument) {
|
|
|
540
538
|
};
|
|
541
539
|
|
|
542
540
|
module.exports = function (namespace, method) {
|
|
543
|
-
return arguments.length < 2 ? aFunction(
|
|
541
|
+
return arguments.length < 2 ? aFunction(globalThis[namespace]) : globalThis[namespace] && globalThis[namespace][method];
|
|
544
542
|
};
|
|
545
543
|
|
|
546
544
|
|
|
@@ -563,7 +561,7 @@ module.exports = function (V, P) {
|
|
|
563
561
|
|
|
564
562
|
/***/ }),
|
|
565
563
|
|
|
566
|
-
/***/
|
|
564
|
+
/***/ 4576:
|
|
567
565
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
568
566
|
|
|
569
567
|
|
|
@@ -639,7 +637,7 @@ module.exports = !DESCRIPTORS && !fails(function () {
|
|
|
639
637
|
|
|
640
638
|
var uncurryThis = __webpack_require__(9504);
|
|
641
639
|
var fails = __webpack_require__(9039);
|
|
642
|
-
var classof = __webpack_require__(
|
|
640
|
+
var classof = __webpack_require__(2195);
|
|
643
641
|
|
|
644
642
|
var $Object = Object;
|
|
645
643
|
var split = uncurryThis(''.split);
|
|
@@ -683,7 +681,7 @@ module.exports = store.inspectSource;
|
|
|
683
681
|
|
|
684
682
|
|
|
685
683
|
var NATIVE_WEAK_MAP = __webpack_require__(8622);
|
|
686
|
-
var
|
|
684
|
+
var globalThis = __webpack_require__(4576);
|
|
687
685
|
var isObject = __webpack_require__(34);
|
|
688
686
|
var createNonEnumerableProperty = __webpack_require__(6699);
|
|
689
687
|
var hasOwn = __webpack_require__(9297);
|
|
@@ -692,8 +690,8 @@ var sharedKey = __webpack_require__(6119);
|
|
|
692
690
|
var hiddenKeys = __webpack_require__(421);
|
|
693
691
|
|
|
694
692
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
695
|
-
var TypeError =
|
|
696
|
-
var WeakMap =
|
|
693
|
+
var TypeError = globalThis.TypeError;
|
|
694
|
+
var WeakMap = globalThis.WeakMap;
|
|
697
695
|
var set, get, has;
|
|
698
696
|
|
|
699
697
|
var enforce = function (it) {
|
|
@@ -760,7 +758,7 @@ module.exports = {
|
|
|
760
758
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
761
759
|
|
|
762
760
|
|
|
763
|
-
var classof = __webpack_require__(
|
|
761
|
+
var classof = __webpack_require__(2195);
|
|
764
762
|
|
|
765
763
|
// `IsArray` abstract operation
|
|
766
764
|
// https://tc39.es/ecma262/#sec-isarray
|
|
@@ -1226,17 +1224,17 @@ module.exports = function (key) {
|
|
|
1226
1224
|
|
|
1227
1225
|
|
|
1228
1226
|
var IS_PURE = __webpack_require__(6395);
|
|
1229
|
-
var globalThis = __webpack_require__(
|
|
1227
|
+
var globalThis = __webpack_require__(4576);
|
|
1230
1228
|
var defineGlobalProperty = __webpack_require__(9433);
|
|
1231
1229
|
|
|
1232
1230
|
var SHARED = '__core-js_shared__';
|
|
1233
1231
|
var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
|
|
1234
1232
|
|
|
1235
1233
|
(store.versions || (store.versions = [])).push({
|
|
1236
|
-
version: '3.
|
|
1234
|
+
version: '3.38.1',
|
|
1237
1235
|
mode: IS_PURE ? 'pure' : 'global',
|
|
1238
1236
|
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
1239
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
1237
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE',
|
|
1240
1238
|
source: 'https://github.com/zloirock/core-js'
|
|
1241
1239
|
});
|
|
1242
1240
|
|
|
@@ -1261,11 +1259,11 @@ module.exports = function (key, value) {
|
|
|
1261
1259
|
|
|
1262
1260
|
|
|
1263
1261
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
1264
|
-
var V8_VERSION = __webpack_require__(
|
|
1262
|
+
var V8_VERSION = __webpack_require__(9519);
|
|
1265
1263
|
var fails = __webpack_require__(9039);
|
|
1266
|
-
var
|
|
1264
|
+
var globalThis = __webpack_require__(4576);
|
|
1267
1265
|
|
|
1268
|
-
var $String =
|
|
1266
|
+
var $String = globalThis.String;
|
|
1269
1267
|
|
|
1270
1268
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
1271
1269
|
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
@@ -1491,10 +1489,10 @@ module.exports = DESCRIPTORS && fails(function () {
|
|
|
1491
1489
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
1492
1490
|
|
|
1493
1491
|
|
|
1494
|
-
var
|
|
1492
|
+
var globalThis = __webpack_require__(4576);
|
|
1495
1493
|
var isCallable = __webpack_require__(4901);
|
|
1496
1494
|
|
|
1497
|
-
var WeakMap =
|
|
1495
|
+
var WeakMap = globalThis.WeakMap;
|
|
1498
1496
|
|
|
1499
1497
|
module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
|
|
1500
1498
|
|
|
@@ -1505,14 +1503,14 @@ module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
|
|
|
1505
1503
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
1506
1504
|
|
|
1507
1505
|
|
|
1508
|
-
var
|
|
1506
|
+
var globalThis = __webpack_require__(4576);
|
|
1509
1507
|
var shared = __webpack_require__(5745);
|
|
1510
1508
|
var hasOwn = __webpack_require__(9297);
|
|
1511
1509
|
var uid = __webpack_require__(3392);
|
|
1512
1510
|
var NATIVE_SYMBOL = __webpack_require__(4495);
|
|
1513
1511
|
var USE_SYMBOL_AS_UID = __webpack_require__(7040);
|
|
1514
1512
|
|
|
1515
|
-
var Symbol =
|
|
1513
|
+
var Symbol = globalThis.Symbol;
|
|
1516
1514
|
var WellKnownSymbolsStore = shared('wks');
|
|
1517
1515
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;
|
|
1518
1516
|
|
|
@@ -1690,17 +1688,17 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1690
1688
|
interceptor: function() { return /* reexport */ interceptor; },
|
|
1691
1689
|
log: function() { return /* reexport */ log; },
|
|
1692
1690
|
menus: function() { return /* reexport */ menus; },
|
|
1691
|
+
mixins: function() { return /* reexport */ mixins; },
|
|
1693
1692
|
permission: function() { return /* reexport */ permission; },
|
|
1693
|
+
permissionMixin: function() { return /* reexport */ permissionMixin; },
|
|
1694
1694
|
renderer: function() { return /* reexport */ renderer; },
|
|
1695
1695
|
setConfig: function() { return /* reexport */ setConfig; },
|
|
1696
1696
|
setI18n: function() { return /* reexport */ setI18n; },
|
|
1697
1697
|
setIcon: function() { return /* reexport */ setIcon; },
|
|
1698
1698
|
setLanguage: function() { return /* reexport */ setLanguage; },
|
|
1699
1699
|
setTheme: function() { return /* reexport */ setTheme; },
|
|
1700
|
+
sizeMixin: function() { return /* reexport */ sizeMixin; },
|
|
1700
1701
|
use: function() { return /* reexport */ use; },
|
|
1701
|
-
useFns: function() { return /* reexport */ useFns; },
|
|
1702
|
-
usePermission: function() { return /* reexport */ usePermission; },
|
|
1703
|
-
useSize: function() { return /* reexport */ useSize; },
|
|
1704
1702
|
validators: function() { return /* reexport */ validators; }
|
|
1705
1703
|
});
|
|
1706
1704
|
|
|
@@ -1729,6 +1727,8 @@ var external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_defa
|
|
|
1729
1727
|
;// CONCATENATED MODULE: ./node_modules/dom-zindex/es/index.esm.js
|
|
1730
1728
|
var storeEl = null;
|
|
1731
1729
|
var storeId = 'z-index-manage';
|
|
1730
|
+
var styleEl = null;
|
|
1731
|
+
var styleId = 'z-index-style';
|
|
1732
1732
|
var storeMainKey = 'm';
|
|
1733
1733
|
var storeSubKey = 's';
|
|
1734
1734
|
var storeData = {
|
|
@@ -1754,6 +1754,27 @@ function getDomMaxZIndex() {
|
|
|
1754
1754
|
}
|
|
1755
1755
|
return max;
|
|
1756
1756
|
}
|
|
1757
|
+
function getStyle() {
|
|
1758
|
+
if (!styleEl) {
|
|
1759
|
+
if (isDocument()) {
|
|
1760
|
+
styleEl = document.getElementById(styleId);
|
|
1761
|
+
if (!styleEl) {
|
|
1762
|
+
styleEl = document.createElement('style');
|
|
1763
|
+
styleEl.id = styleId;
|
|
1764
|
+
document.getElementsByTagName('head')[0].appendChild(styleEl);
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
return styleEl;
|
|
1769
|
+
}
|
|
1770
|
+
function updateVar() {
|
|
1771
|
+
var styEl = getStyle();
|
|
1772
|
+
if (styEl) {
|
|
1773
|
+
var prefixes = '--dom-';
|
|
1774
|
+
var propKey = '-z-index';
|
|
1775
|
+
styEl.innerHTML = ':root{' + prefixes + 'main' + propKey + ':' + getCurrent() + ';' + prefixes + 'sub' + propKey + ':' + getSubCurrent() + '}';
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1757
1778
|
function getDom() {
|
|
1758
1779
|
if (!storeEl) {
|
|
1759
1780
|
if (isDocument()) {
|
|
@@ -1784,6 +1805,7 @@ function createSetHandle(key) {
|
|
|
1784
1805
|
}
|
|
1785
1806
|
}
|
|
1786
1807
|
}
|
|
1808
|
+
updateVar();
|
|
1787
1809
|
return storeData[key];
|
|
1788
1810
|
};
|
|
1789
1811
|
}
|
|
@@ -1835,6 +1857,7 @@ var DomZIndex = {
|
|
|
1835
1857
|
getSubNext: getSubNext,
|
|
1836
1858
|
getMax: getDomMaxZIndex
|
|
1837
1859
|
};
|
|
1860
|
+
updateVar();
|
|
1838
1861
|
/* harmony default export */ var index_esm = (DomZIndex);
|
|
1839
1862
|
;// CONCATENATED MODULE: ./packages/src/globalStore.ts
|
|
1840
1863
|
const globalConfigStore = {
|
|
@@ -1849,14 +1872,11 @@ const iconConfigStore = {};
|
|
|
1849
1872
|
const themeConfigStore = {
|
|
1850
1873
|
theme: ''
|
|
1851
1874
|
};
|
|
1852
|
-
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
1853
|
-
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(9274);
|
|
1854
1875
|
;// CONCATENATED MODULE: ./packages/src/i18nStore.ts
|
|
1855
|
-
|
|
1856
|
-
const i18nConfigStore = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
|
|
1876
|
+
const i18nConfigStore = {
|
|
1857
1877
|
language: '',
|
|
1858
1878
|
langMaps: {}
|
|
1859
|
-
}
|
|
1879
|
+
};
|
|
1860
1880
|
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
1861
1881
|
function _typeof(o) {
|
|
1862
1882
|
"@babel/helpers - typeof";
|
|
@@ -2019,9 +2039,9 @@ if (browse.isDoc) {
|
|
|
2019
2039
|
|
|
2020
2040
|
|
|
2021
2041
|
|
|
2022
|
-
/**
|
|
2023
|
-
* 监听 resize 事件
|
|
2024
|
-
* 如果项目中已使用了 resize-observer-polyfill,那么只需要将方法定义全局,该组件就会自动使用
|
|
2042
|
+
/**
|
|
2043
|
+
* 监听 resize 事件
|
|
2044
|
+
* 如果项目中已使用了 resize-observer-polyfill,那么只需要将方法定义全局,该组件就会自动使用
|
|
2025
2045
|
*/
|
|
2026
2046
|
let resizeTimeout;
|
|
2027
2047
|
/* eslint-disable no-use-before-define */
|
|
@@ -2127,7 +2147,7 @@ function createLog(type, name) {
|
|
|
2127
2147
|
return msg;
|
|
2128
2148
|
};
|
|
2129
2149
|
}
|
|
2130
|
-
const version = "
|
|
2150
|
+
const version = "3.0.0-alpha.0";
|
|
2131
2151
|
const log = {
|
|
2132
2152
|
create: createLog,
|
|
2133
2153
|
warn: createLog('warn', `v${version}`),
|
|
@@ -2136,12 +2156,12 @@ const log = {
|
|
|
2136
2156
|
;// CONCATENATED MODULE: ./packages/src/renderer.ts
|
|
2137
2157
|
|
|
2138
2158
|
|
|
2139
|
-
/**
|
|
2140
|
-
* 内置的组件渲染
|
|
2159
|
+
/**
|
|
2160
|
+
* 内置的组件渲染
|
|
2141
2161
|
*/
|
|
2142
2162
|
const renderMap = {};
|
|
2143
|
-
/**
|
|
2144
|
-
* 全局渲染器
|
|
2163
|
+
/**
|
|
2164
|
+
* 全局渲染器
|
|
2145
2165
|
*/
|
|
2146
2166
|
const renderer = {
|
|
2147
2167
|
mixin(opts) {
|
|
@@ -2183,8 +2203,8 @@ const renderer = {
|
|
|
2183
2203
|
|
|
2184
2204
|
|
|
2185
2205
|
|
|
2186
|
-
/**
|
|
2187
|
-
* 创建数据仓库
|
|
2206
|
+
/**
|
|
2207
|
+
* 创建数据仓库
|
|
2188
2208
|
*/
|
|
2189
2209
|
class Store {
|
|
2190
2210
|
constructor() {
|
|
@@ -2488,10 +2508,10 @@ const clipboard = {
|
|
|
2488
2508
|
setStore(data) {
|
|
2489
2509
|
Object.assign(clipStore, data || {});
|
|
2490
2510
|
},
|
|
2491
|
-
/**
|
|
2492
|
-
* 复制内容到剪贴板
|
|
2493
|
-
*
|
|
2494
|
-
* @param {String} content Text 内容
|
|
2511
|
+
/**
|
|
2512
|
+
* 复制内容到剪贴板
|
|
2513
|
+
*
|
|
2514
|
+
* @param {String} content Text 内容
|
|
2495
2515
|
*/
|
|
2496
2516
|
copy(content) {
|
|
2497
2517
|
let result = false;
|
|
@@ -2511,25 +2531,47 @@ const clipboard = {
|
|
|
2511
2531
|
;// CONCATENATED MODULE: ./packages/src/permission.ts
|
|
2512
2532
|
|
|
2513
2533
|
|
|
2514
|
-
function handleCheckInfo(
|
|
2515
|
-
let
|
|
2516
|
-
let
|
|
2534
|
+
function handleCheckInfo(permissionCode, permissionMethod) {
|
|
2535
|
+
let checkVisible = true;
|
|
2536
|
+
let checkDisabled = false;
|
|
2517
2537
|
const checkMethod = permissionMethod || globalConfigStore.permissionMethod;
|
|
2518
|
-
if (
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2538
|
+
if (permissionCode && checkMethod) {
|
|
2539
|
+
checkVisible = false;
|
|
2540
|
+
checkDisabled = true;
|
|
2541
|
+
let vDone = false;
|
|
2542
|
+
let dDone = false;
|
|
2543
|
+
// 或 使用 | 隔开:任意一个为可视,则可视;任意一个禁用,则禁用
|
|
2544
|
+
const codeList = String(permissionCode).split('|');
|
|
2545
|
+
for (let i = 0; i < codeList.length; i++) {
|
|
2546
|
+
const code = codeList[i];
|
|
2547
|
+
let visible = true;
|
|
2548
|
+
let disabled = false;
|
|
2549
|
+
const rest = checkMethod({
|
|
2550
|
+
code
|
|
2551
|
+
});
|
|
2552
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(rest)) {
|
|
2553
|
+
visible = rest;
|
|
2554
|
+
} else if (rest) {
|
|
2555
|
+
visible = !!rest.visible;
|
|
2556
|
+
disabled = !!rest.disabled;
|
|
2557
|
+
}
|
|
2558
|
+
if (!disabled && !dDone) {
|
|
2559
|
+
dDone = true;
|
|
2560
|
+
checkDisabled = disabled;
|
|
2561
|
+
}
|
|
2562
|
+
if (visible && !vDone) {
|
|
2563
|
+
vDone = true;
|
|
2564
|
+
checkVisible = visible;
|
|
2565
|
+
}
|
|
2566
|
+
if (vDone && dDone) {
|
|
2567
|
+
break;
|
|
2568
|
+
}
|
|
2527
2569
|
}
|
|
2528
2570
|
}
|
|
2529
2571
|
const info = {
|
|
2530
|
-
code,
|
|
2531
|
-
visible,
|
|
2532
|
-
disabled
|
|
2572
|
+
code: permissionCode,
|
|
2573
|
+
visible: checkVisible,
|
|
2574
|
+
disabled: checkDisabled
|
|
2533
2575
|
};
|
|
2534
2576
|
return info;
|
|
2535
2577
|
}
|
|
@@ -2549,31 +2591,44 @@ const permission = {
|
|
|
2549
2591
|
;// CONCATENATED MODULE: ./packages/src/hooks.ts
|
|
2550
2592
|
|
|
2551
2593
|
const hooks = new store();
|
|
2552
|
-
;// CONCATENATED MODULE: ./packages/src/
|
|
2594
|
+
;// CONCATENATED MODULE: ./packages/src/mixins.ts
|
|
2553
2595
|
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
}
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2596
|
+
const sizeMixin = {
|
|
2597
|
+
inject: {
|
|
2598
|
+
$xeSizeInfo: {
|
|
2599
|
+
default: null
|
|
2600
|
+
}
|
|
2601
|
+
},
|
|
2602
|
+
provide() {
|
|
2603
|
+
return {
|
|
2604
|
+
$xeSizeInfo: {
|
|
2605
|
+
size: this.vSize
|
|
2606
|
+
}
|
|
2607
|
+
};
|
|
2608
|
+
},
|
|
2609
|
+
computed: {
|
|
2610
|
+
vSize() {
|
|
2611
|
+
const {
|
|
2612
|
+
$xeSizeInfo,
|
|
2613
|
+
size
|
|
2614
|
+
} = this;
|
|
2615
|
+
return size || ($xeSizeInfo ? $xeSizeInfo.size : null);
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
};
|
|
2619
|
+
const permissionMixin = {
|
|
2620
|
+
props: {
|
|
2621
|
+
permissionCode: String
|
|
2622
|
+
},
|
|
2623
|
+
computed: {
|
|
2624
|
+
permissionInfo() {
|
|
2625
|
+
return handleCheckInfo(this.permissionCode, this.permissionMethod);
|
|
2626
|
+
}
|
|
2627
|
+
}
|
|
2628
|
+
};
|
|
2629
|
+
const mixins = {
|
|
2630
|
+
sizeMixin,
|
|
2631
|
+
permissionMixin
|
|
2577
2632
|
};
|
|
2578
2633
|
;// CONCATENATED MODULE: ./packages/src/core.ts
|
|
2579
2634
|
|
|
@@ -2619,8 +2674,8 @@ function setI18n(locale, data) {
|
|
|
2619
2674
|
i18nConfigStore.langMaps[locale] = Object.assign({}, data);
|
|
2620
2675
|
return VxeUI;
|
|
2621
2676
|
}
|
|
2622
|
-
/**
|
|
2623
|
-
* 全局参数设置
|
|
2677
|
+
/**
|
|
2678
|
+
* 全局参数设置
|
|
2624
2679
|
*/
|
|
2625
2680
|
function setConfig(options) {
|
|
2626
2681
|
if (options) {
|
|
@@ -2634,8 +2689,8 @@ function setConfig(options) {
|
|
|
2634
2689
|
}
|
|
2635
2690
|
return VxeUI;
|
|
2636
2691
|
}
|
|
2637
|
-
/**
|
|
2638
|
-
* 获取全局参数
|
|
2692
|
+
/**
|
|
2693
|
+
* 获取全局参数
|
|
2639
2694
|
*/
|
|
2640
2695
|
function getConfig(key, defaultValue) {
|
|
2641
2696
|
return arguments.length ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(globalConfigStore, key, defaultValue) : globalConfigStore;
|
|
@@ -2649,7 +2704,7 @@ function setIcon(options) {
|
|
|
2649
2704
|
function getIcon(key) {
|
|
2650
2705
|
return arguments.length ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(iconConfigStore, key) : iconConfigStore;
|
|
2651
2706
|
}
|
|
2652
|
-
const coreVersion = "
|
|
2707
|
+
const coreVersion = "3.0.0-alpha.0";
|
|
2653
2708
|
const installedPlugins = [];
|
|
2654
2709
|
function use(Plugin, options) {
|
|
2655
2710
|
if (Plugin && Plugin.install) {
|
|
@@ -2698,7 +2753,7 @@ const VxeUI = {
|
|
|
2698
2753
|
hooks: hooks,
|
|
2699
2754
|
component,
|
|
2700
2755
|
getComponent,
|
|
2701
|
-
|
|
2756
|
+
mixins: mixins,
|
|
2702
2757
|
use
|
|
2703
2758
|
};
|
|
2704
2759
|
setTheme();
|