@vxe-ui/core 4.0.19 → 4.0.20
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/es/index.esm.js +94 -1
- package/es/src/config.js +26 -0
- package/es/src/core.js +4 -146
- package/es/src/i18n.js +10 -1
- package/es/src/icon.js +12 -0
- package/es/src/log.js +1 -1
- package/es/src/theme.js +16 -0
- package/lib/index.common.js +287 -5
- package/lib/index.umd.js +99 -81
- package/lib/index.umd.min.js +1 -1
- package/lib/src/config.js +34 -0
- package/lib/src/config.min.js +1 -0
- package/lib/src/core.js +6 -328
- package/lib/src/core.min.js +1 -1
- package/lib/src/i18n.js +12 -1
- package/lib/src/i18n.min.js +1 -1
- package/lib/src/icon.js +20 -0
- package/lib/src/icon.min.js +1 -0
- package/lib/src/log.js +1 -1
- package/lib/src/log.min.js +1 -1
- package/lib/src/theme.js +23 -0
- package/lib/src/theme.min.js +1 -0
- package/package.json +1 -1
- package/packages/index.ts +114 -1
- package/packages/src/config.ts +30 -0
- package/packages/src/core.ts +5 -175
- package/packages/src/i18n.ts +12 -1
- package/packages/src/icon.ts +16 -0
- package/packages/src/theme.ts +20 -0
- package/types/core/index.d.ts +9 -1
package/es/index.esm.js
CHANGED
|
@@ -1,3 +1,96 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { VxeCore } from './src/core';
|
|
2
|
+
import { createCommentVNode } from 'vue';
|
|
3
|
+
import { setConfig, getConfig } from './src/config';
|
|
4
|
+
import { globalStore } from './src/dataStore';
|
|
5
|
+
import { setIcon, getIcon } from './src/icon';
|
|
6
|
+
import { setTheme, getTheme } from './src/theme';
|
|
7
|
+
import { globalEvents, GLOBAL_EVENT_KEYS, createEvent } from './src/event';
|
|
8
|
+
import { globalResize } from './src/resize';
|
|
9
|
+
import { getI18n, setI18n, setLanguage, hasLanguage, getLanguage } from './src/i18n';
|
|
10
|
+
import { renderer } from './src/renderer';
|
|
11
|
+
import { validators } from './src/validators';
|
|
12
|
+
import { menus } from './src/menus';
|
|
13
|
+
import { formats } from './src/formats';
|
|
14
|
+
import { commands } from './src/commands';
|
|
15
|
+
import { interceptor } from './src/interceptor';
|
|
16
|
+
import { clipboard } from './src/clipboard';
|
|
17
|
+
import { permission } from './src/permission';
|
|
18
|
+
import { log } from './src/log';
|
|
19
|
+
import { hooks } from './src/hooks';
|
|
20
|
+
import { useFns } from './src/useFns';
|
|
21
|
+
const installedPlugins = [];
|
|
22
|
+
export function use(Plugin, options) {
|
|
23
|
+
if (Plugin && Plugin.install) {
|
|
24
|
+
if (installedPlugins.indexOf(Plugin) === -1) {
|
|
25
|
+
Plugin.install(VxeUI, options);
|
|
26
|
+
installedPlugins.push(Plugin);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return VxeUI;
|
|
30
|
+
}
|
|
31
|
+
const components = {};
|
|
32
|
+
export function getComponent(name) {
|
|
33
|
+
return components[name] || null;
|
|
34
|
+
}
|
|
35
|
+
export function component(comp) {
|
|
36
|
+
if (comp && comp.name) {
|
|
37
|
+
components[comp.name] = comp;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export function renderEmptyElement() {
|
|
41
|
+
return createCommentVNode();
|
|
42
|
+
}
|
|
43
|
+
export const VxeUI = Object.assign(VxeCore, {
|
|
44
|
+
renderEmptyElement,
|
|
45
|
+
setTheme,
|
|
46
|
+
getTheme,
|
|
47
|
+
setConfig,
|
|
48
|
+
getConfig: getConfig,
|
|
49
|
+
setIcon,
|
|
50
|
+
getIcon: getIcon,
|
|
51
|
+
setLanguage,
|
|
52
|
+
hasLanguage,
|
|
53
|
+
getLanguage,
|
|
54
|
+
setI18n,
|
|
55
|
+
getI18n,
|
|
56
|
+
globalEvents,
|
|
57
|
+
GLOBAL_EVENT_KEYS,
|
|
58
|
+
createEvent,
|
|
59
|
+
globalResize,
|
|
60
|
+
renderer,
|
|
61
|
+
validators,
|
|
62
|
+
menus,
|
|
63
|
+
formats,
|
|
64
|
+
commands,
|
|
65
|
+
interceptor,
|
|
66
|
+
clipboard,
|
|
67
|
+
log,
|
|
68
|
+
permission,
|
|
69
|
+
globalStore,
|
|
70
|
+
hooks,
|
|
71
|
+
component,
|
|
72
|
+
getComponent,
|
|
73
|
+
useFns,
|
|
74
|
+
use
|
|
75
|
+
});
|
|
76
|
+
setTheme();
|
|
2
77
|
export * from './src/core';
|
|
78
|
+
export * from './src/event';
|
|
79
|
+
export * from './src/resize';
|
|
80
|
+
export * from './src/config';
|
|
81
|
+
export * from './src/i18n';
|
|
82
|
+
export * from './src/icon';
|
|
83
|
+
export * from './src/theme';
|
|
84
|
+
export * from './src/renderer';
|
|
85
|
+
export * from './src/validators';
|
|
86
|
+
export * from './src/menus';
|
|
87
|
+
export * from './src/formats';
|
|
88
|
+
export * from './src/commands';
|
|
89
|
+
export * from './src/interceptor';
|
|
90
|
+
export * from './src/clipboard';
|
|
91
|
+
export * from './src/permission';
|
|
92
|
+
export * from './src/dataStore';
|
|
93
|
+
export * from './src/useFns';
|
|
94
|
+
export * from './src/log';
|
|
95
|
+
export * from './src/hooks';
|
|
3
96
|
export default VxeUI;
|
package/es/src/config.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import XEUtils from 'xe-utils';
|
|
2
|
+
import DomZIndex from 'dom-zindex';
|
|
3
|
+
import { VxeCore } from './core';
|
|
4
|
+
import { globalConfigStore } from './configStore';
|
|
5
|
+
import { setTheme } from './theme';
|
|
6
|
+
/**
|
|
7
|
+
* 全局参数设置
|
|
8
|
+
*/
|
|
9
|
+
export function setConfig(options) {
|
|
10
|
+
if (options) {
|
|
11
|
+
if (options.zIndex) {
|
|
12
|
+
DomZIndex.setCurrent(options.zIndex);
|
|
13
|
+
}
|
|
14
|
+
if (options.theme) {
|
|
15
|
+
setTheme(options.theme);
|
|
16
|
+
}
|
|
17
|
+
XEUtils.merge(globalConfigStore, options);
|
|
18
|
+
}
|
|
19
|
+
return VxeCore;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 获取全局参数
|
|
23
|
+
*/
|
|
24
|
+
export function getConfig(key, defaultValue) {
|
|
25
|
+
return arguments.length ? XEUtils.get(globalConfigStore, key, defaultValue) : globalConfigStore;
|
|
26
|
+
}
|
package/es/src/core.js
CHANGED
|
@@ -1,148 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { createCommentVNode } from 'vue';
|
|
4
|
-
import { globalConfigStore } from './configStore';
|
|
5
|
-
import { globalStore } from './dataStore';
|
|
6
|
-
import { iconConfigStore } from './iconStore';
|
|
7
|
-
import { themeConfigStore } from './themeStore';
|
|
8
|
-
import { i18nConfigStore } from './i18nStore';
|
|
9
|
-
import { globalEvents, GLOBAL_EVENT_KEYS, createEvent } from './event';
|
|
10
|
-
import { globalResize } from './resize';
|
|
11
|
-
import { getI18n, hasLanguage, getLanguage } from './i18n';
|
|
12
|
-
import { renderer } from './renderer';
|
|
13
|
-
import { validators } from './validators';
|
|
14
|
-
import { menus } from './menus';
|
|
15
|
-
import { formats } from './formats';
|
|
16
|
-
import { commands } from './commands';
|
|
17
|
-
import { interceptor } from './interceptor';
|
|
18
|
-
import { clipboard } from './clipboard';
|
|
19
|
-
import { permission } from './permission';
|
|
20
|
-
import { log } from './log';
|
|
21
|
-
import { hooks } from './hooks';
|
|
22
|
-
import { useFns } from './useFns';
|
|
23
|
-
export function setTheme(name) {
|
|
24
|
-
const theme = !name || name === 'default' ? 'light' : name;
|
|
25
|
-
themeConfigStore.theme = theme;
|
|
26
|
-
if (typeof document !== 'undefined') {
|
|
27
|
-
const documentElement = document.documentElement;
|
|
28
|
-
if (documentElement) {
|
|
29
|
-
documentElement.setAttribute('data-vxe-ui-theme', theme);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return VxeUI;
|
|
33
|
-
}
|
|
34
|
-
export function getTheme() {
|
|
35
|
-
return themeConfigStore.theme;
|
|
36
|
-
}
|
|
37
|
-
export function setLanguage(locale) {
|
|
38
|
-
i18nConfigStore.language = locale || 'zh-CN';
|
|
39
|
-
return VxeUI;
|
|
40
|
-
}
|
|
41
|
-
export function setI18n(locale, data) {
|
|
42
|
-
i18nConfigStore.langMaps[locale] = Object.assign({}, data);
|
|
43
|
-
return VxeUI;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* 全局参数设置
|
|
47
|
-
*/
|
|
48
|
-
export function setConfig(options) {
|
|
49
|
-
if (options) {
|
|
50
|
-
if (options.zIndex) {
|
|
51
|
-
DomZIndex.setCurrent(options.zIndex);
|
|
52
|
-
}
|
|
53
|
-
if (options.theme) {
|
|
54
|
-
setTheme(options.theme);
|
|
55
|
-
}
|
|
56
|
-
XEUtils.merge(globalConfigStore, options);
|
|
57
|
-
}
|
|
58
|
-
return VxeUI;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* 获取全局参数
|
|
62
|
-
*/
|
|
63
|
-
export function getConfig(key, defaultValue) {
|
|
64
|
-
return arguments.length ? XEUtils.get(globalConfigStore, key, defaultValue) : globalConfigStore;
|
|
65
|
-
}
|
|
66
|
-
export function setIcon(options) {
|
|
67
|
-
if (options) {
|
|
68
|
-
Object.assign(iconConfigStore, options);
|
|
69
|
-
}
|
|
70
|
-
return VxeUI;
|
|
71
|
-
}
|
|
72
|
-
export function getIcon(key) {
|
|
73
|
-
return arguments.length ? XEUtils.get(iconConfigStore, key) : iconConfigStore;
|
|
74
|
-
}
|
|
75
|
-
export const coreVersion = "4.0.19";
|
|
76
|
-
const installedPlugins = [];
|
|
77
|
-
export function use(Plugin, options) {
|
|
78
|
-
if (Plugin && Plugin.install) {
|
|
79
|
-
if (installedPlugins.indexOf(Plugin) === -1) {
|
|
80
|
-
Plugin.install(VxeUI, options);
|
|
81
|
-
installedPlugins.push(Plugin);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return VxeUI;
|
|
85
|
-
}
|
|
86
|
-
const components = {};
|
|
87
|
-
export function getComponent(name) {
|
|
88
|
-
return components[name] || null;
|
|
89
|
-
}
|
|
90
|
-
export function component(comp) {
|
|
91
|
-
if (comp && comp.name) {
|
|
92
|
-
components[comp.name] = comp;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
export function renderEmptyElement() {
|
|
96
|
-
return createCommentVNode();
|
|
97
|
-
}
|
|
98
|
-
export const VxeUI = {
|
|
1
|
+
export const coreVersion = "4.0.20";
|
|
2
|
+
export const VxeCore = {
|
|
99
3
|
coreVersion,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
getTheme,
|
|
103
|
-
setConfig,
|
|
104
|
-
getConfig: getConfig,
|
|
105
|
-
setIcon,
|
|
106
|
-
getIcon: getIcon,
|
|
107
|
-
setLanguage,
|
|
108
|
-
hasLanguage,
|
|
109
|
-
getLanguage,
|
|
110
|
-
setI18n,
|
|
111
|
-
getI18n,
|
|
112
|
-
globalEvents,
|
|
113
|
-
GLOBAL_EVENT_KEYS,
|
|
114
|
-
createEvent,
|
|
115
|
-
globalResize,
|
|
116
|
-
renderer,
|
|
117
|
-
validators,
|
|
118
|
-
menus,
|
|
119
|
-
formats,
|
|
120
|
-
commands,
|
|
121
|
-
interceptor,
|
|
122
|
-
clipboard,
|
|
123
|
-
log,
|
|
124
|
-
permission,
|
|
125
|
-
globalStore,
|
|
126
|
-
hooks,
|
|
127
|
-
component,
|
|
128
|
-
getComponent,
|
|
129
|
-
useFns,
|
|
130
|
-
use
|
|
4
|
+
uiVersion: '',
|
|
5
|
+
tableVersion: ''
|
|
131
6
|
};
|
|
132
|
-
setTheme();
|
|
133
|
-
export * from './event';
|
|
134
|
-
export * from './resize';
|
|
135
|
-
export * from './i18n';
|
|
136
|
-
export * from './renderer';
|
|
137
|
-
export * from './validators';
|
|
138
|
-
export * from './menus';
|
|
139
|
-
export * from './formats';
|
|
140
|
-
export * from './commands';
|
|
141
|
-
export * from './interceptor';
|
|
142
|
-
export * from './clipboard';
|
|
143
|
-
export * from './permission';
|
|
144
|
-
export * from './dataStore';
|
|
145
|
-
export * from './useFns';
|
|
146
|
-
export * from './log';
|
|
147
|
-
export * from './hooks';
|
|
148
|
-
export default VxeUI;
|
package/es/src/i18n.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
|
+
import { VxeCore } from './core';
|
|
2
3
|
import { i18nConfigStore } from './i18nStore';
|
|
3
4
|
import { globalConfigStore } from './configStore';
|
|
4
5
|
let checkInstall = false;
|
|
@@ -10,12 +11,20 @@ export function getI18n(key, args) {
|
|
|
10
11
|
}
|
|
11
12
|
if (!checkInstall) {
|
|
12
13
|
if (!langMaps[language]) {
|
|
13
|
-
console.error(
|
|
14
|
+
console.error(`[vxe core] 语言包未安装。Language not installed. https://${VxeCore.uiVersion ? 'vxeui.com' : 'vxetable.cn'}/#/start/i18n`);
|
|
14
15
|
}
|
|
15
16
|
checkInstall = true;
|
|
16
17
|
}
|
|
17
18
|
return XEUtils.toFormatString(XEUtils.get(langMaps[language], key, key), args);
|
|
18
19
|
}
|
|
20
|
+
export function setLanguage(locale) {
|
|
21
|
+
i18nConfigStore.language = locale || 'zh-CN';
|
|
22
|
+
return VxeCore;
|
|
23
|
+
}
|
|
24
|
+
export function setI18n(locale, data) {
|
|
25
|
+
i18nConfigStore.langMaps[locale] = Object.assign({}, data);
|
|
26
|
+
return VxeCore;
|
|
27
|
+
}
|
|
19
28
|
export function hasLanguage(language) {
|
|
20
29
|
const { langMaps } = i18nConfigStore;
|
|
21
30
|
return !!langMaps[language];
|
package/es/src/icon.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import XEUtils from 'xe-utils';
|
|
2
|
+
import { VxeCore } from './core';
|
|
3
|
+
import { iconConfigStore } from './iconStore';
|
|
4
|
+
export function setIcon(options) {
|
|
5
|
+
if (options) {
|
|
6
|
+
Object.assign(iconConfigStore, options);
|
|
7
|
+
}
|
|
8
|
+
return VxeCore;
|
|
9
|
+
}
|
|
10
|
+
export function getIcon(key) {
|
|
11
|
+
return arguments.length ? XEUtils.get(iconConfigStore, key) : iconConfigStore;
|
|
12
|
+
}
|
package/es/src/log.js
CHANGED
package/es/src/theme.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VxeCore } from './core';
|
|
2
|
+
import { themeConfigStore } from './themeStore';
|
|
3
|
+
export function setTheme(name) {
|
|
4
|
+
const theme = !name || name === 'default' ? 'light' : name;
|
|
5
|
+
themeConfigStore.theme = theme;
|
|
6
|
+
if (typeof document !== 'undefined') {
|
|
7
|
+
const documentElement = document.documentElement;
|
|
8
|
+
if (documentElement) {
|
|
9
|
+
documentElement.setAttribute('data-vxe-ui-theme', theme);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return VxeCore;
|
|
13
|
+
}
|
|
14
|
+
export function getTheme() {
|
|
15
|
+
return themeConfigStore.theme;
|
|
16
|
+
}
|
package/lib/index.common.js
CHANGED
|
@@ -3,9 +3,20 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
use: true,
|
|
8
|
+
getComponent: true,
|
|
9
|
+
component: true,
|
|
10
|
+
renderEmptyElement: true,
|
|
11
|
+
VxeUI: true
|
|
12
|
+
};
|
|
13
|
+
exports.VxeUI = void 0;
|
|
14
|
+
exports.component = component;
|
|
7
15
|
exports.default = void 0;
|
|
8
|
-
|
|
16
|
+
exports.getComponent = getComponent;
|
|
17
|
+
exports.renderEmptyElement = renderEmptyElement;
|
|
18
|
+
exports.use = use;
|
|
19
|
+
var _core = require("./src/core");
|
|
9
20
|
Object.keys(_core).forEach(function (key) {
|
|
10
21
|
if (key === "default" || key === "__esModule") return;
|
|
11
22
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -17,6 +28,277 @@ Object.keys(_core).forEach(function (key) {
|
|
|
17
28
|
}
|
|
18
29
|
});
|
|
19
30
|
});
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
31
|
+
var _vue = require("vue");
|
|
32
|
+
var _config = require("./src/config");
|
|
33
|
+
Object.keys(_config).forEach(function (key) {
|
|
34
|
+
if (key === "default" || key === "__esModule") return;
|
|
35
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
36
|
+
if (key in exports && exports[key] === _config[key]) return;
|
|
37
|
+
Object.defineProperty(exports, key, {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () {
|
|
40
|
+
return _config[key];
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
var _dataStore = require("./src/dataStore");
|
|
45
|
+
Object.keys(_dataStore).forEach(function (key) {
|
|
46
|
+
if (key === "default" || key === "__esModule") return;
|
|
47
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
48
|
+
if (key in exports && exports[key] === _dataStore[key]) return;
|
|
49
|
+
Object.defineProperty(exports, key, {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () {
|
|
52
|
+
return _dataStore[key];
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
var _icon = require("./src/icon");
|
|
57
|
+
Object.keys(_icon).forEach(function (key) {
|
|
58
|
+
if (key === "default" || key === "__esModule") return;
|
|
59
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
60
|
+
if (key in exports && exports[key] === _icon[key]) return;
|
|
61
|
+
Object.defineProperty(exports, key, {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function () {
|
|
64
|
+
return _icon[key];
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
var _theme = require("./src/theme");
|
|
69
|
+
Object.keys(_theme).forEach(function (key) {
|
|
70
|
+
if (key === "default" || key === "__esModule") return;
|
|
71
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
72
|
+
if (key in exports && exports[key] === _theme[key]) return;
|
|
73
|
+
Object.defineProperty(exports, key, {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function () {
|
|
76
|
+
return _theme[key];
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
var _event = require("./src/event");
|
|
81
|
+
Object.keys(_event).forEach(function (key) {
|
|
82
|
+
if (key === "default" || key === "__esModule") return;
|
|
83
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
84
|
+
if (key in exports && exports[key] === _event[key]) return;
|
|
85
|
+
Object.defineProperty(exports, key, {
|
|
86
|
+
enumerable: true,
|
|
87
|
+
get: function () {
|
|
88
|
+
return _event[key];
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
var _resize = require("./src/resize");
|
|
93
|
+
Object.keys(_resize).forEach(function (key) {
|
|
94
|
+
if (key === "default" || key === "__esModule") return;
|
|
95
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
96
|
+
if (key in exports && exports[key] === _resize[key]) return;
|
|
97
|
+
Object.defineProperty(exports, key, {
|
|
98
|
+
enumerable: true,
|
|
99
|
+
get: function () {
|
|
100
|
+
return _resize[key];
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
var _i18n = require("./src/i18n");
|
|
105
|
+
Object.keys(_i18n).forEach(function (key) {
|
|
106
|
+
if (key === "default" || key === "__esModule") return;
|
|
107
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
108
|
+
if (key in exports && exports[key] === _i18n[key]) return;
|
|
109
|
+
Object.defineProperty(exports, key, {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function () {
|
|
112
|
+
return _i18n[key];
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
var _renderer = require("./src/renderer");
|
|
117
|
+
Object.keys(_renderer).forEach(function (key) {
|
|
118
|
+
if (key === "default" || key === "__esModule") return;
|
|
119
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
120
|
+
if (key in exports && exports[key] === _renderer[key]) return;
|
|
121
|
+
Object.defineProperty(exports, key, {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
get: function () {
|
|
124
|
+
return _renderer[key];
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
var _validators = require("./src/validators");
|
|
129
|
+
Object.keys(_validators).forEach(function (key) {
|
|
130
|
+
if (key === "default" || key === "__esModule") return;
|
|
131
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
132
|
+
if (key in exports && exports[key] === _validators[key]) return;
|
|
133
|
+
Object.defineProperty(exports, key, {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
get: function () {
|
|
136
|
+
return _validators[key];
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
var _menus = require("./src/menus");
|
|
141
|
+
Object.keys(_menus).forEach(function (key) {
|
|
142
|
+
if (key === "default" || key === "__esModule") return;
|
|
143
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
144
|
+
if (key in exports && exports[key] === _menus[key]) return;
|
|
145
|
+
Object.defineProperty(exports, key, {
|
|
146
|
+
enumerable: true,
|
|
147
|
+
get: function () {
|
|
148
|
+
return _menus[key];
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
var _formats = require("./src/formats");
|
|
153
|
+
Object.keys(_formats).forEach(function (key) {
|
|
154
|
+
if (key === "default" || key === "__esModule") return;
|
|
155
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
156
|
+
if (key in exports && exports[key] === _formats[key]) return;
|
|
157
|
+
Object.defineProperty(exports, key, {
|
|
158
|
+
enumerable: true,
|
|
159
|
+
get: function () {
|
|
160
|
+
return _formats[key];
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
var _commands = require("./src/commands");
|
|
165
|
+
Object.keys(_commands).forEach(function (key) {
|
|
166
|
+
if (key === "default" || key === "__esModule") return;
|
|
167
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
168
|
+
if (key in exports && exports[key] === _commands[key]) return;
|
|
169
|
+
Object.defineProperty(exports, key, {
|
|
170
|
+
enumerable: true,
|
|
171
|
+
get: function () {
|
|
172
|
+
return _commands[key];
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
var _interceptor = require("./src/interceptor");
|
|
177
|
+
Object.keys(_interceptor).forEach(function (key) {
|
|
178
|
+
if (key === "default" || key === "__esModule") return;
|
|
179
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
180
|
+
if (key in exports && exports[key] === _interceptor[key]) return;
|
|
181
|
+
Object.defineProperty(exports, key, {
|
|
182
|
+
enumerable: true,
|
|
183
|
+
get: function () {
|
|
184
|
+
return _interceptor[key];
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
var _clipboard = require("./src/clipboard");
|
|
189
|
+
Object.keys(_clipboard).forEach(function (key) {
|
|
190
|
+
if (key === "default" || key === "__esModule") return;
|
|
191
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
192
|
+
if (key in exports && exports[key] === _clipboard[key]) return;
|
|
193
|
+
Object.defineProperty(exports, key, {
|
|
194
|
+
enumerable: true,
|
|
195
|
+
get: function () {
|
|
196
|
+
return _clipboard[key];
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
var _permission = require("./src/permission");
|
|
201
|
+
Object.keys(_permission).forEach(function (key) {
|
|
202
|
+
if (key === "default" || key === "__esModule") return;
|
|
203
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
204
|
+
if (key in exports && exports[key] === _permission[key]) return;
|
|
205
|
+
Object.defineProperty(exports, key, {
|
|
206
|
+
enumerable: true,
|
|
207
|
+
get: function () {
|
|
208
|
+
return _permission[key];
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
var _log = require("./src/log");
|
|
213
|
+
Object.keys(_log).forEach(function (key) {
|
|
214
|
+
if (key === "default" || key === "__esModule") return;
|
|
215
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
216
|
+
if (key in exports && exports[key] === _log[key]) return;
|
|
217
|
+
Object.defineProperty(exports, key, {
|
|
218
|
+
enumerable: true,
|
|
219
|
+
get: function () {
|
|
220
|
+
return _log[key];
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
var _hooks = require("./src/hooks");
|
|
225
|
+
Object.keys(_hooks).forEach(function (key) {
|
|
226
|
+
if (key === "default" || key === "__esModule") return;
|
|
227
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
228
|
+
if (key in exports && exports[key] === _hooks[key]) return;
|
|
229
|
+
Object.defineProperty(exports, key, {
|
|
230
|
+
enumerable: true,
|
|
231
|
+
get: function () {
|
|
232
|
+
return _hooks[key];
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
var _useFns = require("./src/useFns");
|
|
237
|
+
Object.keys(_useFns).forEach(function (key) {
|
|
238
|
+
if (key === "default" || key === "__esModule") return;
|
|
239
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
240
|
+
if (key in exports && exports[key] === _useFns[key]) return;
|
|
241
|
+
Object.defineProperty(exports, key, {
|
|
242
|
+
enumerable: true,
|
|
243
|
+
get: function () {
|
|
244
|
+
return _useFns[key];
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
const installedPlugins = [];
|
|
249
|
+
function use(Plugin, options) {
|
|
250
|
+
if (Plugin && Plugin.install) {
|
|
251
|
+
if (installedPlugins.indexOf(Plugin) === -1) {
|
|
252
|
+
Plugin.install(VxeUI, options);
|
|
253
|
+
installedPlugins.push(Plugin);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
return VxeUI;
|
|
257
|
+
}
|
|
258
|
+
const components = {};
|
|
259
|
+
function getComponent(name) {
|
|
260
|
+
return components[name] || null;
|
|
261
|
+
}
|
|
262
|
+
function component(comp) {
|
|
263
|
+
if (comp && comp.name) {
|
|
264
|
+
components[comp.name] = comp;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
function renderEmptyElement() {
|
|
268
|
+
return (0, _vue.createCommentVNode)();
|
|
269
|
+
}
|
|
270
|
+
const VxeUI = exports.VxeUI = Object.assign(_core.VxeCore, {
|
|
271
|
+
renderEmptyElement,
|
|
272
|
+
setTheme: _theme.setTheme,
|
|
273
|
+
getTheme: _theme.getTheme,
|
|
274
|
+
setConfig: _config.setConfig,
|
|
275
|
+
getConfig: _config.getConfig,
|
|
276
|
+
setIcon: _icon.setIcon,
|
|
277
|
+
getIcon: _icon.getIcon,
|
|
278
|
+
setLanguage: _i18n.setLanguage,
|
|
279
|
+
hasLanguage: _i18n.hasLanguage,
|
|
280
|
+
getLanguage: _i18n.getLanguage,
|
|
281
|
+
setI18n: _i18n.setI18n,
|
|
282
|
+
getI18n: _i18n.getI18n,
|
|
283
|
+
globalEvents: _event.globalEvents,
|
|
284
|
+
GLOBAL_EVENT_KEYS: _event.GLOBAL_EVENT_KEYS,
|
|
285
|
+
createEvent: _event.createEvent,
|
|
286
|
+
globalResize: _resize.globalResize,
|
|
287
|
+
renderer: _renderer.renderer,
|
|
288
|
+
validators: _validators.validators,
|
|
289
|
+
menus: _menus.menus,
|
|
290
|
+
formats: _formats.formats,
|
|
291
|
+
commands: _commands.commands,
|
|
292
|
+
interceptor: _interceptor.interceptor,
|
|
293
|
+
clipboard: _clipboard.clipboard,
|
|
294
|
+
log: _log.log,
|
|
295
|
+
permission: _permission.permission,
|
|
296
|
+
globalStore: _dataStore.globalStore,
|
|
297
|
+
hooks: _hooks.hooks,
|
|
298
|
+
component,
|
|
299
|
+
getComponent,
|
|
300
|
+
useFns: _useFns.useFns,
|
|
301
|
+
use
|
|
302
|
+
});
|
|
303
|
+
(0, _theme.setTheme)();
|
|
304
|
+
var _default = exports.default = VxeUI;
|