@vxe-ui/core 1.0.7 → 1.0.9
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.en.md +31 -31
- package/README.md +31 -31
- package/README.zh-TW.md +31 -31
- package/es/src/core.js +3 -2
- package/es/src/i18n.js +4 -0
- package/es/src/log.js +1 -1
- package/lib/index.umd.js +27 -22
- package/lib/index.umd.min.js +1 -1
- package/lib/src/clipboard.min.js +1 -1
- package/lib/src/commands.min.js +1 -1
- package/lib/src/core.js +2 -1
- package/lib/src/core.min.js +1 -1
- package/lib/src/event.min.js +1 -1
- package/lib/src/formats.min.js +1 -1
- package/lib/src/globalStore.min.js +1 -1
- package/lib/src/hooks.min.js +1 -1
- package/lib/src/i18n.js +7 -0
- package/lib/src/i18n.min.js +1 -1
- package/lib/src/i18nStore.min.js +1 -1
- package/lib/src/iconStore.min.js +1 -1
- package/lib/src/interceptor.min.js +1 -1
- package/lib/src/log.js +1 -1
- package/lib/src/log.min.js +1 -1
- package/lib/src/menus.min.js +1 -1
- package/lib/src/renderer.min.js +1 -1
- package/lib/src/resize.min.js +1 -1
- package/lib/src/store.min.js +1 -1
- package/lib/src/themeStore.min.js +1 -1
- package/lib/src/useFns.min.js +1 -1
- package/lib/src/validators.min.js +1 -1
- package/package.json +78 -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 +164 -163
- 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 -14
- package/packages/src/i18nStore.ts +11 -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/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/useFns.ts +18 -18
- 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 +49 -49
- 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 +1 -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 +216 -211
- 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/renderer.d.ts +14 -14
- package/types/core/useFn.d.ts +17 -17
- package/types/core/validators.d.ts +19 -19
- package/types/index.d.ts +10 -10
- package/types/tool/common.d.ts +70 -70
- package/types/tool/index.d.ts +2 -2
- package/types/tool/util.d.ts +4 -4
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2019 xuliangzhan
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 xuliangzhan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.en.md
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
# vxe-core
|
|
2
|
-
|
|
3
|
-
[简体中文](README.md) | [繁體中文](README.zh-TW.md) | English
|
|
4
|
-
|
|
5
|
-
Vxe UI core library.
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
```shell
|
|
10
|
-
npm install @vxe-ui/core
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
```javascript
|
|
14
|
-
// ...
|
|
15
|
-
import VxeCore from '@vxe-ui/core'
|
|
16
|
-
// ...
|
|
17
|
-
|
|
18
|
-
VxeCore.setConfig({
|
|
19
|
-
// ...
|
|
20
|
-
})
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Contributors
|
|
24
|
-
|
|
25
|
-
Thank you to everyone who contributed to this project.
|
|
26
|
-
|
|
27
|
-
[](https://github.com/x-extends/vxe-core/graphs/contributors)
|
|
28
|
-
|
|
29
|
-
## License
|
|
30
|
-
|
|
31
|
-
[MIT](LICENSE) © 2019-present, Xu Liangzhan
|
|
1
|
+
# vxe-core
|
|
2
|
+
|
|
3
|
+
[简体中文](README.md) | [繁體中文](README.zh-TW.md) | English
|
|
4
|
+
|
|
5
|
+
Vxe UI core library.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
npm install @vxe-ui/core
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```javascript
|
|
14
|
+
// ...
|
|
15
|
+
import VxeCore from '@vxe-ui/core'
|
|
16
|
+
// ...
|
|
17
|
+
|
|
18
|
+
VxeCore.setConfig({
|
|
19
|
+
// ...
|
|
20
|
+
})
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Contributors
|
|
24
|
+
|
|
25
|
+
Thank you to everyone who contributed to this project.
|
|
26
|
+
|
|
27
|
+
[](https://github.com/x-extends/vxe-core/graphs/contributors)
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
|
|
31
|
+
[MIT](LICENSE) © 2019-present, Xu Liangzhan
|
package/README.md
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
# vxe-core
|
|
2
|
-
|
|
3
|
-
简体中文 | [繁體中文](README.zh-TW.md) | [English](README.en.md)
|
|
4
|
-
|
|
5
|
-
Vxe UI 核心库.
|
|
6
|
-
|
|
7
|
-
## 使用
|
|
8
|
-
|
|
9
|
-
```shell
|
|
10
|
-
npm install @vxe-ui/core
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
```javascript
|
|
14
|
-
// ...
|
|
15
|
-
import VxeCore from '@vxe-ui/core'
|
|
16
|
-
// ...
|
|
17
|
-
|
|
18
|
-
VxeCore.setConfig({
|
|
19
|
-
// ...
|
|
20
|
-
})
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Contributors
|
|
24
|
-
|
|
25
|
-
Thank you to everyone who contributed to this project.
|
|
26
|
-
|
|
27
|
-
[](https://github.com/x-extends/vxe-core/graphs/contributors)
|
|
28
|
-
|
|
29
|
-
## License
|
|
30
|
-
|
|
31
|
-
[MIT](LICENSE) © 2019-present, Xu Liangzhan
|
|
1
|
+
# vxe-core
|
|
2
|
+
|
|
3
|
+
简体中文 | [繁體中文](README.zh-TW.md) | [English](README.en.md)
|
|
4
|
+
|
|
5
|
+
Vxe UI 核心库.
|
|
6
|
+
|
|
7
|
+
## 使用
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
npm install @vxe-ui/core
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```javascript
|
|
14
|
+
// ...
|
|
15
|
+
import VxeCore from '@vxe-ui/core'
|
|
16
|
+
// ...
|
|
17
|
+
|
|
18
|
+
VxeCore.setConfig({
|
|
19
|
+
// ...
|
|
20
|
+
})
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Contributors
|
|
24
|
+
|
|
25
|
+
Thank you to everyone who contributed to this project.
|
|
26
|
+
|
|
27
|
+
[](https://github.com/x-extends/vxe-core/graphs/contributors)
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
|
|
31
|
+
[MIT](LICENSE) © 2019-present, Xu Liangzhan
|
package/README.zh-TW.md
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
# vxe-core
|
|
2
|
-
|
|
3
|
-
[简体中文](README.md) | 繁體中文 | [English](README.en.md)
|
|
4
|
-
|
|
5
|
-
Vxe UI core library.
|
|
6
|
-
|
|
7
|
-
## 使用
|
|
8
|
-
|
|
9
|
-
```shell
|
|
10
|
-
npm install @vxe-ui/core
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
```javascript
|
|
14
|
-
// ...
|
|
15
|
-
import VxeCore from '@vxe-ui/core'
|
|
16
|
-
// ...
|
|
17
|
-
|
|
18
|
-
VxeCore.setConfig({
|
|
19
|
-
// ...
|
|
20
|
-
})
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Contributors
|
|
24
|
-
|
|
25
|
-
Thank you to everyone who contributed to this project.
|
|
26
|
-
|
|
27
|
-
[](https://github.com/x-extends/vxe-core/graphs/contributors)
|
|
28
|
-
|
|
29
|
-
## License
|
|
30
|
-
|
|
31
|
-
[MIT](LICENSE) © 2019-present, Xu Liangzhan
|
|
1
|
+
# vxe-core
|
|
2
|
+
|
|
3
|
+
[简体中文](README.md) | 繁體中文 | [English](README.en.md)
|
|
4
|
+
|
|
5
|
+
Vxe UI core library.
|
|
6
|
+
|
|
7
|
+
## 使用
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
npm install @vxe-ui/core
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```javascript
|
|
14
|
+
// ...
|
|
15
|
+
import VxeCore from '@vxe-ui/core'
|
|
16
|
+
// ...
|
|
17
|
+
|
|
18
|
+
VxeCore.setConfig({
|
|
19
|
+
// ...
|
|
20
|
+
})
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Contributors
|
|
24
|
+
|
|
25
|
+
Thank you to everyone who contributed to this project.
|
|
26
|
+
|
|
27
|
+
[](https://github.com/x-extends/vxe-core/graphs/contributors)
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
|
|
31
|
+
[MIT](LICENSE) © 2019-present, Xu Liangzhan
|
package/es/src/core.js
CHANGED
|
@@ -6,7 +6,7 @@ import { themeConfigStore } from './themeStore';
|
|
|
6
6
|
import { i18nConfigStore } from './i18nStore';
|
|
7
7
|
import { globalEvents, GLOBAL_EVENT_KEYS, createEvent } from './event';
|
|
8
8
|
import { globalResize } from './resize';
|
|
9
|
-
import { getI18n, hasLanguage } from './i18n';
|
|
9
|
+
import { getI18n, hasLanguage, getLanguage } from './i18n';
|
|
10
10
|
import { renderer } from './renderer';
|
|
11
11
|
import { validators } from './validators';
|
|
12
12
|
import { menus } from './menus';
|
|
@@ -69,7 +69,7 @@ export function setIcon(options) {
|
|
|
69
69
|
export function getIcon(key) {
|
|
70
70
|
return arguments.length ? XEUtils.get(iconConfigStore, key) : iconConfigStore;
|
|
71
71
|
}
|
|
72
|
-
export const coreVersion = "1.0.
|
|
72
|
+
export const coreVersion = "1.0.9";
|
|
73
73
|
const installedPlugins = [];
|
|
74
74
|
export function use(Plugin, options) {
|
|
75
75
|
if (Plugin && Plugin.install) {
|
|
@@ -99,6 +99,7 @@ export const VxeUI = {
|
|
|
99
99
|
getIcon: getIcon,
|
|
100
100
|
setLanguage,
|
|
101
101
|
hasLanguage,
|
|
102
|
+
getLanguage,
|
|
102
103
|
setI18n,
|
|
103
104
|
getI18n,
|
|
104
105
|
globalEvents,
|
package/es/src/i18n.js
CHANGED
package/es/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -1662,8 +1662,6 @@ $({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
|
|
|
1662
1662
|
/******/
|
|
1663
1663
|
/************************************************************************/
|
|
1664
1664
|
var __webpack_exports__ = {};
|
|
1665
|
-
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
1666
|
-
!function() {
|
|
1667
1665
|
// ESM COMPAT FLAG
|
|
1668
1666
|
__webpack_require__.r(__webpack_exports__);
|
|
1669
1667
|
|
|
@@ -1682,6 +1680,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1682
1680
|
getConfig: function() { return /* reexport */ getConfig; },
|
|
1683
1681
|
getI18n: function() { return /* reexport */ getI18n; },
|
|
1684
1682
|
getIcon: function() { return /* reexport */ getIcon; },
|
|
1683
|
+
getLanguage: function() { return /* reexport */ getLanguage; },
|
|
1685
1684
|
getTheme: function() { return /* reexport */ getTheme; },
|
|
1686
1685
|
globalEvents: function() { return /* reexport */ globalEvents; },
|
|
1687
1686
|
globalResize: function() { return /* reexport */ globalResize; },
|
|
@@ -2017,9 +2016,9 @@ if (browse.isDoc) {
|
|
|
2017
2016
|
|
|
2018
2017
|
|
|
2019
2018
|
|
|
2020
|
-
/**
|
|
2021
|
-
* 监听 resize 事件
|
|
2022
|
-
* 如果项目中已使用了 resize-observer-polyfill,那么只需要将方法定义全局,该组件就会自动使用
|
|
2019
|
+
/**
|
|
2020
|
+
* 监听 resize 事件
|
|
2021
|
+
* 如果项目中已使用了 resize-observer-polyfill,那么只需要将方法定义全局,该组件就会自动使用
|
|
2023
2022
|
*/
|
|
2024
2023
|
let resizeTimeout;
|
|
2025
2024
|
/* eslint-disable no-use-before-define */
|
|
@@ -2110,6 +2109,12 @@ function hasLanguage(language) {
|
|
|
2110
2109
|
} = i18nConfigStore;
|
|
2111
2110
|
return !!langMaps[language];
|
|
2112
2111
|
}
|
|
2112
|
+
function getLanguage() {
|
|
2113
|
+
const {
|
|
2114
|
+
language
|
|
2115
|
+
} = i18nConfigStore;
|
|
2116
|
+
return language;
|
|
2117
|
+
}
|
|
2113
2118
|
;// CONCATENATED MODULE: ./packages/src/log.ts
|
|
2114
2119
|
|
|
2115
2120
|
function createLog(type, name) {
|
|
@@ -2119,7 +2124,7 @@ function createLog(type, name) {
|
|
|
2119
2124
|
return msg;
|
|
2120
2125
|
};
|
|
2121
2126
|
}
|
|
2122
|
-
const version = "1.0.
|
|
2127
|
+
const version = "1.0.9";
|
|
2123
2128
|
const log = {
|
|
2124
2129
|
create: createLog,
|
|
2125
2130
|
warn: createLog('warn', `v${version}`),
|
|
@@ -2128,12 +2133,12 @@ const log = {
|
|
|
2128
2133
|
;// CONCATENATED MODULE: ./packages/src/renderer.ts
|
|
2129
2134
|
|
|
2130
2135
|
|
|
2131
|
-
/**
|
|
2132
|
-
* 内置的组件渲染
|
|
2136
|
+
/**
|
|
2137
|
+
* 内置的组件渲染
|
|
2133
2138
|
*/
|
|
2134
2139
|
const renderMap = {};
|
|
2135
|
-
/**
|
|
2136
|
-
* 全局渲染器
|
|
2140
|
+
/**
|
|
2141
|
+
* 全局渲染器
|
|
2137
2142
|
*/
|
|
2138
2143
|
const renderer = {
|
|
2139
2144
|
mixin(opts) {
|
|
@@ -2175,8 +2180,8 @@ const renderer = {
|
|
|
2175
2180
|
|
|
2176
2181
|
|
|
2177
2182
|
|
|
2178
|
-
/**
|
|
2179
|
-
* 创建数据仓库
|
|
2183
|
+
/**
|
|
2184
|
+
* 创建数据仓库
|
|
2180
2185
|
*/
|
|
2181
2186
|
class Store {
|
|
2182
2187
|
constructor() {
|
|
@@ -2480,10 +2485,10 @@ const clipboard = {
|
|
|
2480
2485
|
setStore(data) {
|
|
2481
2486
|
Object.assign(clipStore, data || {});
|
|
2482
2487
|
},
|
|
2483
|
-
/**
|
|
2484
|
-
* 复制内容到剪贴板
|
|
2485
|
-
*
|
|
2486
|
-
* @param {String} content Text 内容
|
|
2488
|
+
/**
|
|
2489
|
+
* 复制内容到剪贴板
|
|
2490
|
+
*
|
|
2491
|
+
* @param {String} content Text 内容
|
|
2487
2492
|
*/
|
|
2488
2493
|
copy(content) {
|
|
2489
2494
|
let result = false;
|
|
@@ -2562,8 +2567,8 @@ function setI18n(locale, data) {
|
|
|
2562
2567
|
i18nConfigStore.langMaps[locale] = Object.assign({}, data);
|
|
2563
2568
|
return VxeUI;
|
|
2564
2569
|
}
|
|
2565
|
-
/**
|
|
2566
|
-
* 全局参数设置
|
|
2570
|
+
/**
|
|
2571
|
+
* 全局参数设置
|
|
2567
2572
|
*/
|
|
2568
2573
|
function setConfig(options) {
|
|
2569
2574
|
if (options) {
|
|
@@ -2577,8 +2582,8 @@ function setConfig(options) {
|
|
|
2577
2582
|
}
|
|
2578
2583
|
return VxeUI;
|
|
2579
2584
|
}
|
|
2580
|
-
/**
|
|
2581
|
-
* 获取全局参数
|
|
2585
|
+
/**
|
|
2586
|
+
* 获取全局参数
|
|
2582
2587
|
*/
|
|
2583
2588
|
function getConfig(key, defaultValue) {
|
|
2584
2589
|
return arguments.length ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(globalConfigStore, key, defaultValue) : globalConfigStore;
|
|
@@ -2592,7 +2597,7 @@ function setIcon(options) {
|
|
|
2592
2597
|
function getIcon(key) {
|
|
2593
2598
|
return arguments.length ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(iconConfigStore, key) : iconConfigStore;
|
|
2594
2599
|
}
|
|
2595
|
-
const coreVersion = "1.0.
|
|
2600
|
+
const coreVersion = "1.0.9";
|
|
2596
2601
|
const installedPlugins = [];
|
|
2597
2602
|
function use(Plugin, options) {
|
|
2598
2603
|
if (Plugin && Plugin.install) {
|
|
@@ -2622,6 +2627,7 @@ const VxeUI = {
|
|
|
2622
2627
|
getIcon: getIcon,
|
|
2623
2628
|
setLanguage,
|
|
2624
2629
|
hasLanguage: hasLanguage,
|
|
2630
|
+
getLanguage: getLanguage,
|
|
2625
2631
|
setI18n,
|
|
2626
2632
|
getI18n: getI18n,
|
|
2627
2633
|
globalEvents: globalEvents,
|
|
@@ -2667,7 +2673,6 @@ setTheme();
|
|
|
2667
2673
|
/* harmony default export */ var entry_lib = (packages_0);
|
|
2668
2674
|
|
|
2669
2675
|
|
|
2670
|
-
}();
|
|
2671
2676
|
/******/ return __webpack_exports__;
|
|
2672
2677
|
/******/ })()
|
|
2673
2678
|
;
|
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(Ot,St){return function(){"use strict";var i={9274:function(t){t.exports=Ot},8871:function(t){t.exports=St},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}})}},k={};function r(t){var e=k[t];return void 0!==e||(e=k[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 E},VxeUI:function(){return N},clipboard:function(){return mt},commands:function(){return R},component:function(){return st},coreVersion:function(){return xt},createEvent:function(){return pt},default:function(){return ft},formats:function(){return A},getComponent:function(){return at},getConfig:function(){return ot},getI18n:function(){return v},getIcon:function(){return ut},getTheme:function(){return tt},globalEvents:function(){return dt},globalResize:function(){return gt},hasLanguage:function(){return J},hooks:function(){return bt},interceptor:function(){return z},log:function(){return T},menus:function(){return I},renderer:function(){return M},setConfig:function(){return rt},setI18n:function(){return nt},setIcon:function(){return it},setLanguage:function(){return et},setTheme:function(){return m},use:function(){return ct},useFns:function(){return yt},useSize:function(){return Q},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),u=r.n(n),o=null,D="z-index-manage",c={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),a(c.m),f(c.s)),o}function U(n){return function(t){var e;return t&&(t=Number(t),c[n]=t,e=V())&&(e.dataset?e.dataset[n]=t+"":e.setAttribute("data-"+n,t+"")),c[n]}}var a=U("m");function B(r,o){return function(t){var e=V(),n=(n=e&&(e=e.dataset?e.dataset[r]:e.getAttribute("data-"+r))?Number(e):n)||c[r];return t?Number(t)<n?o():t:n}}var s=B("m",$);function $(){return a(s()+1)}var f=U("s"),G=B("s",X);function q(){return s()+G()}function X(){return f(G()+1),q()}var K={setCurrent:a,getCurrent:s,getNext:$,setSubCurrent:f,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 b={size:"",version:1,zIndex:999,resizeInterval:500},y={},x={theme:""};var l=r(9274);const w=(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 E={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"},O=(n=u().browse(),{" ":"Spacebar",Apps:E.CONTEXT_MENU,Del:E.DELETE,Up:E.ARROW_UP,Down:E.ARROW_DOWN,Left:E.ARROW_LEFT,Right:E.ARROW_RIGHT}),S=n.firefox?"DOMMouseScroll":"mousewheel",j=[];function h(n){const r=n.type===S;j.forEach(({type:t,cb:e})=>{n.cancelBubble||(t===n.type||r&&"mousewheel"===t)&&e(n)})}class lt{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 pt=(t,e,n)=>new lt(t,e,n),dt={on(t,e,n){j.push({comp:t,type:e,cb:n})},off(e,n){u().remove(j,t=>t.comp===e&&t.type===n)},hasKey(t,e){t=t.key;return e=e.toLowerCase(),!(!t||e!==t.toLowerCase()&&(!O[t]||O[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(S,u().throttle(h,100,{leading:!0,trailing:!1}),{passive:!0,capture:!1}));let t;const P=[],ht=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,b.resizeInterval||ht)}class vt{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){u().remove(P,t=>t.tarList.some(t=>t.target===e))}disconnect(){u().remove(P,t=>t===this)}}const gt={create(t){return new(window.ResizeObserver||vt)(t)}};function v(t,e){var{langMaps:n,language:r}=w;return u().toFormatString(u().get(n[r],t,t),e)}function J(t){var e=w["langMaps"];return!!e[t]}function g(n,r){return function(t,e){t=`[vxe ${r||""}] `+v(t,e);return console[n](t),t}}const T={create:g,warn:g("warn","v1.0.7"),err:g("error","v1.0.7")},C={},M={mixin(t){return u().each(t,(t,e)=>M.add(e,t)),M},get(t){return C[t]||null},add(n,t){if(n&&t){const r=C[n];r?(u().each(t,(t,e)=>{u().eqNull(r[e])||r[e]===t||T.warn("vxe.error.coverProp",["Renderer."+n,e])}),Object.assign(r,t)):C[n]=t}return M},forEach(t){return u().objectEach(C,t),M},delete(t){return delete C[t],M}},L=new(n=class{constructor(){d(this,"store",{})}mixin(t){return u().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=u().keys(e);u().each(t,(t,e)=>{r.includes(e)&&T.warn("vxe.error.coverProp",[n,e])})}return this.store[n]=e?u().merge(e,t):t,this}delete(t){delete this.store[t]}forEach(t){u().objectEach(this.store,t)}}),I=(Object.assign(L,{_name:"Validators"}),new class{constructor(){d(this,"store",{})}mixin(t){return u().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];u().isFunction(t)&&(T.warn("vxe.error.delProp",["menus -> callback","menuMethod"]),t={menuMethod:t});{const r=u().keys(e);u().each(t,(t,e)=>{r.includes(e)&&T.warn("vxe.error.coverProp",[n,e])})}return this.store[n]=e?u().merge(e,t):t,this}delete(t){delete this.store[t]}forEach(t){u().objectEach(this.store,t)}}),A=(Object.assign(I,{_name:"Menus"}),new class{constructor(){d(this,"store",{})}mixin(t){return u().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];u().isFunction(t)&&(T.warn("vxe.error.delProp",["formats -> callback","cellFormatMethod"]),t={cellFormatMethod:t});{const r=u().keys(e);u().each(t,(t,e)=>{r.includes(e)&&T.warn("vxe.error.coverProp",[n,e])})}return this.store[n]=e?u().merge(e,t):t,this}delete(t){delete this.store[t]}forEach(t){u().objectEach(this.store,t)}}),R=(Object.assign(A,{_name:"Formats"}),new class{constructor(){d(this,"store",{})}mixin(t){return u().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];u().isFunction(t)&&(T.warn("vxe.error.delProp",["commands -> callback","commandMethod"]),t={commandMethod:t});{const r=u().keys(e);u().each(t,(t,e)=>{r.includes(e)&&T.warn("vxe.error.coverProp",[n,e])})}return this.store[n]=e?u().merge(e,t):t,this}delete(t){delete this.store[t]}forEach(t){u().objectEach(this.store,t)}}),_=(Object.assign(R,{_name:"Commands"}),{}),z={mixin(t){return u().each(t,(t,e)=>{z.add(e,t)}),z},get(t){return _[t]||[]},add(e,n){n=(n=u().isFunction(n)?{tableInterceptorMethod:n}:n).tableInterceptorMethod;if(n){let t=_[e];-1<(t=t||(_[e]=[])).indexOf(n)&&T.warn("vxe.error.coverProp",["Interceptor",e]),t.push(n)}return z},delete(t,e){var n=_[t];if(n){const r=(e=u().isFunction(e)?{tableInterceptorMethod:e}:e)?e.tableInterceptorMethod:null;r?u().remove(n,t=>t===r):delete _[t]}}};let i;const F={text:"",html:""},mt={getStore(){return F},setStore(t){Object.assign(F,t||{})},copy(t){let e=!1;try{var n=u().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(),F.text=n,F.html=""}catch(t){}var r,o;return e}},bt=new n;function Q(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}}const yt={useSize:Q};function m(t){var e,t=t&&"default"!==t?t:"light";return x.theme=t,"undefined"!=typeof document&&(e=document.documentElement)&&e.setAttribute("data-vxe-ui-theme",t),N}function tt(){return x.theme}function et(t){return w.language=t||"zh-CN",N}function nt(t,e){return w.langMaps[t]=Object.assign({},e),N}function rt(t){return t&&(t.zIndex&&K.setCurrent(t.zIndex),t.theme&&m(t.theme),u().merge(b,t)),N}function ot(t,e){return arguments.length?u().get(b,t,e):b}function it(t){return t&&Object.assign(y,t),N}function ut(t){return arguments.length?u().get(y,t):y}const xt="1.0.7",wt=[];function ct(t,e){return t&&t.install&&-1===wt.indexOf(t)&&(t.install(N,e),wt.push(t)),N}const Et={};function at(t){return Et[t]||null}function st(t){t&&t.name&&(Et[t.name]=t)}const N={coreVersion:xt,setTheme:m,getTheme:tt,setConfig:rt,getConfig:ot,setIcon:it,getIcon:ut,setLanguage:et,hasLanguage:J,setI18n:nt,getI18n:v,globalEvents:dt,GLOBAL_EVENT_KEYS:E,createEvent:pt,globalResize:gt,renderer:M,validators:L,menus:I,formats:A,commands:R,interceptor:z,clipboard:mt,log:T,hooks:bt,component:st,getComponent:at,useFns:yt,use:ct};m();var ft=N}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(vt,gt){{var mt={9274:function(t){t.exports=vt},8871:function(t){t.exports=gt},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}})}},R={};function _(t){var e=R[t];return void 0!==e||(e=R[t]={exports:{}},mt[t].call(e.exports,e,e.exports,_)),e.exports}_.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return _.d(e,{a:e}),e},_.d=function(t,e){for(var n in e)_.o(e,n)&&!_.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},_.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),_.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},_.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},_.p="";var z={},F=(_.r(z),_.d(z,{GLOBAL_EVENT_KEYS:function(){return t},VxeUI:function(){return A},clipboard:function(){return P},commands:function(){return w},component:function(){return St},coreVersion:function(){return L},createEvent:function(){return a},default:function(){return jt},formats:function(){return x},getComponent:function(){return Ot},getConfig:function(){return dt},getI18n:function(){return rt},getIcon:function(){return wt},getLanguage:function(){return it},getTheme:function(){return st},globalEvents:function(){return s},globalResize:function(){return d},hasLanguage:function(){return ot},hooks:function(){return T},interceptor:function(){return O},log:function(){return h},menus:function(){return y},renderer:function(){return g},setConfig:function(){return pt},setI18n:function(){return lt},setIcon:function(){return ht},setLanguage:function(){return ft},setTheme:function(){return at},use:function(){return Et},useFns:function(){return C},useSize:function(){return ct},validators:function(){return b}}),"undefined"!=typeof window&&(F=(F=window.document.currentScript)&&F.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(_.p=F[1]),_(4114),_(8871)),N=_.n(F),k=null,D="z-index-manage",W={m:1e3,s:1e3};function V(){return"undefined"!=typeof document}function U(){return k||!V()||(k=document.getElementById(D))||((k=document.createElement("div")).id=D,k.style.display="none",document.body.appendChild(k),$(W.m),K(W.s)),k}function B(n){return function(t){var e;return t&&(t=Number(t),W[n]=t,e=U())&&(e.dataset?e.dataset[n]=t+"":e.setAttribute("data-"+n,t+"")),W[n]}}var $=B("m");function G(r,o){return function(t){var e=U(),n=(n=e&&(e=e.dataset?e.dataset[r]:e.getAttribute("data-"+r))?Number(e):n)||W[r];return t?Number(t)<n?o():t:n}}var q=G("m",X);function X(){return $(q()+1)}var K=B("s"),H=G("s",Z);function Y(){return q()+H()}function Z(){return K(H()+1),Y()}var bt={setCurrent:$,getCurrent:q,getNext:X,setSubCurrent:K,getSubCurrent:Y,getSubNext:Z,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}};let n={size:"",version:1,zIndex:999,resizeInterval:500},e={},r={theme:""};var J=_(9274);let o=(0,J.reactive)({language:"",langMaps:{}});function Q(t){return(Q="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 yt(t){t=function(t,e){if("object"!=Q(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);if("object"!=Q(n=n.call(t,e||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==Q(t)?t:t+""}function tt(t,e,n){(e=yt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}let t={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"},i=(F=N().browse(),{" ":"Spacebar",Apps:t.CONTEXT_MENU,Del:t.DELETE,Up:t.ARROW_UP,Down:t.ARROW_DOWN,Left:t.ARROW_LEFT,Right:t.ARROW_RIGHT}),u=F.firefox?"DOMMouseScroll":"mousewheel",c=[];function et(n){let r=n.type===u;c.forEach(({type:t,cb:e})=>{n.cancelBubble||(t===n.type||r&&"mousewheel"===t)&&e(n)})}class Pt{constructor(t,e,n){tt(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()}}let a=(t,e,n)=>new Pt(t,e,n),s={on(t,e,n){c.push({comp:t,type:e,cb:n})},off(e,n){N().remove(c,t=>t.comp===e&&t.type===n)},hasKey(t,e){t=t.key;return e=e.toLowerCase(),!(!t||e!==t.toLowerCase()&&(!i[t]||i[t].toLowerCase()!==e))}};F.isDoc&&(F.msie||(window.addEventListener("copy",et,!1),window.addEventListener("cut",et,!1),window.addEventListener("paste",et,!1)),document.addEventListener("keydown",et,!1),document.addEventListener("contextmenu",et,!1),window.addEventListener("mousedown",et,!1),window.addEventListener("blur",et,!1),window.addEventListener("resize",et,!1),window.addEventListener(u,N().throttle(et,100,{leading:!0,trailing:!1}),{passive:!0,capture:!1}));let f,l=[],p=500;function xt(){l.length&&(l.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))})}),nt())}function nt(){clearTimeout(f),f=setTimeout(xt,n.resizeInterval||p)}class Tt{constructor(t){tt(this,"tarList",[]),tt(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}),l.length||nt(),l.some(t=>t===this)||l.push(this))}unobserve(e){N().remove(l,t=>t.tarList.some(t=>t.target===e))}disconnect(){N().remove(l,t=>t===this)}}let d={create(t){return new(window.ResizeObserver||Tt)(t)}};function rt(t,e){var{langMaps:n,language:r}=o;return N().toFormatString(N().get(n[r],t,t),e)}function ot(t){var e=o["langMaps"];return!!e[t]}function it(){var t=o["language"];return t}function ut(n,r){return function(t,e){t=`[vxe ${r||""}] `+rt(t,e);return console[n](t),t}}let h={create:ut,warn:ut("warn","v1.0.9"),err:ut("error","v1.0.9")},v={},g={mixin(t){return N().each(t,(t,e)=>g.add(e,t)),g},get(t){return v[t]||null},add(r,t){if(r&&t){let n=v[r];n?(N().each(t,(t,e)=>{N().eqNull(n[e])||n[e]===t||h.warn("vxe.error.coverProp",["Renderer."+r,e])}),Object.assign(n,t)):v[r]=t}return g},forEach(t){return N().objectEach(v,t),g},delete(t){return delete v[t],g}},m=class{constructor(){tt(this,"store",{})}mixin(t){return N().each(t,(t,e)=>{this.add(e,t)}),this}has(t){return!!this.get(t)}get(t){return this.store[t]}add(r,t){var e=this.store[r];{let n=N().keys(e);N().each(t,(t,e)=>{n.includes(e)&&h.warn("vxe.error.coverProp",[r,e])})}return this.store[r]=e?N().merge(e,t):t,this}delete(t){delete this.store[t]}forEach(t){N().objectEach(this.store,t)}},b=new m,y=(Object.assign(b,{_name:"Validators"}),new class{constructor(){tt(this,"store",{})}mixin(t){return N().each(t,(t,e)=>{this.add(e,t)}),this}has(t){return!!this.get(t)}get(t){return this.store[t]}add(r,t){var e=this.store[r];N().isFunction(t)&&(h.warn("vxe.error.delProp",["menus -> callback","menuMethod"]),t={menuMethod:t});{let n=N().keys(e);N().each(t,(t,e)=>{n.includes(e)&&h.warn("vxe.error.coverProp",[r,e])})}return this.store[r]=e?N().merge(e,t):t,this}delete(t){delete this.store[t]}forEach(t){N().objectEach(this.store,t)}}),x=(Object.assign(y,{_name:"Menus"}),new class{constructor(){tt(this,"store",{})}mixin(t){return N().each(t,(t,e)=>{this.add(e,t)}),this}has(t){return!!this.get(t)}get(t){return this.store[t]}add(r,t){var e=this.store[r];N().isFunction(t)&&(h.warn("vxe.error.delProp",["formats -> callback","cellFormatMethod"]),t={cellFormatMethod:t});{let n=N().keys(e);N().each(t,(t,e)=>{n.includes(e)&&h.warn("vxe.error.coverProp",[r,e])})}return this.store[r]=e?N().merge(e,t):t,this}delete(t){delete this.store[t]}forEach(t){N().objectEach(this.store,t)}}),w=(Object.assign(x,{_name:"Formats"}),new class{constructor(){tt(this,"store",{})}mixin(t){return N().each(t,(t,e)=>{this.add(e,t)}),this}has(t){return!!this.get(t)}get(t){return this.store[t]}add(r,t){var e=this.store[r];N().isFunction(t)&&(h.warn("vxe.error.delProp",["commands -> callback","commandMethod"]),t={commandMethod:t});{let n=N().keys(e);N().each(t,(t,e)=>{n.includes(e)&&h.warn("vxe.error.coverProp",[r,e])})}return this.store[r]=e?N().merge(e,t):t,this}delete(t){delete this.store[t]}forEach(t){N().objectEach(this.store,t)}}),E=(Object.assign(w,{_name:"Commands"}),{}),O={mixin(t){return N().each(t,(t,e)=>{O.add(e,t)}),O},get(t){return E[t]||[]},add(e,n){n=(n=N().isFunction(n)?{tableInterceptorMethod:n}:n).tableInterceptorMethod;if(n){let t=E[e];-1<(t=t||(E[e]=[])).indexOf(n)&&h.warn("vxe.error.coverProp",["Interceptor",e]),t.push(n)}return O},delete(t,n){var r=E[t];if(r){let e=(n=N().isFunction(n)?{tableInterceptorMethod:n}:n)?n.tableInterceptorMethod:null;e?N().remove(r,t=>t===e):delete E[t]}}},S,j={text:"",html:""},P={getStore(){return j},setStore(t){Object.assign(j,t||{})},copy(t){let e=!1;try{var n=N().toValueString(t);r=n,S||((S=document.createElement("textarea")).id="$VxeCopy",(o=S.style).width="48px",o.height="24px",o.position="fixed",o.zIndex="0",o.left="-500px",o.top="-500px",document.body.appendChild(S)),S.value=r,S.select(),S.setSelectionRange(0,S.value.length),e=document.execCommand("copy"),S.blur(),j.text=n,j.html=""}catch(t){}var r,o;return e}},T=new m;function ct(t){let e=(0,J.inject)("xeSizeInfo",null);var n=(0,J.computed)(()=>t.size||(e?e.value:null));return(0,J.provide)("xeSizeInfo",n),{computeSize:n}}let C={useSize:ct};function at(t){var e,t=t&&"default"!==t?t:"light";return r.theme=t,"undefined"!=typeof document&&(e=document.documentElement)&&e.setAttribute("data-vxe-ui-theme",t),A}function st(){return r.theme}function ft(t){return o.language=t||"zh-CN",A}function lt(t,e){return o.langMaps[t]=Object.assign({},e),A}function pt(t){return t&&(t.zIndex&&bt.setCurrent(t.zIndex),t.theme&&at(t.theme),N().merge(n,t)),A}function dt(t,e){return arguments.length?N().get(n,t,e):n}function ht(t){return t&&Object.assign(e,t),A}function wt(t){return arguments.length?N().get(e,t):e}let L="1.0.9",M=[];function Et(t,e){return t&&t.install&&-1===M.indexOf(t)&&(t.install(A,e),M.push(t)),A}let I={};function Ot(t){return I[t]||null}function St(t){t&&t.name&&(I[t.name]=t)}let A={coreVersion:L,setTheme:at,getTheme:st,setConfig:pt,getConfig:dt,setIcon:ht,getIcon:wt,setLanguage:ft,hasLanguage:ot,getLanguage:it,setI18n:lt,getI18n:rt,globalEvents:s,GLOBAL_EVENT_KEYS:t,createEvent:a,globalResize:d,renderer:g,validators:b,menus:y,formats:x,commands:w,interceptor:O,clipboard:P,log:h,hooks:T,component:St,getComponent:Ot,useFns:C,use:Et};at();var jt=A;return z}});
|
package/lib/src/clipboard.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.clipboard=void 0;var _xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let copyElem,clipStore={text:"",html:""};function handleText(e){var t;copyElem||((copyElem=document.createElement("textarea")).id="$VxeCopy",(t=copyElem.style).width="48px",t.height="24px",t.position="fixed",t.zIndex="0",t.left="-500px",t.top="-500px",document.body.appendChild(copyElem)),copyElem.value=e}let clipboard=exports.clipboard={getStore(){return clipStore},setStore(e){Object.assign(clipStore,e||{})},copy(e){let t=!1;try{var l=_xeUtils.default.toValueString(e);handleText(l),copyElem.select(),copyElem.setSelectionRange(0,copyElem.value.length),t=document.execCommand("copy"),copyElem.blur(),clipStore.text=l,clipStore.html=""}catch(e){}return t}};
|
package/lib/src/commands.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.commands=void 0;var _xeUtils=_interopRequireDefault(require("xe-utils")),_log=require("./log");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}class VXECommandsStore{constructor(){Object.defineProperty(this,"store",{enumerable:!0,configurable:!0,writable:!0,value:{}})}mixin(e){return _xeUtils.default.each(e,(e,t)=>{this.add(t,e)}),this}has(e){return!!this.get(e)}get(e){return this.store[e]}add(o,e){var t=this.store[o];if(_xeUtils.default.isFunction(e)&&("development"===process.env.NODE_ENV&&_log.log.warn("vxe.error.delProp",["commands -> callback","commandMethod"]),e={commandMethod:e}),"development"===process.env.NODE_ENV){let r=_xeUtils.default.keys(t);_xeUtils.default.each(e,(e,t)=>{r.includes(t)&&_log.log.warn("vxe.error.coverProp",[o,t])})}return this.store[o]=t?_xeUtils.default.merge(t,e):e,this}delete(e){delete this.store[e]}forEach(e){_xeUtils.default.objectEach(this.store,e)}}let commands=exports.commands=new VXECommandsStore;"development"===process.env.NODE_ENV&&Object.assign(commands,{_name:"Commands"});
|
package/lib/src/core.js
CHANGED
|
@@ -246,7 +246,7 @@ function setIcon(options) {
|
|
|
246
246
|
function getIcon(key) {
|
|
247
247
|
return arguments.length ? _xeUtils.default.get(_iconStore.iconConfigStore, key) : _iconStore.iconConfigStore;
|
|
248
248
|
}
|
|
249
|
-
const coreVersion = exports.coreVersion = "1.0.
|
|
249
|
+
const coreVersion = exports.coreVersion = "1.0.9";
|
|
250
250
|
const installedPlugins = [];
|
|
251
251
|
function use(Plugin, options) {
|
|
252
252
|
if (Plugin && Plugin.install) {
|
|
@@ -276,6 +276,7 @@ const VxeUI = exports.VxeUI = {
|
|
|
276
276
|
getIcon: getIcon,
|
|
277
277
|
setLanguage,
|
|
278
278
|
hasLanguage: _i18n.hasLanguage,
|
|
279
|
+
getLanguage: _i18n.getLanguage,
|
|
279
280
|
setI18n,
|
|
280
281
|
getI18n: _i18n.getI18n,
|
|
281
282
|
globalEvents: _event.globalEvents,
|
package/lib/src/core.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
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")),_log=(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("./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]}})});let coreVersion=exports.coreVersion="1.0.9",installedPlugins=[];function use(e,t){return e&&e.install&&-1===installedPlugins.indexOf(e)&&(e.install(VxeUI,t),installedPlugins.push(e)),VxeUI}let components={};function getComponent(e){return components[e]||null}function component(e){e&&e.name&&(components[e.name]=e)}let VxeUI=exports.VxeUI={coreVersion:coreVersion,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,hooks:_hooks.hooks,component:component,getComponent:getComponent,useFns:_useFns.useFns,use:use};setTheme();var _default=exports.default=VxeUI;
|
package/lib/src/event.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.globalEvents=exports.createEvent=exports.GLOBAL_EVENT_KEYS=void 0;var _xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let GLOBAL_EVENT_KEYS=exports.GLOBAL_EVENT_KEYS={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"},browse=_xeUtils.default.browse(),convertEventKeys={" ":"Spacebar",Apps:GLOBAL_EVENT_KEYS.CONTEXT_MENU,Del:GLOBAL_EVENT_KEYS.DELETE,Up:GLOBAL_EVENT_KEYS.ARROW_UP,Down:GLOBAL_EVENT_KEYS.ARROW_DOWN,Left:GLOBAL_EVENT_KEYS.ARROW_LEFT,Right:GLOBAL_EVENT_KEYS.ARROW_RIGHT},wheelName=browse.firefox?"DOMMouseScroll":"mousewheel",eventStore=[];function triggerEvent(r){let n=r.type===wheelName;eventStore.forEach(({type:e,cb:t})=>{r.cancelBubble||(e===r.type||n&&"mousewheel"===e)&&t(r)})}class VxeComponentEvent{constructor(e,t,r){Object.defineProperty(this,"$event",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.$event=e,Object.assign(this,t,r)}stopPropagation(){var e=this.$event;e&&e.stopPropagation()}preventDefault(){var e=this.$event;e&&e.preventDefault()}}let createEvent=(e,t,r)=>new VxeComponentEvent(e,t,r),globalEvents=(exports.createEvent=createEvent,exports.globalEvents={on(e,t,r){eventStore.push({comp:e,type:t,cb:r})},off(t,r){_xeUtils.default.remove(eventStore,e=>e.comp===t&&e.type===r)},hasKey(e,t){e=e.key;return t=t.toLowerCase(),!(!e||t!==e.toLowerCase()&&(!convertEventKeys[e]||convertEventKeys[e].toLowerCase()!==t))}});browse.isDoc&&(browse.msie||(window.addEventListener("copy",triggerEvent,!1),window.addEventListener("cut",triggerEvent,!1),window.addEventListener("paste",triggerEvent,!1)),document.addEventListener("keydown",triggerEvent,!1),document.addEventListener("contextmenu",triggerEvent,!1),window.addEventListener("mousedown",triggerEvent,!1),window.addEventListener("blur",triggerEvent,!1),window.addEventListener("resize",triggerEvent,!1),window.addEventListener(wheelName,_xeUtils.default.throttle(triggerEvent,100,{leading:!0,trailing:!1}),{passive:!0,capture:!1}));
|