hy-dispatch-ui-v3 0.1.1 → 0.1.3

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.
Files changed (86) hide show
  1. package/dist/tailwind.css +56 -6
  2. package/es/components/appButton/appButton.vue.mjs +6 -6
  3. package/es/components/appButton/style/appButton.scss +4 -4
  4. package/es/components/appConfigProvider/appConfigProvider.vue.mjs +26 -10
  5. package/es/components/appConfirmDialog/appConfirmDialog.vue.mjs +42 -18
  6. package/es/components/appConfirmDialog/appConfirmMethod.mjs +15 -9
  7. package/es/components/appForm/appForm.vue.mjs +17 -3
  8. package/es/components/appForm/js/useAppForm.mjs +15 -1
  9. package/es/components/appIcon/index.mjs +1 -3
  10. package/es/components/appIcon/style/appIcon.scss +2 -2
  11. package/es/components/{appIcon → appIconBox}/appIconBox.vue.mjs +3 -3
  12. package/es/components/appIconBox/index.mjs +6 -0
  13. package/es/components/appNoPermissions/appNoPermissions.vue.mjs +48 -0
  14. package/es/components/appNoPermissions/index.mjs +6 -0
  15. package/es/components/appNoPermissions/style/appNoPermissions.scss +0 -0
  16. package/es/components/appNoPermissionsMap/appNoPermissionsMap.vue.mjs +50 -0
  17. package/es/components/appNoPermissionsMap/index.mjs +6 -0
  18. package/es/components/appNoPermissionsMap/style/appNoPermissionsMap.scss +0 -0
  19. package/es/components/appOrgCascader/appOrgCascader.vue.mjs +1 -1
  20. package/es/components/appSearch/appSearch.vue.mjs +22 -6
  21. package/es/components/appSearch/js/index.mjs +17 -8
  22. package/es/components/appSearch/js/useAppSearch.mjs +12 -1
  23. package/es/components/appTable/appTable.vue.mjs +27 -10
  24. package/es/components/appTable/js/index.mjs +21 -6
  25. package/es/components/appTable/js/search.mjs +0 -2
  26. package/es/components/appTable/js/useAppTable.mjs +17 -1
  27. package/es/components/appUserAvatar/appUserAvatar.vue.mjs +136 -0
  28. package/es/components/appUserAvatar/index.mjs +6 -0
  29. package/es/components/appUserAvatar/style/appUserAvatar.scss +33 -0
  30. package/es/components/index.mjs +5 -1
  31. package/es/hooks/index.mjs +2 -0
  32. package/es/hooks/useApi.mjs +9 -0
  33. package/es/hooks/useGlobalConfig.mjs +5 -0
  34. package/es/{store/maintain.mjs → hooks/useResizeHandler.mjs} +29 -43
  35. package/es/hooks/useUserAvatarMap.mjs +9 -0
  36. package/es/index.mjs +7 -3
  37. package/es/locale/en.mjs +12 -0
  38. package/es/locale/zh_CN.mjs +13 -1
  39. package/es/make-installer.mjs +0 -5
  40. package/es/style/index.scss +0 -2
  41. package/es/version.mjs +1 -1
  42. package/lib/components/appButton/appButton.vue.js +6 -6
  43. package/lib/components/appButton/style/appButton.scss +4 -4
  44. package/lib/components/appConfigProvider/appConfigProvider.vue.js +26 -10
  45. package/lib/components/appConfirmDialog/appConfirmDialog.vue.js +41 -17
  46. package/lib/components/appConfirmDialog/appConfirmMethod.js +14 -8
  47. package/lib/components/appForm/appForm.vue.js +17 -3
  48. package/lib/components/appForm/js/useAppForm.js +15 -1
  49. package/lib/components/appIcon/index.js +0 -3
  50. package/lib/components/appIcon/style/appIcon.scss +2 -2
  51. package/lib/components/{appIcon → appIconBox}/appIconBox.vue.js +3 -3
  52. package/lib/components/appIconBox/index.js +11 -0
  53. package/lib/components/appNoPermissions/appNoPermissions.vue.js +52 -0
  54. package/lib/components/appNoPermissions/index.js +11 -0
  55. package/lib/components/appNoPermissions/style/appNoPermissions.scss +0 -0
  56. package/lib/components/appNoPermissionsMap/appNoPermissionsMap.vue.js +54 -0
  57. package/lib/components/appNoPermissionsMap/index.js +11 -0
  58. package/lib/components/appNoPermissionsMap/style/appNoPermissionsMap.scss +0 -0
  59. package/lib/components/appOrgCascader/appOrgCascader.vue.js +1 -1
  60. package/lib/components/appSearch/appSearch.vue.js +23 -7
  61. package/lib/components/appSearch/js/index.js +17 -7
  62. package/lib/components/appSearch/js/useAppSearch.js +12 -1
  63. package/lib/components/appTable/appTable.vue.js +26 -9
  64. package/lib/components/appTable/js/index.js +21 -6
  65. package/lib/components/appTable/js/search.js +0 -2
  66. package/lib/components/appTable/js/useAppTable.js +17 -1
  67. package/lib/components/appUserAvatar/appUserAvatar.vue.js +140 -0
  68. package/lib/components/appUserAvatar/index.js +11 -0
  69. package/lib/components/appUserAvatar/style/appUserAvatar.scss +33 -0
  70. package/lib/components/index.js +16 -9
  71. package/lib/hooks/index.js +5 -0
  72. package/lib/hooks/useApi.js +9 -0
  73. package/lib/hooks/useGlobalConfig.js +5 -0
  74. package/lib/{store/maintain.js → hooks/useResizeHandler.js} +29 -43
  75. package/lib/hooks/useUserAvatarMap.js +12 -0
  76. package/lib/index.js +21 -13
  77. package/lib/locale/en.js +12 -0
  78. package/lib/locale/zh_CN.js +13 -1
  79. package/lib/make-installer.js +0 -5
  80. package/lib/style/index.scss +0 -2
  81. package/lib/version.js +1 -1
  82. package/package.json +21 -2
  83. package/es/store/index.mjs +0 -6
  84. package/lib/store/index.js +0 -9
  85. /package/es/components/{appIcon → appIconBox}/style/appIconBox.scss +0 -0
  86. /package/lib/components/{appIcon → appIconBox}/style/appIconBox.scss +0 -0
@@ -252,13 +252,27 @@ const useAppTableWrapper = (hy) => {
252
252
  emits("on-select-checkbox", selectedList.value, row);
253
253
  }
254
254
  }
255
- function onTableSelectAllHandler(selectList = [], row) {
255
+ function onTableSelectHandler(selectList = [], row) {
256
256
  if (selectList.length === 0 && tableDataSource.value.length === 0) {
257
- tableRef.value.clearSelection();
257
+ clearSelection();
258
258
  }
259
259
  selectedList.value = [...selectList];
260
260
  emits("on-select-checkbox", [...selectList], row);
261
261
  }
262
+ function clearSelectedList(list = []) {
263
+ selectedList.value = list || [];
264
+ clearSelection();
265
+ list.forEach((row) => {
266
+ const item = tableDataSource.value.find(
267
+ (v) => getRowKey(row) === getRowKey(v)
268
+ );
269
+ if (item) {
270
+ tableRef.value.toggleRowSelection(item, true);
271
+ } else {
272
+ tableRef.value.toggleRowSelection(row, true);
273
+ }
274
+ });
275
+ }
262
276
  function setTableRowClassName(obj) {
263
277
  const row = obj.row;
264
278
  let className = [];
@@ -295,12 +309,13 @@ const useAppTableWrapper = (hy) => {
295
309
  selectedList,
296
310
  tableTriggerRef,
297
311
  setTableRowClassName,
298
- onTableSelectAllHandler,
312
+ getSelectedList,
313
+ clearSelection,
314
+ clearSelectedList,
315
+ onTableSelectHandler,
299
316
  onTableRowContextmenuHandler,
300
317
  onTableRowClickHandler,
301
- onTableColumnsSelectHandler,
302
- getSelectedList,
303
- clearSelection
318
+ onTableColumnsSelectHandler
304
319
  };
305
320
  };
306
321
 
@@ -42,13 +42,11 @@ function useAppTableSearch(hy) {
42
42
  vue.unref(api).post(`${props.controller}/page`, params, options).then(successFun).finally(() => {
43
43
  resolve();
44
44
  closeAppTableLoading();
45
- clearSelection();
46
45
  });
47
46
  } else if (props.url) {
48
47
  vue.unref(api).post(props.url, params, options).then(successFun).finally(() => {
49
48
  resolve();
50
49
  closeAppTableLoading();
51
- clearSelection();
52
50
  });
53
51
  } else {
54
52
  closeAppTableLoading();
@@ -4,6 +4,22 @@ var vue = require('vue');
4
4
  var is = require('../../../utils/is.js');
5
5
  var useLocale = require('../../../hooks/useLocale.js');
6
6
 
7
+ function getColumnDefaultConfig(column) {
8
+ switch (column.type) {
9
+ case "selection":
10
+ return {
11
+ prop: `${column.type}_prop`,
12
+ reserveSelection: true
13
+ };
14
+ case "index":
15
+ case "expand":
16
+ return {
17
+ prop: `${column.type}_prop`
18
+ };
19
+ default:
20
+ return {};
21
+ }
22
+ }
7
23
  function getColumnDefaultWidth(column) {
8
24
  if (column.width) return column.width;
9
25
  if (column.type === "index") return 80;
@@ -48,7 +64,7 @@ const useAppTable = (config = {}) => {
48
64
  throw Error("\u3010column.prop\u3011\u4E0D\u80FD\u4E3A\u7A7A");
49
65
  }
50
66
  tableColumns.push({
51
- prop: column.prop || column.type !== "default" ? `${column.type}_prop` : column.prop,
67
+ ...getColumnDefaultConfig(column),
52
68
  ...column,
53
69
  type: column.type || "default",
54
70
  width: getColumnDefaultWidth(column),
@@ -0,0 +1,140 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+ var index = require('../appIcon/index.js');
7
+ var useUserAvatarMap = require('../../hooks/useUserAvatarMap.js');
8
+ var adaptive = require('../../utils/adaptive.js');
9
+ var useLocale = require('../../hooks/useLocale.js');
10
+
11
+ import "./style/appUserAvatar.scss";
12
+
13
+ const __default__ = vue.defineComponent({
14
+ name: "AppUserAvatar"
15
+ });
16
+ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
17
+ props: {
18
+ initSelectSvgName: {
19
+ type: String,
20
+ default: () => {
21
+ return "user_online-2";
22
+ }
23
+ },
24
+ initSvgName: {
25
+ type: String,
26
+ default: () => {
27
+ return "user_offline-2";
28
+ }
29
+ },
30
+ device: Object,
31
+ // 设备信息
32
+ audioContextType: {
33
+ type: Boolean,
34
+ default: () => {
35
+ return false;
36
+ }
37
+ },
38
+ iconType: {
39
+ type: Boolean,
40
+ default: () => {
41
+ return true;
42
+ }
43
+ },
44
+ width: {
45
+ type: String,
46
+ default: () => {
47
+ return "54px";
48
+ }
49
+ },
50
+ height: {
51
+ type: String,
52
+ default: () => {
53
+ return "54px";
54
+ }
55
+ }
56
+ },
57
+ emits: [],
58
+ setup(__props, { emit: __emit }) {
59
+ const props = __props;
60
+ const { t } = useLocale.useLocale();
61
+ const { userAvatarMap } = useUserAvatarMap.useUserAvatarMap();
62
+ const headImg = vue.computed(() => {
63
+ var _a;
64
+ return props.device && ((_a = vue.unref(userAvatarMap)) == null ? void 0 : _a.get(props.device.deviceId));
65
+ });
66
+ function parseRem(res) {
67
+ let px = res;
68
+ if (px) {
69
+ px = parseInt(px, 10);
70
+ if (isNaN(px)) {
71
+ return "";
72
+ }
73
+ return adaptive.pxTorem(px);
74
+ }
75
+ return "";
76
+ }
77
+ return (_ctx, _cache) => {
78
+ var _a, _b, _c, _d, _e, _f;
79
+ return vue.openBlock(), vue.createElementBlock(
80
+ "div",
81
+ {
82
+ style: vue.normalizeStyle({
83
+ width: `${parseRem(__props.width)}rem`,
84
+ height: `${parseRem(__props.height)}rem`,
85
+ "border-color": ((_a = __props.device) == null ? void 0 : _a.onlineState) === 1 ? __props.audioContextType ? "rgb(var(--hy-theme))" : ((_b = __props.device) == null ? void 0 : _b.gbDevice) === 1 ? "#FDE777" : "rgb(var(--hy-auxiliary))" : "rgb(var(--hy-info))"
86
+ }),
87
+ class: "app-user-avatar"
88
+ },
89
+ [
90
+ ((_c = __props.device) == null ? void 0 : _c.gbDevice) === 1 ? (vue.openBlock(), vue.createElementBlock(
91
+ "div",
92
+ {
93
+ key: 0,
94
+ style: vue.normalizeStyle(
95
+ ((_d = __props.device) == null ? void 0 : _d.onlineState) === 1 ? "background:linear-gradient(180deg, #5A2120 0%, #C81F12 100%); color:#FDE777;" : "background: rgb(var(--hy-background-2)); color: rgb(var(--hy-auxiliary));"
96
+ ),
97
+ class: "user-avatar font-[600] text-base"
98
+ },
99
+ " GB ",
100
+ 4
101
+ /* STYLE */
102
+ )) : (vue.openBlock(), vue.createElementBlock("div", {
103
+ key: 1,
104
+ class: "user-avatar"
105
+ }, [
106
+ headImg.value ? (vue.openBlock(), vue.createElementBlock("img", {
107
+ key: 0,
108
+ src: headImg.value,
109
+ alt: vue.unref(t)("userAvatar.userAvatar")
110
+ }, null, 8, ["src", "alt"])) : ((_e = __props.device) == null ? void 0 : _e.onlineState) === 1 ? (vue.openBlock(), vue.createBlock(vue.unref(index.AppIcon), {
111
+ key: 1,
112
+ "svg-name": __props.initSelectSvgName,
113
+ className: "svgBox"
114
+ }, null, 8, ["svg-name"])) : (vue.openBlock(), vue.createBlock(vue.unref(index.AppIcon), {
115
+ key: 2,
116
+ "svg-name": __props.initSvgName,
117
+ className: "svgBox"
118
+ }, null, 8, ["svg-name"]))
119
+ ])),
120
+ __props.iconType ? (vue.openBlock(), vue.createElementBlock(
121
+ "span",
122
+ {
123
+ key: 2,
124
+ class: vue.normalizeClass(
125
+ ((_f = __props.device) == null ? void 0 : _f.onlineState) === 1 ? "bg-success shadow-[0_0_4px_0] shadow-success" : "bg-info"
126
+ )
127
+ },
128
+ null,
129
+ 2
130
+ /* CLASS */
131
+ )) : vue.createCommentVNode("v-if", true)
132
+ ],
133
+ 4
134
+ /* STYLE */
135
+ );
136
+ };
137
+ }
138
+ });
139
+
140
+ exports.default = _sfc_main;
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var appUserAvatar = require('./appUserAvatar.vue.js');
6
+ var handler = require('../../utils/handler.js');
7
+
8
+ const AppUserAvatar = handler.withInstall(appUserAvatar.default);
9
+
10
+ exports.AppUserAvatar = AppUserAvatar;
11
+ exports.default = AppUserAvatar;
@@ -0,0 +1,33 @@
1
+ .app-user-avatar {
2
+ background: rgb(var(--hy-background-2));
3
+ position: relative;
4
+ border: 1px solid rgb(var(--hy-main));
5
+ box-sizing: border-box;
6
+ flex-shrink: 0;
7
+ border-radius: 50%;
8
+ .user-avatar {
9
+ width: 100%;
10
+ height: 100%;
11
+ border-radius: 50%;
12
+ overflow: hidden;
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ img {
17
+ height: 100%;
18
+ }
19
+ .svgBox {
20
+ width: 90%;
21
+ height: 90%;
22
+ color: rgb(var(--hy-main));
23
+ }
24
+ }
25
+ span {
26
+ width: 32%;
27
+ height: 32%;
28
+ border-radius: 50%;
29
+ position: absolute;
30
+ bottom: -4%;
31
+ right: -2%;
32
+ }
33
+ }
@@ -1,32 +1,39 @@
1
1
  'use strict';
2
2
 
3
- var index$6 = require('./appOrgCascader/index.js');
3
+ var index$9 = require('./appOrgCascader/index.js');
4
4
  var index$2 = require('./appConfirmDialog/index.js');
5
5
  var index$3 = require('./appDatePicker/index.js');
6
6
  var index$4 = require('./appForm/index.js');
7
7
  var index$5 = require('./appIcon/index.js');
8
- var index$7 = require('./appSearch/index.js');
9
- var index$8 = require('./appTable/index.js');
10
- var index$9 = require('./appTooltip/index.js');
8
+ var index$6 = require('./appIconBox/index.js');
9
+ var index$a = require('./appSearch/index.js');
10
+ var index$b = require('./appTable/index.js');
11
+ var index$c = require('./appTooltip/index.js');
11
12
  var index$1 = require('./appConfigProvider/index.js');
12
13
  var index = require('./appButton/index.js');
14
+ var index$d = require('./appUserAvatar/index.js');
15
+ var index$7 = require('./appNoPermissions/index.js');
16
+ var index$8 = require('./appNoPermissionsMap/index.js');
13
17
  var useAppForm = require('./appForm/js/useAppForm.js');
14
18
  var useAppSearch = require('./appSearch/js/useAppSearch.js');
15
19
  var useAppTable = require('./appTable/js/useAppTable.js');
16
20
 
17
21
 
18
22
 
19
- exports.AppOrgCascader = index$6.AppOrgCascader;
23
+ exports.AppOrgCascader = index$9.AppOrgCascader;
20
24
  exports.AppConfirmDialog = index$2.AppConfirmDialog;
21
25
  exports.AppDatePicker = index$3.AppDatePicker;
22
26
  exports.AppForm = index$4.AppForm;
23
27
  exports.AppIcon = index$5.AppIcon;
24
- exports.appIconBox = index$5.appIconBox;
25
- exports.AppSearch = index$7.AppSearch;
26
- exports.AppTable = index$8.AppTable;
27
- exports.AppTooltip = index$9.AppTooltip;
28
+ exports.AppIconBox = index$6.AppIconBox;
29
+ exports.AppSearch = index$a.AppSearch;
30
+ exports.AppTable = index$b.AppTable;
31
+ exports.AppTooltip = index$c.AppTooltip;
28
32
  exports.AppConfigProvider = index$1.AppConfigProvider;
29
33
  exports.AppButton = index.AppButton;
34
+ exports.AppUserAvatar = index$d.AppUserAvatar;
35
+ exports.AppNoPermissions = index$7.AppNoPermissions;
36
+ exports.AppNoPermissionsMap = index$8.AppNoPermissionsMap;
30
37
  exports.useAppForm = useAppForm.useAppForm;
31
38
  exports.useAppSearch = useAppSearch.useAppSearch;
32
39
  exports.useAppTable = useAppTable.useAppTable;
@@ -4,6 +4,8 @@ var useApi = require('./useApi.js');
4
4
  var useLocale = require('./useLocale.js');
5
5
  var useGlobalConfig = require('./useGlobalConfig.js');
6
6
  var useMixins = require('./useMixins.js');
7
+ var useUserAvatarMap = require('./useUserAvatarMap.js');
8
+ var useResizeHandler = require('./useResizeHandler.js');
7
9
 
8
10
 
9
11
 
@@ -20,3 +22,6 @@ exports.configProviderContextKey = useGlobalConfig.configProviderContextKey;
20
22
  exports.provideGlobalConfig = useGlobalConfig.provideGlobalConfig;
21
23
  exports.useGlobalConfig = useGlobalConfig.useGlobalConfig;
22
24
  exports.useMixins = useMixins.useMixins;
25
+ exports.localUserAvatarMapKey = useUserAvatarMap.localUserAvatarMapKey;
26
+ exports.useUserAvatarMap = useUserAvatarMap.useUserAvatarMap;
27
+ exports.useResizeHandler = useResizeHandler.useResizeHandler;
@@ -10,6 +10,15 @@ const defaultAxios = vue.ref(
10
10
  timeout: 6e4
11
11
  })
12
12
  );
13
+ defaultAxios.value.interceptors.response.use(
14
+ (response) => {
15
+ const data = response == null ? void 0 : response.data;
16
+ return Promise.resolve(data);
17
+ },
18
+ (error) => {
19
+ return Promise.reject(error);
20
+ }
21
+ );
13
22
  const useApi = () => {
14
23
  const api = vue.inject(localApiKey, defaultAxios);
15
24
  return { api: vue.unref(api) ? api : defaultAxios };
@@ -4,6 +4,7 @@ var vue = require('vue');
4
4
  var index = require('../locale/index.js');
5
5
  var useLocale = require('./useLocale.js');
6
6
  var useApi = require('./useApi.js');
7
+ var useUserAvatarMap = require('./useUserAvatarMap.js');
7
8
  var zh_CN = require('../locale/zh_CN.js');
8
9
 
9
10
  const globalConfig = vue.ref();
@@ -53,6 +54,10 @@ const provideGlobalConfig = (config, app, global = false) => {
53
54
  useApi.localApiKey,
54
55
  vue.computed(() => context.value.api)
55
56
  );
57
+ provideFn(
58
+ useUserAvatarMap.localUserAvatarMapKey,
59
+ vue.computed(() => context.value.userAvatarMap)
60
+ );
56
61
  if (global || !globalConfig.value) {
57
62
  globalConfig.value = context.value;
58
63
  }
@@ -1,47 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var vue = require('vue');
4
- var pinia = require('pinia');
5
4
  var is = require('../utils/is.js');
6
5
 
7
- const MAINTAIN_STORE = "MAINTAIN_STORE";
8
- const useMaintainStore = pinia.defineStore(MAINTAIN_STORE, {
9
- state: () => ({
10
- // resize集合
11
- resizeMap: {}
12
- }),
13
- getters: {},
14
- actions: {
15
- /**
16
- * @function setResize 添加统一重置
17
- * @param {Function} callback 回调函数
18
- * @param {Symbol | string} key
19
- */
20
- addResize(callback, key) {
21
- if (!callback) return;
22
- if (!key) {
23
- key = Symbol(key);
24
- }
25
- this.resizeMap[key] = callback;
26
- addResizeListener();
27
- return key;
28
- },
29
- /**
30
- * @function removeResize 删除重置属性
31
- * @param {Symbol} key
32
- */
33
- removeResize(key) {
34
- if (key) {
35
- delete this.resizeMap[key];
36
- }
37
- },
38
- // 清除所有resize事件
39
- clearResize() {
40
- this.resizeMap = {};
41
- removeResizeListener();
42
- }
43
- }
44
- });
6
+ let resizeMap = {};
45
7
  const resizeConfig = {
46
8
  init: false,
47
9
  animationId: void 0,
@@ -50,7 +12,6 @@ const resizeConfig = {
50
12
  // timeout实例
51
13
  };
52
14
  function onResizeHandler() {
53
- const maintainStore = useMaintainStore();
54
15
  if (resizeConfig.animationId) {
55
16
  resizeConfig.timerList.forEach((timeout) => {
56
17
  timeout && clearTimeout(timeout);
@@ -59,7 +20,7 @@ function onResizeHandler() {
59
20
  }
60
21
  resizeConfig.animationId = window.requestAnimationFrame(() => {
61
22
  try {
62
- let symbolKeys = Object.getOwnPropertySymbols(maintainStore.resizeMap);
23
+ let symbolKeys = Object.getOwnPropertySymbols(resizeMap);
63
24
  symbolKeys = [
64
25
  ...symbolKeys.slice(resizeConfig.resizeIndex),
65
26
  ...symbolKeys
@@ -67,7 +28,7 @@ function onResizeHandler() {
67
28
  symbolKeys.forEach((key, index, list) => {
68
29
  const timeout = setTimeout(() => {
69
30
  resizeConfig.resizeIndex = list.length - 1 == index ? 0 : index;
70
- const fun = maintainStore.resizeMap[key];
31
+ const fun = resizeMap[key];
71
32
  is.isFunction(fun) && fun();
72
33
  }, 1);
73
34
  resizeConfig.timerList.push(timeout);
@@ -87,5 +48,30 @@ function removeResizeListener() {
87
48
  window.removeEventListener("resize", onResizeHandler);
88
49
  resizeConfig.init = false;
89
50
  }
51
+ function useResizeHandler() {
52
+ function addResize(key, callback) {
53
+ if (!callback) return;
54
+ if (!key) {
55
+ key = /* @__PURE__ */ Symbol("resize");
56
+ }
57
+ resizeMap[key] = callback;
58
+ addResizeListener();
59
+ return key;
60
+ }
61
+ function removeResize(key) {
62
+ if (key) {
63
+ delete resizeMap[key];
64
+ }
65
+ }
66
+ function clearResize() {
67
+ resizeMap = {};
68
+ removeResizeListener();
69
+ }
70
+ return {
71
+ addResize,
72
+ removeResize,
73
+ clearResize
74
+ };
75
+ }
90
76
 
91
- exports.useMaintainStore = useMaintainStore;
77
+ exports.useResizeHandler = useResizeHandler;
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+
5
+ const localUserAvatarMapKey = /* @__PURE__ */ Symbol("userAvatarMap");
6
+ const useUserAvatarMap = () => {
7
+ const userAvatarMap = vue.inject(localUserAvatarMapKey, vue.ref(/* @__PURE__ */ new Map()));
8
+ return { userAvatarMap };
9
+ };
10
+
11
+ exports.localUserAvatarMapKey = localUserAvatarMapKey;
12
+ exports.useUserAvatarMap = useUserAvatarMap;
package/lib/index.js CHANGED
@@ -3,17 +3,20 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var makeInstaller = require('./make-installer.js');
6
- var index$a = require('./store/index.js');
7
6
  var index = require('./components/appButton/index.js');
8
7
  var index$1 = require('./components/appConfigProvider/index.js');
9
8
  var index$2 = require('./components/appConfirmDialog/index.js');
10
9
  var index$3 = require('./components/appDatePicker/index.js');
11
10
  var index$4 = require('./components/appForm/index.js');
12
11
  var index$5 = require('./components/appIcon/index.js');
13
- var index$6 = require('./components/appOrgCascader/index.js');
14
- var index$7 = require('./components/appSearch/index.js');
15
- var index$8 = require('./components/appTable/index.js');
16
- var index$9 = require('./components/appTooltip/index.js');
12
+ var index$6 = require('./components/appIconBox/index.js');
13
+ var index$7 = require('./components/appNoPermissions/index.js');
14
+ var index$8 = require('./components/appNoPermissionsMap/index.js');
15
+ var index$9 = require('./components/appOrgCascader/index.js');
16
+ var index$a = require('./components/appSearch/index.js');
17
+ var index$b = require('./components/appTable/index.js');
18
+ var index$c = require('./components/appTooltip/index.js');
19
+ var index$d = require('./components/appUserAvatar/index.js');
17
20
  var crypto = require('./utils/crypto.js');
18
21
  var useLocale = require('./hooks/useLocale.js');
19
22
  var bus = require('./utils/bus.js');
@@ -22,29 +25,32 @@ var useGlobalConfig = require('./hooks/useGlobalConfig.js');
22
25
  var useApi = require('./hooks/useApi.js');
23
26
  var date = require('./utils/date.js');
24
27
  var is = require('./utils/is.js');
28
+ var useUserAvatarMap = require('./hooks/useUserAvatarMap.js');
25
29
  var adaptive = require('./utils/adaptive.js');
26
30
  var useAppForm = require('./components/appForm/js/useAppForm.js');
27
31
  var useAppSearch = require('./components/appSearch/js/useAppSearch.js');
28
32
  var useAppTable = require('./components/appTable/js/useAppTable.js');
29
- var maintain = require('./store/maintain.js');
30
33
  var useMixins = require('./hooks/useMixins.js');
34
+ var useResizeHandler = require('./hooks/useResizeHandler.js');
31
35
 
32
36
  import "./style/index.scss";
33
37
 
34
38
 
35
39
  exports.default = makeInstaller.default;
36
- exports.store = index$a.store;
37
40
  exports.AppButton = index.AppButton;
38
41
  exports.AppConfigProvider = index$1.AppConfigProvider;
39
42
  exports.AppConfirmDialog = index$2.AppConfirmDialog;
40
43
  exports.AppDatePicker = index$3.AppDatePicker;
41
44
  exports.AppForm = index$4.AppForm;
42
45
  exports.AppIcon = index$5.AppIcon;
43
- exports.appIconBox = index$5.appIconBox;
44
- exports.AppOrgCascader = index$6.AppOrgCascader;
45
- exports.AppSearch = index$7.AppSearch;
46
- exports.AppTable = index$8.AppTable;
47
- exports.AppTooltip = index$9.AppTooltip;
46
+ exports.AppIconBox = index$6.AppIconBox;
47
+ exports.AppNoPermissions = index$7.AppNoPermissions;
48
+ exports.AppNoPermissionsMap = index$8.AppNoPermissionsMap;
49
+ exports.AppOrgCascader = index$9.AppOrgCascader;
50
+ exports.AppSearch = index$a.AppSearch;
51
+ exports.AppTable = index$b.AppTable;
52
+ exports.AppTooltip = index$c.AppTooltip;
53
+ exports.AppUserAvatar = index$d.AppUserAvatar;
48
54
  exports.base64Decrypt = crypto.base64Decrypt;
49
55
  exports.encryptToBase64 = crypto.encryptToBase64;
50
56
  exports.generateRandomCode = crypto.generateRandomCode;
@@ -79,6 +85,8 @@ exports.isString = is.isString;
79
85
  exports.isSymbol = is.isSymbol;
80
86
  exports.isUndefined = is.isUndefined;
81
87
  exports.isVueProxy = is.isVueProxy;
88
+ exports.localUserAvatarMapKey = useUserAvatarMap.localUserAvatarMapKey;
89
+ exports.useUserAvatarMap = useUserAvatarMap.useUserAvatarMap;
82
90
  exports.parseRem = adaptive.parseRem;
83
91
  exports.pxTorem = adaptive.pxTorem;
84
92
  exports.remToPx = adaptive.remToPx;
@@ -86,5 +94,5 @@ exports.vwToPx = adaptive.vwToPx;
86
94
  exports.useAppForm = useAppForm.useAppForm;
87
95
  exports.useAppSearch = useAppSearch.useAppSearch;
88
96
  exports.useAppTable = useAppTable.useAppTable;
89
- exports.useMaintainStore = maintain.useMaintainStore;
90
97
  exports.useMixins = useMixins.useMixins;
98
+ exports.useResizeHandler = useResizeHandler.useResizeHandler;
package/lib/locale/en.js CHANGED
@@ -35,6 +35,9 @@ var en = {
35
35
  confirm: "Confirm",
36
36
  loading: "Loading"
37
37
  },
38
+ form: {
39
+ department: "Department"
40
+ },
38
41
  table: {
39
42
  hideFilter: "Hide filter",
40
43
  displayFilter: "Display filter",
@@ -65,6 +68,15 @@ var en = {
65
68
  },
66
69
  cascader: {
67
70
  pleaseSelectDepartment: "Please Select Department"
71
+ },
72
+ userAvatar: {
73
+ userAvatar: "User Avatar"
74
+ },
75
+ permissino: {
76
+ youDoNotHaveSubordinatePermissionsForThisModule: "You Do Not Have Subordinate Permissions For This Module",
77
+ pleaseContactTheAdministrator: "Please Contact The Administrator",
78
+ youDoNotHaveAMapConfigurationForThisModule: "You Do Not Have A Map Configuration For This Module",
79
+ pleaseContactTheAdministratorToGoToTheSettingsCenterForConfiguration: "Please Contact The Administrator To Go To The Settings Center For Configuration"
68
80
  }
69
81
  };
70
82
 
@@ -35,6 +35,9 @@ var Chinese = {
35
35
  confirm: "\u786E\u8BA4",
36
36
  loading: "\u52A0\u8F7D\u4E2D"
37
37
  },
38
+ form: {
39
+ department: "\u6240\u5C5E\u90E8\u95E8"
40
+ },
38
41
  table: {
39
42
  hideFilter: "\u9690\u85CF\u7B5B\u9009\u5668",
40
43
  displayFilter: "\u663E\u793A\u7B5B\u9009\u5668",
@@ -64,7 +67,16 @@ var Chinese = {
64
67
  dangerousOperation: "\u5371\u9669\u64CD\u4F5C"
65
68
  },
66
69
  cascader: {
67
- pleaseSelectDepartment: "\u8BF7\u9009\u62E9\u90E8\u95E8"
70
+ pleaseSelectDepartment: "\u8BF7\u9009\u62E9\u6240\u5C5E\u90E8\u95E8"
71
+ },
72
+ userAvatar: {
73
+ userAvatar: "\u7528\u6237\u5934\u50CF"
74
+ },
75
+ permissino: {
76
+ youDoNotHaveSubordinatePermissionsForThisModule: "\u60A8\u6CA1\u6709\u8BE5\u6A21\u5757\u4E0B\u7EA7\u6743\u9650",
77
+ pleaseContactTheAdministrator: "\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458",
78
+ youDoNotHaveAMapConfigurationForThisModule: "\u60A8\u6CA1\u6709\u8BE5\u6A21\u5757\u7684\u5730\u56FE\u914D\u7F6E",
79
+ pleaseContactTheAdministratorToGoToTheSettingsCenterForConfiguration: "\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u524D\u5F80\u8BBE\u7F6E\u4E2D\u5FC3\u8FDB\u884C\u914D\u7F6E"
68
80
  }
69
81
  };
70
82
 
@@ -5,12 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var index = require('./constants/index.js');
6
6
  var index$1 = require('./components/index.js');
7
7
  var version = require('./version.js');
8
- var index$2 = require('./store/index.js');
9
8
  var useGlobalConfig = require('./hooks/useGlobalConfig.js');
10
9
 
11
10
  const makeInstaller = () => {
12
11
  const install = (app, options) => {
13
- var _a, _b;
14
12
  if (app[index.INSTALLED_KEY]) return;
15
13
  app[index.INSTALLED_KEY] = true;
16
14
  Object.values(index$1).forEach((component) => {
@@ -18,9 +16,6 @@ const makeInstaller = () => {
18
16
  app.use(component);
19
17
  });
20
18
  if (options) useGlobalConfig.provideGlobalConfig(options, app, true);
21
- if (!((_b = (_a = app.config) == null ? void 0 : _a.globalProperties) == null ? void 0 : _b.$pinia)) {
22
- app.use(index$2.store);
23
- }
24
19
  };
25
20
  return {
26
21
  version: version.version,
@@ -1,6 +1,4 @@
1
1
  @use './element/index.scss';
2
- @use './theme.scss';
3
- // @use './style/tailwind.scss';
4
2
 
5
3
  * {
6
4
  margin: 0;
package/lib/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const version = "0.1.1";
3
+ const version = "0.1.3";
4
4
 
5
5
  exports.version = version;