hy-dispatch-ui-v3 0.1.1 → 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.
Files changed (54) hide show
  1. package/dist/tailwind.css +40 -6
  2. package/es/components/appButton/appButton.vue.mjs +2 -2
  3. package/es/components/appConfigProvider/appConfigProvider.vue.mjs +26 -10
  4. package/es/components/appConfirmDialog/appConfirmDialog.vue.mjs +42 -18
  5. package/es/components/appConfirmDialog/appConfirmMethod.mjs +15 -9
  6. package/es/components/appIcon/index.mjs +1 -3
  7. package/es/components/{appIcon → appIconBox}/appIconBox.vue.mjs +3 -3
  8. package/es/components/appIconBox/index.mjs +6 -0
  9. package/es/components/appSearch/js/index.mjs +5 -5
  10. package/es/components/appTable/appTable.vue.mjs +4 -4
  11. package/es/components/appTable/js/search.mjs +1 -0
  12. package/es/components/appUserAvatar/appUserAvatar.vue.mjs +136 -0
  13. package/es/components/appUserAvatar/index.mjs +6 -0
  14. package/es/components/appUserAvatar/style/appUserAvatar.scss +33 -0
  15. package/es/components/index.mjs +3 -1
  16. package/es/hooks/index.mjs +2 -0
  17. package/es/hooks/useApi.mjs +9 -0
  18. package/es/hooks/useGlobalConfig.mjs +5 -0
  19. package/es/{store/maintain.mjs → hooks/useResizeHandler.mjs} +29 -43
  20. package/es/hooks/useUserAvatarMap.mjs +9 -0
  21. package/es/index.mjs +5 -3
  22. package/es/locale/en.mjs +3 -0
  23. package/es/locale/zh_CN.mjs +3 -0
  24. package/es/make-installer.mjs +0 -5
  25. package/es/version.mjs +1 -1
  26. package/lib/components/appButton/appButton.vue.js +2 -2
  27. package/lib/components/appConfigProvider/appConfigProvider.vue.js +26 -10
  28. package/lib/components/appConfirmDialog/appConfirmDialog.vue.js +41 -17
  29. package/lib/components/appConfirmDialog/appConfirmMethod.js +14 -8
  30. package/lib/components/appIcon/index.js +0 -3
  31. package/lib/components/{appIcon → appIconBox}/appIconBox.vue.js +3 -3
  32. package/lib/components/appIconBox/index.js +11 -0
  33. package/lib/components/appSearch/js/index.js +5 -5
  34. package/lib/components/appTable/appTable.vue.js +4 -4
  35. package/lib/components/appTable/js/search.js +1 -0
  36. package/lib/components/appUserAvatar/appUserAvatar.vue.js +140 -0
  37. package/lib/components/appUserAvatar/index.js +11 -0
  38. package/lib/components/appUserAvatar/style/appUserAvatar.scss +33 -0
  39. package/lib/components/index.js +12 -9
  40. package/lib/hooks/index.js +5 -0
  41. package/lib/hooks/useApi.js +9 -0
  42. package/lib/hooks/useGlobalConfig.js +5 -0
  43. package/lib/{store/maintain.js → hooks/useResizeHandler.js} +29 -43
  44. package/lib/hooks/useUserAvatarMap.js +12 -0
  45. package/lib/index.js +17 -13
  46. package/lib/locale/en.js +3 -0
  47. package/lib/locale/zh_CN.js +3 -0
  48. package/lib/make-installer.js +0 -5
  49. package/lib/version.js +1 -1
  50. package/package.json +11 -2
  51. package/es/store/index.mjs +0 -6
  52. package/lib/store/index.js +0 -9
  53. /package/es/components/{appIcon → appIconBox}/style/appIconBox.scss +0 -0
  54. /package/lib/components/{appIcon → appIconBox}/style/appIconBox.scss +0 -0
@@ -2,8 +2,8 @@
2
2
 
3
3
  var dayjs = require('dayjs');
4
4
  var vue = require('vue');
5
- var maintain = require('../../../store/maintain.js');
6
5
  var is = require('../../../utils/is.js');
6
+ var useResizeHandler = require('../../../hooks/useResizeHandler.js');
7
7
 
8
8
  function columnItemStyle(props, column) {
9
9
  const { width } = column;
@@ -44,10 +44,10 @@ function isEmptyValue(e) {
44
44
  return is.isEmpty(e) || is.isArray(e) && !e.length;
45
45
  }
46
46
  function useShrink(props, templateRef) {
47
+ const { addResize, removeResize } = useResizeHandler.useResizeHandler();
48
+ const resizeExpandKey = /* @__PURE__ */ Symbol("appSearchExpand");
47
49
  const isExpand = vue.ref(false);
48
50
  const containerHeight = vue.ref(getContainerPickUpHeight());
49
- const maintainStore = maintain.useMaintainStore();
50
- const resizeExpandKey = /* @__PURE__ */ Symbol("appSearchExpand");
51
51
  function getContainerPickUpHeight() {
52
52
  switch (props.size) {
53
53
  case "large":
@@ -73,7 +73,7 @@ function useShrink(props, templateRef) {
73
73
  () => {
74
74
  vue.nextTick(() => {
75
75
  shrinkResizeHandler();
76
- maintainStore.addResize(shrinkResizeHandler, resizeExpandKey);
76
+ addResize(resizeExpandKey, shrinkResizeHandler);
77
77
  });
78
78
  },
79
79
  { immediate: true, deep: true }
@@ -84,7 +84,7 @@ function useShrink(props, templateRef) {
84
84
  switchShrink,
85
85
  shrinkResizeHandler,
86
86
  shrinkDestroy() {
87
- maintainStore.removeResize(resizeExpandKey);
87
+ removeResize(resizeExpandKey);
88
88
  }
89
89
  };
90
90
  }
@@ -12,7 +12,7 @@ var columnSelect = require('./cpns/columnSelect.vue.js');
12
12
  var useMixins = require('../../hooks/useMixins.js');
13
13
  var index = require('../appSearch/index.js');
14
14
  var adaptive = require('../../utils/adaptive.js');
15
- var index$2 = require('../appIcon/index.js');
15
+ var index$2 = require('../appIconBox/index.js');
16
16
  var useLocale = require('../../hooks/useLocale.js');
17
17
  var is = require('../../utils/is.js');
18
18
 
@@ -258,7 +258,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
258
258
  key: 2,
259
259
  modelValue: vue.unref(formModel).query,
260
260
  "onUpdate:modelValue": ($event) => vue.unref(formModel).query = $event,
261
- class: "w-[124px]",
261
+ class: "w-[160px]",
262
262
  placeholder: vue.unref(t)("table.searchFor", [vue.unref(searchPlaceholder)]),
263
263
  onKeydown: vue.withKeys(vue.unref(onSearchQueryHandler), ["enter"])
264
264
  }, {
@@ -369,7 +369,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
369
369
  scope,
370
370
  "default"
371
371
  ), (citem, cindex) => {
372
- return vue.openBlock(), vue.createBlock(vue.unref(index$2.appIconBox), {
372
+ return vue.openBlock(), vue.createBlock(vue.unref(index$2.AppIconBox), {
373
373
  key: cindex,
374
374
  "svg-name": citem.svgName,
375
375
  altText: citem.label,
@@ -446,7 +446,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
446
446
  )
447
447
  ]),
448
448
  default: vue.withCtx(() => [
449
- vue.createVNode(vue.unref(index$2.appIconBox), {
449
+ vue.createVNode(vue.unref(index$2.AppIconBox), {
450
450
  key: "more",
451
451
  "svg-name": "system-burst_analysis_select_option",
452
452
  altText: vue.unref(t)("table.moreOperations"),
@@ -61,6 +61,7 @@ function useAppTableSearch(hy) {
61
61
  getData(1);
62
62
  return;
63
63
  }
64
+ console.log("res", res);
64
65
  const data = res.data.content ? res.data.content : res.data || [];
65
66
  if (props.beforeDataHandler) {
66
67
  tableDataSource.value = props.beforeDataHandler(data);
@@ -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,35 @@
1
1
  'use strict';
2
2
 
3
- var index$6 = require('./appOrgCascader/index.js');
3
+ var index$7 = 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$8 = require('./appSearch/index.js');
10
+ var index$9 = require('./appTable/index.js');
11
+ var index$a = require('./appTooltip/index.js');
11
12
  var index$1 = require('./appConfigProvider/index.js');
12
13
  var index = require('./appButton/index.js');
14
+ var index$b = require('./appUserAvatar/index.js');
13
15
  var useAppForm = require('./appForm/js/useAppForm.js');
14
16
  var useAppSearch = require('./appSearch/js/useAppSearch.js');
15
17
  var useAppTable = require('./appTable/js/useAppTable.js');
16
18
 
17
19
 
18
20
 
19
- exports.AppOrgCascader = index$6.AppOrgCascader;
21
+ exports.AppOrgCascader = index$7.AppOrgCascader;
20
22
  exports.AppConfirmDialog = index$2.AppConfirmDialog;
21
23
  exports.AppDatePicker = index$3.AppDatePicker;
22
24
  exports.AppForm = index$4.AppForm;
23
25
  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;
26
+ exports.AppIconBox = index$6.AppIconBox;
27
+ exports.AppSearch = index$8.AppSearch;
28
+ exports.AppTable = index$9.AppTable;
29
+ exports.AppTooltip = index$a.AppTooltip;
28
30
  exports.AppConfigProvider = index$1.AppConfigProvider;
29
31
  exports.AppButton = index.AppButton;
32
+ exports.AppUserAvatar = index$b.AppUserAvatar;
30
33
  exports.useAppForm = useAppForm.useAppForm;
31
34
  exports.useAppSearch = useAppSearch.useAppSearch;
32
35
  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,18 @@
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/appOrgCascader/index.js');
14
+ var index$8 = require('./components/appSearch/index.js');
15
+ var index$9 = require('./components/appTable/index.js');
16
+ var index$a = require('./components/appTooltip/index.js');
17
+ var index$b = require('./components/appUserAvatar/index.js');
17
18
  var crypto = require('./utils/crypto.js');
18
19
  var useLocale = require('./hooks/useLocale.js');
19
20
  var bus = require('./utils/bus.js');
@@ -22,29 +23,30 @@ var useGlobalConfig = require('./hooks/useGlobalConfig.js');
22
23
  var useApi = require('./hooks/useApi.js');
23
24
  var date = require('./utils/date.js');
24
25
  var is = require('./utils/is.js');
26
+ var useUserAvatarMap = require('./hooks/useUserAvatarMap.js');
25
27
  var adaptive = require('./utils/adaptive.js');
26
28
  var useAppForm = require('./components/appForm/js/useAppForm.js');
27
29
  var useAppSearch = require('./components/appSearch/js/useAppSearch.js');
28
30
  var useAppTable = require('./components/appTable/js/useAppTable.js');
29
- var maintain = require('./store/maintain.js');
30
31
  var useMixins = require('./hooks/useMixins.js');
32
+ var useResizeHandler = require('./hooks/useResizeHandler.js');
31
33
 
32
34
  import "./style/index.scss";
33
35
 
34
36
 
35
37
  exports.default = makeInstaller.default;
36
- exports.store = index$a.store;
37
38
  exports.AppButton = index.AppButton;
38
39
  exports.AppConfigProvider = index$1.AppConfigProvider;
39
40
  exports.AppConfirmDialog = index$2.AppConfirmDialog;
40
41
  exports.AppDatePicker = index$3.AppDatePicker;
41
42
  exports.AppForm = index$4.AppForm;
42
43
  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;
44
+ exports.AppIconBox = index$6.AppIconBox;
45
+ exports.AppOrgCascader = index$7.AppOrgCascader;
46
+ exports.AppSearch = index$8.AppSearch;
47
+ exports.AppTable = index$9.AppTable;
48
+ exports.AppTooltip = index$a.AppTooltip;
49
+ exports.AppUserAvatar = index$b.AppUserAvatar;
48
50
  exports.base64Decrypt = crypto.base64Decrypt;
49
51
  exports.encryptToBase64 = crypto.encryptToBase64;
50
52
  exports.generateRandomCode = crypto.generateRandomCode;
@@ -79,6 +81,8 @@ exports.isString = is.isString;
79
81
  exports.isSymbol = is.isSymbol;
80
82
  exports.isUndefined = is.isUndefined;
81
83
  exports.isVueProxy = is.isVueProxy;
84
+ exports.localUserAvatarMapKey = useUserAvatarMap.localUserAvatarMapKey;
85
+ exports.useUserAvatarMap = useUserAvatarMap.useUserAvatarMap;
82
86
  exports.parseRem = adaptive.parseRem;
83
87
  exports.pxTorem = adaptive.pxTorem;
84
88
  exports.remToPx = adaptive.remToPx;
@@ -86,5 +90,5 @@ exports.vwToPx = adaptive.vwToPx;
86
90
  exports.useAppForm = useAppForm.useAppForm;
87
91
  exports.useAppSearch = useAppSearch.useAppSearch;
88
92
  exports.useAppTable = useAppTable.useAppTable;
89
- exports.useMaintainStore = maintain.useMaintainStore;
90
93
  exports.useMixins = useMixins.useMixins;
94
+ exports.useResizeHandler = useResizeHandler.useResizeHandler;
package/lib/locale/en.js CHANGED
@@ -65,6 +65,9 @@ var en = {
65
65
  },
66
66
  cascader: {
67
67
  pleaseSelectDepartment: "Please Select Department"
68
+ },
69
+ userAvatar: {
70
+ userAvatar: "User Avatar"
68
71
  }
69
72
  };
70
73
 
@@ -65,6 +65,9 @@ var Chinese = {
65
65
  },
66
66
  cascader: {
67
67
  pleaseSelectDepartment: "\u8BF7\u9009\u62E9\u90E8\u95E8"
68
+ },
69
+ userAvatar: {
70
+ userAvatar: "\u7528\u6237\u5934\u50CF"
68
71
  }
69
72
  };
70
73
 
@@ -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,
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.2";
4
4
 
5
5
  exports.version = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hy-dispatch-ui-v3",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "scripts": {
@@ -20,7 +20,6 @@
20
20
  "element-plus": "^2.13.3",
21
21
  "lodash-unified": "^1.0.3",
22
22
  "mitt": "^3.0.1",
23
- "pinia": "^3.0.4",
24
23
  "sortablejs": "^1.15.7",
25
24
  "vue": "^3.5.25",
26
25
  "vue-router": "^5.0.3"
@@ -93,6 +92,16 @@
93
92
  "import": "./es/index.mjs",
94
93
  "require": "./lib/index.js"
95
94
  },
95
+ "./es": {
96
+ "import": "./es/index.mjs"
97
+ },
98
+ "./lib": {
99
+ "require": "./lib/index.js"
100
+ },
101
+ "./style": {
102
+ "import": "./es/style/index.scss",
103
+ "require": "./lib/style/index.scss"
104
+ },
96
105
  "./tailwind.css": "./dist/tailwind.css"
97
106
  },
98
107
  "peerDependencies": {
@@ -1,6 +0,0 @@
1
- import { createPinia } from 'pinia';
2
- export { useMaintainStore } from './maintain.mjs';
3
-
4
- const store = createPinia();
5
-
6
- export { store };
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- var pinia = require('pinia');
4
- var maintain = require('./maintain.js');
5
-
6
- const store = pinia.createPinia();
7
-
8
- exports.useMaintainStore = maintain.useMaintainStore;
9
- exports.store = store;