hy-dispatch-ui-v3 0.1.0 → 0.1.2
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/dist/tailwind.css +186 -45
- package/es/bussiness/index.mjs +0 -1
- package/es/components/appButton/appButton.vue.mjs +133 -0
- package/es/components/appButton/index.mjs +6 -0
- package/es/components/appButton/style/appButton.scss +289 -0
- package/es/components/appConfigProvider/appConfigProvider.vue.mjs +91 -0
- package/es/components/appConfigProvider/index.mjs +6 -0
- package/es/components/appConfirmDialog/appConfirmDialog.vue.mjs +105 -60
- package/es/components/appConfirmDialog/appConfirmMethod.mjs +49 -27
- package/es/components/appConfirmDialog/index.mjs +0 -1
- package/es/components/appDatePicker/appDatePicker.vue.mjs +0 -1
- package/es/components/appDatePicker/index.mjs +0 -1
- package/es/components/appForm/appForm.vue.mjs +64 -67
- package/es/components/appForm/index.mjs +0 -1
- package/es/components/appForm/js/index.mjs +0 -1
- package/es/components/appForm/js/useAppForm.mjs +0 -1
- package/es/components/appForm/style/appForm.scss +1 -1
- package/es/components/{svgIcon/svgIcon.vue.mjs → appIcon/appIcon.vue.mjs} +4 -5
- package/es/components/appIcon/index.mjs +6 -0
- package/es/components/{svgIcon/style/svgIcon.scss → appIcon/style/appIcon.scss} +1 -4
- package/es/components/{svgIcon/iconBox.vue.mjs → appIconBox/appIconBox.vue.mjs} +6 -7
- package/es/components/appIconBox/index.mjs +6 -0
- package/es/components/appIconBox/style/appIconBox.scss +27 -0
- package/es/components/appOrgCascader/appOrgCascader.vue.mjs +18 -11
- package/es/components/appOrgCascader/index.mjs +0 -1
- package/es/components/appSearch/appSearch.vue.mjs +2 -6
- package/es/components/appSearch/index.mjs +0 -1
- package/es/components/appSearch/js/index.mjs +5 -6
- package/es/components/appSearch/js/useAppSearch.mjs +0 -1
- package/es/components/appSearch/style/appSearch.scss +17 -11
- package/es/components/appTable/appTable.vue.mjs +57 -32
- package/es/components/appTable/cpns/columnSelect.vue.mjs +87 -123
- package/es/components/appTable/cpns/columnSelectItem.vue.mjs +5 -0
- package/es/components/appTable/cpns/columnSelectItem.vue2.mjs +167 -0
- package/es/components/appTable/index.mjs +0 -1
- package/es/components/appTable/js/index.mjs +9 -8
- package/es/components/appTable/js/search.mjs +6 -6
- package/es/components/appTable/js/useAppTable.mjs +6 -3
- package/es/components/appTable/style/appTable.scss +20 -11
- package/es/components/appTooltip/appTooltip.vue.mjs +0 -1
- package/es/components/appTooltip/index.mjs +0 -1
- package/es/components/appUserAvatar/appUserAvatar.vue.mjs +136 -0
- package/es/components/appUserAvatar/index.mjs +6 -0
- package/es/components/appUserAvatar/style/appUserAvatar.scss +33 -0
- package/es/components/index.mjs +5 -2
- package/es/config/index.mjs +0 -1
- package/es/constants/index.mjs +0 -1
- package/es/constants/keys.mjs +0 -1
- package/es/hooks/index.mjs +4 -3
- package/es/hooks/useApi.mjs +20 -5
- package/es/hooks/useGlobalConfig.mjs +19 -10
- package/es/hooks/useLocale.mjs +1 -2
- package/es/hooks/useMixins.mjs +0 -1
- package/es/{store/maintain.mjs → hooks/useResizeHandler.mjs} +29 -44
- package/es/hooks/useUserAvatarMap.mjs +9 -0
- package/es/index.mjs +9 -6
- package/es/locale/{en_US.mjs → en.mjs} +8 -5
- package/es/locale/index.mjs +2 -3
- package/es/locale/zh_CN.mjs +6 -3
- package/es/make-installer.mjs +2 -8
- package/es/static/hy-svg-icons.mjs +11 -0
- package/es/style/element/element.scss +16313 -0
- package/es/style/element/index.scss +932 -0
- package/es/style/index.scss +37 -0
- package/es/style/theme.scss +18 -120
- package/es/utils/adaptive.mjs +0 -1
- package/es/utils/bus.mjs +0 -1
- package/es/utils/crypto.mjs +0 -1
- package/es/utils/date.mjs +0 -1
- package/es/utils/handler.mjs +0 -1
- package/es/utils/index.mjs +0 -1
- package/es/utils/is.mjs +0 -1
- package/es/version.mjs +1 -2
- package/lib/bussiness/index.js +0 -1
- package/lib/components/appButton/appButton.vue.js +137 -0
- package/lib/components/appButton/index.js +11 -0
- package/lib/components/appButton/style/appButton.scss +289 -0
- package/lib/components/appConfigProvider/appConfigProvider.vue.js +114 -0
- package/lib/components/appConfigProvider/index.js +11 -0
- package/lib/components/appConfirmDialog/appConfirmDialog.vue.js +103 -58
- package/lib/components/appConfirmDialog/appConfirmMethod.js +48 -26
- package/lib/components/appConfirmDialog/index.js +0 -1
- package/lib/components/appDatePicker/appDatePicker.vue.js +0 -1
- package/lib/components/appDatePicker/index.js +0 -1
- package/lib/components/appForm/appForm.vue.js +61 -64
- package/lib/components/appForm/index.js +0 -1
- package/lib/components/appForm/js/index.js +0 -1
- package/lib/components/appForm/js/useAppForm.js +0 -1
- package/lib/components/appForm/style/appForm.scss +1 -1
- package/lib/components/{svgIcon/svgIcon.vue.js → appIcon/appIcon.vue.js} +4 -5
- package/lib/components/appIcon/index.js +11 -0
- package/lib/components/{svgIcon/style/svgIcon.scss → appIcon/style/appIcon.scss} +1 -4
- package/lib/components/{svgIcon/iconBox.vue.js → appIconBox/appIconBox.vue.js} +6 -7
- package/lib/components/appIconBox/index.js +11 -0
- package/lib/components/appIconBox/style/appIconBox.scss +27 -0
- package/lib/components/appOrgCascader/appOrgCascader.vue.js +18 -11
- package/lib/components/appOrgCascader/index.js +0 -1
- package/lib/components/appSearch/appSearch.vue.js +2 -6
- package/lib/components/appSearch/index.js +0 -1
- package/lib/components/appSearch/js/index.js +5 -6
- package/lib/components/appSearch/js/useAppSearch.js +0 -1
- package/lib/components/appSearch/style/appSearch.scss +17 -11
- package/lib/components/appTable/appTable.vue.js +56 -31
- package/lib/components/appTable/cpns/columnSelect.vue.js +86 -122
- package/lib/components/appTable/cpns/columnSelectItem.vue.js +9 -0
- package/lib/components/appTable/cpns/columnSelectItem.vue2.js +171 -0
- package/lib/components/appTable/index.js +0 -1
- package/lib/components/appTable/js/index.js +9 -7
- package/lib/components/appTable/js/search.js +6 -6
- package/lib/components/appTable/js/useAppTable.js +6 -3
- package/lib/components/appTable/style/appTable.scss +20 -11
- package/lib/components/appTooltip/appTooltip.vue.js +0 -1
- package/lib/components/appTooltip/index.js +0 -1
- package/lib/components/appUserAvatar/appUserAvatar.vue.js +140 -0
- package/lib/components/appUserAvatar/index.js +11 -0
- package/lib/components/appUserAvatar/style/appUserAvatar.scss +33 -0
- package/lib/components/index.js +24 -18
- package/lib/config/index.js +0 -1
- package/lib/constants/index.js +0 -1
- package/lib/constants/keys.js +0 -1
- package/lib/hooks/index.js +8 -2
- package/lib/hooks/useApi.js +19 -3
- package/lib/hooks/useGlobalConfig.js +21 -11
- package/lib/hooks/useLocale.js +1 -2
- package/lib/hooks/useMixins.js +0 -1
- package/lib/{store/maintain.js → hooks/useResizeHandler.js} +29 -44
- package/lib/hooks/useUserAvatarMap.js +12 -0
- package/lib/index.js +37 -28
- package/lib/locale/{en_US.js → en.js} +8 -5
- package/lib/locale/index.js +3 -4
- package/lib/locale/zh_CN.js +6 -3
- package/lib/make-installer.js +1 -7
- package/lib/static/hy-svg-icons.js +13 -0
- package/lib/style/element/element.scss +16313 -0
- package/lib/style/element/index.scss +932 -0
- package/lib/style/index.scss +37 -0
- package/lib/style/theme.scss +18 -120
- package/lib/utils/adaptive.js +0 -1
- package/lib/utils/bus.js +0 -1
- package/lib/utils/crypto.js +0 -1
- package/lib/utils/date.js +0 -1
- package/lib/utils/handler.js +0 -1
- package/lib/utils/index.js +0 -1
- package/lib/utils/is.js +0 -1
- package/lib/version.js +1 -2
- package/package.json +17 -7
- package/es/bussiness/index.mjs.map +0 -1
- package/es/components/appConfirmDialog/appConfirmDialog.vue.mjs.map +0 -1
- package/es/components/appConfirmDialog/appConfirmMethod.mjs.map +0 -1
- package/es/components/appConfirmDialog/index.mjs.map +0 -1
- package/es/components/appConfirmDialog/style/appConfirmDialog.scss +0 -5
- package/es/components/appDatePicker/appDatePicker.vue.mjs.map +0 -1
- package/es/components/appDatePicker/index.mjs.map +0 -1
- package/es/components/appForm/appForm.vue.mjs.map +0 -1
- package/es/components/appForm/index.mjs.map +0 -1
- package/es/components/appForm/js/index.mjs.map +0 -1
- package/es/components/appForm/js/useAppForm.mjs.map +0 -1
- package/es/components/appOrgCascader/appOrgCascader.vue.mjs.map +0 -1
- package/es/components/appOrgCascader/index.mjs.map +0 -1
- package/es/components/appSearch/appSearch.vue.mjs.map +0 -1
- package/es/components/appSearch/index.mjs.map +0 -1
- package/es/components/appSearch/js/index.mjs.map +0 -1
- package/es/components/appSearch/js/useAppSearch.mjs.map +0 -1
- package/es/components/appTable/appTable.vue.mjs.map +0 -1
- package/es/components/appTable/cpns/columnSelect.vue.mjs.map +0 -1
- package/es/components/appTable/index.mjs.map +0 -1
- package/es/components/appTable/js/index.mjs.map +0 -1
- package/es/components/appTable/js/search.mjs.map +0 -1
- package/es/components/appTable/js/useAppTable.mjs.map +0 -1
- package/es/components/appTooltip/appTooltip.vue.mjs.map +0 -1
- package/es/components/appTooltip/index.mjs.map +0 -1
- package/es/components/index.mjs.map +0 -1
- package/es/components/svgIcon/iconBox.vue.mjs.map +0 -1
- package/es/components/svgIcon/index.mjs +0 -9
- package/es/components/svgIcon/index.mjs.map +0 -1
- package/es/components/svgIcon/style/iconBox.scss +0 -13
- package/es/components/svgIcon/svgIcon.vue.mjs.map +0 -1
- package/es/config/index.mjs.map +0 -1
- package/es/constants/index.mjs.map +0 -1
- package/es/constants/keys.mjs.map +0 -1
- package/es/hooks/index.mjs.map +0 -1
- package/es/hooks/useApi.mjs.map +0 -1
- package/es/hooks/useGlobalConfig.mjs.map +0 -1
- package/es/hooks/useLocale.mjs.map +0 -1
- package/es/hooks/useMixins.mjs.map +0 -1
- package/es/index.mjs.map +0 -1
- package/es/locale/en_US.mjs.map +0 -1
- package/es/locale/index.mjs.map +0 -1
- package/es/locale/zh_CN.mjs.map +0 -1
- package/es/make-installer.mjs.map +0 -1
- package/es/store/index.mjs +0 -7
- package/es/store/index.mjs.map +0 -1
- package/es/store/maintain.mjs.map +0 -1
- package/es/utils/adaptive.mjs.map +0 -1
- package/es/utils/bus.mjs.map +0 -1
- package/es/utils/crypto.mjs.map +0 -1
- package/es/utils/date.mjs.map +0 -1
- package/es/utils/handler.mjs.map +0 -1
- package/es/utils/index.mjs.map +0 -1
- package/es/utils/is.mjs.map +0 -1
- package/es/version.mjs.map +0 -1
- package/lib/bussiness/index.js.map +0 -1
- package/lib/components/appConfirmDialog/appConfirmDialog.vue.js.map +0 -1
- package/lib/components/appConfirmDialog/appConfirmMethod.js.map +0 -1
- package/lib/components/appConfirmDialog/index.js.map +0 -1
- package/lib/components/appConfirmDialog/style/appConfirmDialog.scss +0 -5
- package/lib/components/appDatePicker/appDatePicker.vue.js.map +0 -1
- package/lib/components/appDatePicker/index.js.map +0 -1
- package/lib/components/appForm/appForm.vue.js.map +0 -1
- package/lib/components/appForm/index.js.map +0 -1
- package/lib/components/appForm/js/index.js.map +0 -1
- package/lib/components/appForm/js/useAppForm.js.map +0 -1
- package/lib/components/appOrgCascader/appOrgCascader.vue.js.map +0 -1
- package/lib/components/appOrgCascader/index.js.map +0 -1
- package/lib/components/appSearch/appSearch.vue.js.map +0 -1
- package/lib/components/appSearch/index.js.map +0 -1
- package/lib/components/appSearch/js/index.js.map +0 -1
- package/lib/components/appSearch/js/useAppSearch.js.map +0 -1
- package/lib/components/appTable/appTable.vue.js.map +0 -1
- package/lib/components/appTable/cpns/columnSelect.vue.js.map +0 -1
- package/lib/components/appTable/index.js.map +0 -1
- package/lib/components/appTable/js/index.js.map +0 -1
- package/lib/components/appTable/js/search.js.map +0 -1
- package/lib/components/appTable/js/useAppTable.js.map +0 -1
- package/lib/components/appTooltip/appTooltip.vue.js.map +0 -1
- package/lib/components/appTooltip/index.js.map +0 -1
- package/lib/components/index.js.map +0 -1
- package/lib/components/svgIcon/iconBox.vue.js.map +0 -1
- package/lib/components/svgIcon/index.js +0 -15
- package/lib/components/svgIcon/index.js.map +0 -1
- package/lib/components/svgIcon/style/iconBox.scss +0 -13
- package/lib/components/svgIcon/svgIcon.vue.js.map +0 -1
- package/lib/config/index.js.map +0 -1
- package/lib/constants/index.js.map +0 -1
- package/lib/constants/keys.js.map +0 -1
- package/lib/hooks/index.js.map +0 -1
- package/lib/hooks/useApi.js.map +0 -1
- package/lib/hooks/useGlobalConfig.js.map +0 -1
- package/lib/hooks/useLocale.js.map +0 -1
- package/lib/hooks/useMixins.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/locale/en_US.js.map +0 -1
- package/lib/locale/index.js.map +0 -1
- package/lib/locale/zh_CN.js.map +0 -1
- package/lib/make-installer.js.map +0 -1
- package/lib/store/index.js +0 -10
- package/lib/store/index.js.map +0 -1
- package/lib/store/maintain.js.map +0 -1
- package/lib/utils/adaptive.js.map +0 -1
- package/lib/utils/bus.js.map +0 -1
- package/lib/utils/crypto.js.map +0 -1
- package/lib/utils/date.js.map +0 -1
- package/lib/utils/handler.js.map +0 -1
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/is.js.map +0 -1
- package/lib/version.js.map +0 -1
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import { ref, getCurrentInstance, computed, unref } from 'vue';
|
|
1
|
+
import { ref, getCurrentInstance, computed, unref, inject, provide } from 'vue';
|
|
2
|
+
import * as index from '../locale/index.mjs';
|
|
2
3
|
import { localeContextKey } from './useLocale.mjs';
|
|
3
4
|
import { localApiKey } from './useApi.mjs';
|
|
5
|
+
import { localUserAvatarMapKey } from './useUserAvatarMap.mjs';
|
|
6
|
+
import Chinese from '../locale/zh_CN.mjs';
|
|
4
7
|
|
|
5
8
|
const globalConfig = ref();
|
|
6
9
|
const mergeConfig = (a, b) => {
|
|
7
|
-
const keys = [.../* @__PURE__ */ new Set([...
|
|
10
|
+
const keys = [.../* @__PURE__ */ new Set([...Object.keys(a), ...Object.keys(b)])];
|
|
8
11
|
const obj = {};
|
|
9
12
|
for (const key of keys) {
|
|
10
13
|
obj[key] = b[key] !== void 0 ? b[key] : a[key];
|
|
11
14
|
}
|
|
12
15
|
return obj;
|
|
13
16
|
};
|
|
14
|
-
|
|
17
|
+
const configProviderContextKey = /* @__PURE__ */ Symbol("configProviderContextKey");
|
|
18
|
+
function useGlobalConfig(key, defaultValue = void 0) {
|
|
15
19
|
const config = getCurrentInstance() ? inject(configProviderContextKey, globalConfig) : globalConfig;
|
|
16
20
|
if (key) {
|
|
17
21
|
return computed(() => {
|
|
@@ -22,13 +26,13 @@ function getGlobalConfig(key, defaultValue = void 0) {
|
|
|
22
26
|
return config;
|
|
23
27
|
}
|
|
24
28
|
}
|
|
25
|
-
const
|
|
29
|
+
const provideGlobalConfig = (config, app, global = false) => {
|
|
26
30
|
var _a;
|
|
27
31
|
const inSetup = !!getCurrentInstance();
|
|
28
|
-
const oldConfig = inSetup ?
|
|
32
|
+
const oldConfig = inSetup ? useGlobalConfig() : void 0;
|
|
29
33
|
const provideFn = (_a = app == null ? void 0 : app.provide) != null ? _a : inSetup ? provide : void 0;
|
|
30
34
|
if (!provideFn) {
|
|
31
|
-
|
|
35
|
+
console.warn(
|
|
32
36
|
"provideGlobalConfig",
|
|
33
37
|
"provideGlobalConfig() can only be used inside setup()."
|
|
34
38
|
);
|
|
@@ -39,18 +43,23 @@ const useGlobalConfig = (config, app) => {
|
|
|
39
43
|
if (!(oldConfig == null ? void 0 : oldConfig.value)) return cfg;
|
|
40
44
|
return mergeConfig(oldConfig.value, cfg);
|
|
41
45
|
});
|
|
46
|
+
provideFn(configProviderContextKey, context);
|
|
42
47
|
provideFn(
|
|
43
48
|
localeContextKey,
|
|
44
|
-
computed(() => context.value.locale)
|
|
49
|
+
computed(() => index[context.value.locale] || Chinese)
|
|
45
50
|
);
|
|
46
51
|
provideFn(
|
|
47
52
|
localApiKey,
|
|
48
53
|
computed(() => context.value.api)
|
|
49
54
|
);
|
|
50
|
-
|
|
55
|
+
provideFn(
|
|
56
|
+
localUserAvatarMapKey,
|
|
57
|
+
computed(() => context.value.userAvatarMap)
|
|
58
|
+
);
|
|
59
|
+
if (global || !globalConfig.value) {
|
|
51
60
|
globalConfig.value = context.value;
|
|
52
61
|
}
|
|
62
|
+
return context;
|
|
53
63
|
};
|
|
54
64
|
|
|
55
|
-
export {
|
|
56
|
-
//# sourceMappingURL=useGlobalConfig.mjs.map
|
|
65
|
+
export { configProviderContextKey, provideGlobalConfig, useGlobalConfig };
|
package/es/hooks/useLocale.mjs
CHANGED
|
@@ -27,8 +27,7 @@ const getLanguage = (localeOverrides) => {
|
|
|
27
27
|
};
|
|
28
28
|
const useLocale = (localeOverrides) => {
|
|
29
29
|
const locale = localeOverrides || inject(localeContextKey, ref());
|
|
30
|
-
return buildLocaleContext(computed(() => locale
|
|
30
|
+
return buildLocaleContext(computed(() => unref(locale) || Chinese));
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
export { buildLocaleContext, buildTranslator, getLanguage, localeContextKey, translate, useLocale };
|
|
34
|
-
//# sourceMappingURL=useLocale.mjs.map
|
package/es/hooks/useMixins.mjs
CHANGED
|
@@ -1,45 +1,7 @@
|
|
|
1
1
|
import { nextTick } from 'vue';
|
|
2
|
-
import { defineStore } from 'pinia';
|
|
3
2
|
import { isFunction } from '../utils/is.mjs';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
const useMaintainStore = defineStore(MAINTAIN_STORE, {
|
|
7
|
-
state: () => ({
|
|
8
|
-
// resize集合
|
|
9
|
-
resizeMap: {}
|
|
10
|
-
}),
|
|
11
|
-
getters: {},
|
|
12
|
-
actions: {
|
|
13
|
-
/**
|
|
14
|
-
* @function setResize 添加统一重置
|
|
15
|
-
* @param {Function} callback 回调函数
|
|
16
|
-
* @param {Symbol | string} key
|
|
17
|
-
*/
|
|
18
|
-
addResize(callback, key) {
|
|
19
|
-
if (!callback) return;
|
|
20
|
-
if (!key) {
|
|
21
|
-
key = Symbol(key);
|
|
22
|
-
}
|
|
23
|
-
this.resizeMap[key] = callback;
|
|
24
|
-
addResizeListener();
|
|
25
|
-
return key;
|
|
26
|
-
},
|
|
27
|
-
/**
|
|
28
|
-
* @function removeResize 删除重置属性
|
|
29
|
-
* @param {Symbol} key
|
|
30
|
-
*/
|
|
31
|
-
removeResize(key) {
|
|
32
|
-
if (key) {
|
|
33
|
-
delete this.resizeMap[key];
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
// 清除所有resize事件
|
|
37
|
-
clearResize() {
|
|
38
|
-
this.resizeMap = {};
|
|
39
|
-
removeResizeListener();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
});
|
|
4
|
+
let resizeMap = {};
|
|
43
5
|
const resizeConfig = {
|
|
44
6
|
init: false,
|
|
45
7
|
animationId: void 0,
|
|
@@ -48,7 +10,6 @@ const resizeConfig = {
|
|
|
48
10
|
// timeout实例
|
|
49
11
|
};
|
|
50
12
|
function onResizeHandler() {
|
|
51
|
-
const maintainStore = useMaintainStore();
|
|
52
13
|
if (resizeConfig.animationId) {
|
|
53
14
|
resizeConfig.timerList.forEach((timeout) => {
|
|
54
15
|
timeout && clearTimeout(timeout);
|
|
@@ -57,7 +18,7 @@ function onResizeHandler() {
|
|
|
57
18
|
}
|
|
58
19
|
resizeConfig.animationId = window.requestAnimationFrame(() => {
|
|
59
20
|
try {
|
|
60
|
-
let symbolKeys = Object.getOwnPropertySymbols(
|
|
21
|
+
let symbolKeys = Object.getOwnPropertySymbols(resizeMap);
|
|
61
22
|
symbolKeys = [
|
|
62
23
|
...symbolKeys.slice(resizeConfig.resizeIndex),
|
|
63
24
|
...symbolKeys
|
|
@@ -65,7 +26,7 @@ function onResizeHandler() {
|
|
|
65
26
|
symbolKeys.forEach((key, index, list) => {
|
|
66
27
|
const timeout = setTimeout(() => {
|
|
67
28
|
resizeConfig.resizeIndex = list.length - 1 == index ? 0 : index;
|
|
68
|
-
const fun =
|
|
29
|
+
const fun = resizeMap[key];
|
|
69
30
|
isFunction(fun) && fun();
|
|
70
31
|
}, 1);
|
|
71
32
|
resizeConfig.timerList.push(timeout);
|
|
@@ -85,6 +46,30 @@ function removeResizeListener() {
|
|
|
85
46
|
window.removeEventListener("resize", onResizeHandler);
|
|
86
47
|
resizeConfig.init = false;
|
|
87
48
|
}
|
|
49
|
+
function useResizeHandler() {
|
|
50
|
+
function addResize(key, callback) {
|
|
51
|
+
if (!callback) return;
|
|
52
|
+
if (!key) {
|
|
53
|
+
key = /* @__PURE__ */ Symbol("resize");
|
|
54
|
+
}
|
|
55
|
+
resizeMap[key] = callback;
|
|
56
|
+
addResizeListener();
|
|
57
|
+
return key;
|
|
58
|
+
}
|
|
59
|
+
function removeResize(key) {
|
|
60
|
+
if (key) {
|
|
61
|
+
delete resizeMap[key];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function clearResize() {
|
|
65
|
+
resizeMap = {};
|
|
66
|
+
removeResizeListener();
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
addResize,
|
|
70
|
+
removeResize,
|
|
71
|
+
clearResize
|
|
72
|
+
};
|
|
73
|
+
}
|
|
88
74
|
|
|
89
|
-
export {
|
|
90
|
-
//# sourceMappingURL=maintain.mjs.map
|
|
75
|
+
export { useResizeHandler };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { inject, ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
const localUserAvatarMapKey = /* @__PURE__ */ Symbol("userAvatarMap");
|
|
4
|
+
const useUserAvatarMap = () => {
|
|
5
|
+
const userAvatarMap = inject(localUserAvatarMapKey, ref(/* @__PURE__ */ new Map()));
|
|
6
|
+
return { userAvatarMap };
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { localUserAvatarMapKey, useUserAvatarMap };
|
package/es/index.mjs
CHANGED
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
import installer from './make-installer.mjs';
|
|
2
|
-
export {
|
|
2
|
+
export { AppButton } from './components/appButton/index.mjs';
|
|
3
|
+
export { AppConfigProvider } from './components/appConfigProvider/index.mjs';
|
|
3
4
|
export { AppConfirmDialog } from './components/appConfirmDialog/index.mjs';
|
|
4
5
|
export { AppDatePicker } from './components/appDatePicker/index.mjs';
|
|
5
6
|
export { AppForm } from './components/appForm/index.mjs';
|
|
7
|
+
export { AppIcon } from './components/appIcon/index.mjs';
|
|
8
|
+
export { AppIconBox } from './components/appIconBox/index.mjs';
|
|
6
9
|
export { AppOrgCascader } from './components/appOrgCascader/index.mjs';
|
|
7
10
|
export { AppSearch } from './components/appSearch/index.mjs';
|
|
8
11
|
export { AppTable } from './components/appTable/index.mjs';
|
|
9
12
|
export { AppTooltip } from './components/appTooltip/index.mjs';
|
|
10
|
-
export {
|
|
13
|
+
export { AppUserAvatar } from './components/appUserAvatar/index.mjs';
|
|
11
14
|
export { base64Decrypt, encryptToBase64, generateRandomCode } from './utils/crypto.mjs';
|
|
12
15
|
export { buildLocaleContext, buildTranslator, getLanguage, localeContextKey, translate, useLocale } from './hooks/useLocale.mjs';
|
|
13
16
|
export { bus } from './utils/bus.mjs';
|
|
14
17
|
export { cloneDeep, createUniqueId, funRunHandler, mergeDeep, withInstall } from './utils/handler.mjs';
|
|
18
|
+
export { configProviderContextKey, provideGlobalConfig, useGlobalConfig } from './hooks/useGlobalConfig.mjs';
|
|
19
|
+
export { defaultAxios, localApiKey, useApi } from './hooks/useApi.mjs';
|
|
15
20
|
export { getDefaultValueFormatByType } from './utils/date.mjs';
|
|
16
|
-
export { getGlobalConfig, useGlobalConfig } from './hooks/useGlobalConfig.mjs';
|
|
17
21
|
export { isArray, isBoolean, isEmpty, isFunction, isNull, isNumber, isObject, isOverflowing, isString, isSymbol, isUndefined, isVueProxy } from './utils/is.mjs';
|
|
18
|
-
export {
|
|
22
|
+
export { localUserAvatarMapKey, useUserAvatarMap } from './hooks/useUserAvatarMap.mjs';
|
|
19
23
|
export { parseRem, pxTorem, remToPx, vwToPx } from './utils/adaptive.mjs';
|
|
20
24
|
export { useAppForm } from './components/appForm/js/useAppForm.mjs';
|
|
21
25
|
export { useAppSearch } from './components/appSearch/js/useAppSearch.mjs';
|
|
22
26
|
export { useAppTable } from './components/appTable/js/useAppTable.mjs';
|
|
23
|
-
export { useMaintainStore } from './store/maintain.mjs';
|
|
24
27
|
export { useMixins } from './hooks/useMixins.mjs';
|
|
28
|
+
export { useResizeHandler } from './hooks/useResizeHandler.mjs';
|
|
25
29
|
|
|
26
30
|
import "./style/index.scss";
|
|
27
31
|
|
|
28
32
|
|
|
29
33
|
export { installer as default };
|
|
30
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var en = {
|
|
2
2
|
name: "en_US",
|
|
3
3
|
hy: {
|
|
4
4
|
language: "Language",
|
|
@@ -28,7 +28,7 @@ var en_US = {
|
|
|
28
28
|
year: "Year",
|
|
29
29
|
years: "Years",
|
|
30
30
|
noData: "No Data",
|
|
31
|
-
|
|
31
|
+
confirm: "Confirm",
|
|
32
32
|
loading: "Loading"
|
|
33
33
|
},
|
|
34
34
|
table: {
|
|
@@ -45,7 +45,8 @@ var en_US = {
|
|
|
45
45
|
nonsupport: "Nonsupport",
|
|
46
46
|
editColumn: "Edit Column",
|
|
47
47
|
Index: "\u5E8F\u53F7",
|
|
48
|
-
searchFor: "Search For {0}"
|
|
48
|
+
searchFor: "Search For {0}",
|
|
49
|
+
example: "Example"
|
|
49
50
|
},
|
|
50
51
|
confirmDialog: {
|
|
51
52
|
content: "Secondary Confirmation Operation",
|
|
@@ -60,8 +61,10 @@ var en_US = {
|
|
|
60
61
|
},
|
|
61
62
|
cascader: {
|
|
62
63
|
pleaseSelectDepartment: "Please Select Department"
|
|
64
|
+
},
|
|
65
|
+
userAvatar: {
|
|
66
|
+
userAvatar: "User Avatar"
|
|
63
67
|
}
|
|
64
68
|
};
|
|
65
69
|
|
|
66
|
-
export {
|
|
67
|
-
//# sourceMappingURL=en_US.mjs.map
|
|
70
|
+
export { en as default };
|
package/es/locale/index.mjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export { default as en } from './
|
|
2
|
-
export { default as
|
|
3
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
export { default as en } from './en.mjs';
|
|
2
|
+
export { default as zhCn } from './zh_CN.mjs';
|
package/es/locale/zh_CN.mjs
CHANGED
|
@@ -28,7 +28,7 @@ var Chinese = {
|
|
|
28
28
|
year: "\u5E74",
|
|
29
29
|
years: "\u5E74",
|
|
30
30
|
noData: "\u6682\u65E0\u6570\u636E",
|
|
31
|
-
|
|
31
|
+
confirm: "\u786E\u8BA4",
|
|
32
32
|
loading: "\u52A0\u8F7D\u4E2D"
|
|
33
33
|
},
|
|
34
34
|
table: {
|
|
@@ -46,7 +46,8 @@ var Chinese = {
|
|
|
46
46
|
editColumn: "\u7F16\u8F91\u5217",
|
|
47
47
|
index: "\u5E8F\u53F7",
|
|
48
48
|
searchFor: "\u641C\u7D22{0}",
|
|
49
|
-
maxColumnLimitTip: "\u5DF2\u8FBE\u5230\u5B57\u6BB5\u6570\u91CF\u4E0A\u9650(\u6700\u591A15\u4E2A)\uFF0C\u8BF7\u53D6\u6D88\u90E8\u5206\u5B57\u6BB5\u540E\u518D\u786E\u8BA4"
|
|
49
|
+
maxColumnLimitTip: "\u5DF2\u8FBE\u5230\u5B57\u6BB5\u6570\u91CF\u4E0A\u9650(\u6700\u591A15\u4E2A)\uFF0C\u8BF7\u53D6\u6D88\u90E8\u5206\u5B57\u6BB5\u540E\u518D\u786E\u8BA4",
|
|
50
|
+
example: "\u793A\u4F8B"
|
|
50
51
|
},
|
|
51
52
|
confirmDialog: {
|
|
52
53
|
content: "\u4E8C\u6B21\u786E\u8BA4\u64CD\u4F5C",
|
|
@@ -60,8 +61,10 @@ var Chinese = {
|
|
|
60
61
|
},
|
|
61
62
|
cascader: {
|
|
62
63
|
pleaseSelectDepartment: "\u8BF7\u9009\u62E9\u90E8\u95E8"
|
|
64
|
+
},
|
|
65
|
+
userAvatar: {
|
|
66
|
+
userAvatar: "\u7528\u6237\u5934\u50CF"
|
|
63
67
|
}
|
|
64
68
|
};
|
|
65
69
|
|
|
66
70
|
export { Chinese as default };
|
|
67
|
-
//# sourceMappingURL=zh_CN.mjs.map
|
package/es/make-installer.mjs
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
import { INSTALLED_KEY } from './constants/index.mjs';
|
|
2
2
|
import * as index from './components/index.mjs';
|
|
3
3
|
import { version } from './version.mjs';
|
|
4
|
-
import {
|
|
5
|
-
import { useGlobalConfig } from './hooks/useGlobalConfig.mjs';
|
|
4
|
+
import { provideGlobalConfig } from './hooks/useGlobalConfig.mjs';
|
|
6
5
|
|
|
7
6
|
const makeInstaller = () => {
|
|
8
7
|
const install = (app, options) => {
|
|
9
|
-
var _a, _b;
|
|
10
8
|
if (app[INSTALLED_KEY]) return;
|
|
11
9
|
app[INSTALLED_KEY] = true;
|
|
12
10
|
Object.values(index).forEach((component) => {
|
|
13
11
|
if (!component.install) return;
|
|
14
12
|
app.use(component);
|
|
15
13
|
});
|
|
16
|
-
if (options)
|
|
17
|
-
if (!((_b = (_a = app.config) == null ? void 0 : _a.globalProperties) == null ? void 0 : _b.$pinia)) {
|
|
18
|
-
app.use(store);
|
|
19
|
-
}
|
|
14
|
+
if (options) provideGlobalConfig(options, app, true);
|
|
20
15
|
};
|
|
21
16
|
return {
|
|
22
17
|
version,
|
|
@@ -26,4 +21,3 @@ const makeInstaller = () => {
|
|
|
26
21
|
var installer = makeInstaller();
|
|
27
22
|
|
|
28
23
|
export { installer as default };
|
|
29
|
-
//# sourceMappingURL=make-installer.mjs.map
|