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
@@ -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
+ }
@@ -2,12 +2,14 @@ export { AppOrgCascader } from './appOrgCascader/index.mjs';
2
2
  export { AppConfirmDialog } from './appConfirmDialog/index.mjs';
3
3
  export { AppDatePicker } from './appDatePicker/index.mjs';
4
4
  export { AppForm } from './appForm/index.mjs';
5
- export { AppIcon, appIconBox } from './appIcon/index.mjs';
5
+ export { AppIcon } from './appIcon/index.mjs';
6
+ export { AppIconBox } from './appIconBox/index.mjs';
6
7
  export { AppSearch } from './appSearch/index.mjs';
7
8
  export { AppTable } from './appTable/index.mjs';
8
9
  export { AppTooltip } from './appTooltip/index.mjs';
9
10
  export { AppConfigProvider } from './appConfigProvider/index.mjs';
10
11
  export { AppButton } from './appButton/index.mjs';
12
+ export { AppUserAvatar } from './appUserAvatar/index.mjs';
11
13
  export { useAppForm } from './appForm/js/useAppForm.mjs';
12
14
  export { useAppSearch } from './appSearch/js/useAppSearch.mjs';
13
15
  export { useAppTable } from './appTable/js/useAppTable.mjs';
@@ -2,3 +2,5 @@ export { defaultAxios, localApiKey, useApi } from './useApi.mjs';
2
2
  export { buildLocaleContext, buildTranslator, getLanguage, localeContextKey, translate, useLocale } from './useLocale.mjs';
3
3
  export { configProviderContextKey, provideGlobalConfig, useGlobalConfig } from './useGlobalConfig.mjs';
4
4
  export { useMixins } from './useMixins.mjs';
5
+ export { localUserAvatarMapKey, useUserAvatarMap } from './useUserAvatarMap.mjs';
6
+ export { useResizeHandler } from './useResizeHandler.mjs';
@@ -8,6 +8,15 @@ const defaultAxios = ref(
8
8
  timeout: 6e4
9
9
  })
10
10
  );
11
+ defaultAxios.value.interceptors.response.use(
12
+ (response) => {
13
+ const data = response == null ? void 0 : response.data;
14
+ return Promise.resolve(data);
15
+ },
16
+ (error) => {
17
+ return Promise.reject(error);
18
+ }
19
+ );
11
20
  const useApi = () => {
12
21
  const api = inject(localApiKey, defaultAxios);
13
22
  return { api: unref(api) ? api : defaultAxios };
@@ -2,6 +2,7 @@ import { ref, getCurrentInstance, computed, unref, inject, provide } from 'vue';
2
2
  import * as index from '../locale/index.mjs';
3
3
  import { localeContextKey } from './useLocale.mjs';
4
4
  import { localApiKey } from './useApi.mjs';
5
+ import { localUserAvatarMapKey } from './useUserAvatarMap.mjs';
5
6
  import Chinese from '../locale/zh_CN.mjs';
6
7
 
7
8
  const globalConfig = ref();
@@ -51,6 +52,10 @@ const provideGlobalConfig = (config, app, global = false) => {
51
52
  localApiKey,
52
53
  computed(() => context.value.api)
53
54
  );
55
+ provideFn(
56
+ localUserAvatarMapKey,
57
+ computed(() => context.value.userAvatarMap)
58
+ );
54
59
  if (global || !globalConfig.value) {
55
60
  globalConfig.value = context.value;
56
61
  }
@@ -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
- const MAINTAIN_STORE = "MAINTAIN_STORE";
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(maintainStore.resizeMap);
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 = maintainStore.resizeMap[key];
29
+ const fun = resizeMap[key];
69
30
  isFunction(fun) && fun();
70
31
  }, 1);
71
32
  resizeConfig.timerList.push(timeout);
@@ -85,5 +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 { useMaintainStore };
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,15 +1,16 @@
1
1
  import installer from './make-installer.mjs';
2
- export { store } from './store/index.mjs';
3
2
  export { AppButton } from './components/appButton/index.mjs';
4
3
  export { AppConfigProvider } from './components/appConfigProvider/index.mjs';
5
4
  export { AppConfirmDialog } from './components/appConfirmDialog/index.mjs';
6
5
  export { AppDatePicker } from './components/appDatePicker/index.mjs';
7
6
  export { AppForm } from './components/appForm/index.mjs';
8
- export { AppIcon, appIconBox } from './components/appIcon/index.mjs';
7
+ export { AppIcon } from './components/appIcon/index.mjs';
8
+ export { AppIconBox } from './components/appIconBox/index.mjs';
9
9
  export { AppOrgCascader } from './components/appOrgCascader/index.mjs';
10
10
  export { AppSearch } from './components/appSearch/index.mjs';
11
11
  export { AppTable } from './components/appTable/index.mjs';
12
12
  export { AppTooltip } from './components/appTooltip/index.mjs';
13
+ export { AppUserAvatar } from './components/appUserAvatar/index.mjs';
13
14
  export { base64Decrypt, encryptToBase64, generateRandomCode } from './utils/crypto.mjs';
14
15
  export { buildLocaleContext, buildTranslator, getLanguage, localeContextKey, translate, useLocale } from './hooks/useLocale.mjs';
15
16
  export { bus } from './utils/bus.mjs';
@@ -18,12 +19,13 @@ export { configProviderContextKey, provideGlobalConfig, useGlobalConfig } from '
18
19
  export { defaultAxios, localApiKey, useApi } from './hooks/useApi.mjs';
19
20
  export { getDefaultValueFormatByType } from './utils/date.mjs';
20
21
  export { isArray, isBoolean, isEmpty, isFunction, isNull, isNumber, isObject, isOverflowing, isString, isSymbol, isUndefined, isVueProxy } from './utils/is.mjs';
22
+ export { localUserAvatarMapKey, useUserAvatarMap } from './hooks/useUserAvatarMap.mjs';
21
23
  export { parseRem, pxTorem, remToPx, vwToPx } from './utils/adaptive.mjs';
22
24
  export { useAppForm } from './components/appForm/js/useAppForm.mjs';
23
25
  export { useAppSearch } from './components/appSearch/js/useAppSearch.mjs';
24
26
  export { useAppTable } from './components/appTable/js/useAppTable.mjs';
25
- export { useMaintainStore } from './store/maintain.mjs';
26
27
  export { useMixins } from './hooks/useMixins.mjs';
28
+ export { useResizeHandler } from './hooks/useResizeHandler.mjs';
27
29
 
28
30
  import "./style/index.scss";
29
31
 
package/es/locale/en.mjs CHANGED
@@ -61,6 +61,9 @@ var en = {
61
61
  },
62
62
  cascader: {
63
63
  pleaseSelectDepartment: "Please Select Department"
64
+ },
65
+ userAvatar: {
66
+ userAvatar: "User Avatar"
64
67
  }
65
68
  };
66
69
 
@@ -61,6 +61,9 @@ var Chinese = {
61
61
  },
62
62
  cascader: {
63
63
  pleaseSelectDepartment: "\u8BF7\u9009\u62E9\u90E8\u95E8"
64
+ },
65
+ userAvatar: {
66
+ userAvatar: "\u7528\u6237\u5934\u50CF"
64
67
  }
65
68
  };
66
69
 
@@ -1,12 +1,10 @@
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 { store } from './store/index.mjs';
5
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) => {
@@ -14,9 +12,6 @@ const makeInstaller = () => {
14
12
  app.use(component);
15
13
  });
16
14
  if (options) provideGlobalConfig(options, app, true);
17
- if (!((_b = (_a = app.config) == null ? void 0 : _a.globalProperties) == null ? void 0 : _b.$pinia)) {
18
- app.use(store);
19
- }
20
15
  };
21
16
  return {
22
17
  version,
package/es/version.mjs CHANGED
@@ -1,3 +1,3 @@
1
- const version = "0.1.1";
1
+ const version = "0.1.2";
2
2
 
3
3
  export { version };
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var vue = require('vue');
6
6
  var elementPlus = require('element-plus');
7
7
  var iconsVue = require('@element-plus/icons-vue');
8
- var appIcon = require('../appIcon/appIcon.vue.js');
8
+ var index = require('../appIcon/index.js');
9
9
 
10
10
  import "./style/appButton.scss";
11
11
 
@@ -84,7 +84,7 @@ const _sfc_main = {
84
84
  },
85
85
  [
86
86
  !__props.loading ? vue.renderSlot(_ctx.$slots, "svg", { key: 0 }, () => [
87
- __props.svgName ? (vue.openBlock(), vue.createBlock(appIcon.default, {
87
+ __props.svgName ? (vue.openBlock(), vue.createBlock(vue.unref(index.AppIcon), {
88
88
  key: 0,
89
89
  "svg-name": __props.svgName,
90
90
  "class-name": "!w-3 !h-3 text-main mr-2"
@@ -33,45 +33,61 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
33
33
  props: {
34
34
  locale: {
35
35
  type: String,
36
+ required: false,
36
37
  default: "zhCn"
37
38
  },
38
39
  api: {
39
- type: Object
40
+ type: [Object, Function],
41
+ required: false
42
+ },
43
+ userAvatarMap: {
44
+ type: Map,
45
+ required: false,
46
+ default: () => /* @__PURE__ */ new Map()
40
47
  },
41
48
  size: {
42
49
  type: String,
50
+ required: false,
43
51
  default: "default"
44
52
  },
45
53
  zIndex: {
46
- type: Number
54
+ type: Number,
55
+ required: false
47
56
  },
48
57
  button: {
49
- type: Object
58
+ type: Object,
59
+ required: false
50
60
  },
51
61
  link: {
52
- type: Object
62
+ type: Object,
63
+ required: false
53
64
  },
54
65
  dialog: {
55
- type: Object
66
+ type: Object,
67
+ required: false
56
68
  },
57
69
  message: {
58
- type: Object
70
+ type: Object,
71
+ required: false
59
72
  },
60
73
  emptyValues: {
61
- type: String
74
+ type: String,
75
+ required: false
62
76
  },
63
77
  valueOnClear: {
64
- type: [String, Number, null]
78
+ type: [String, Number, null],
79
+ required: false
65
80
  },
66
81
  table: {
67
- type: Object
82
+ type: Object,
83
+ required: false
68
84
  }
69
85
  },
70
86
  setup(__props) {
71
87
  const props = __props;
72
88
  const globalConfig = useGlobalConfig.provideGlobalConfig(props);
73
89
  const config = vue.computed(() => {
74
- const { locale, api, ...config2 } = globalConfig.value;
90
+ const { locale, api, userAvatarMap, ...config2 } = globalConfig.value;
75
91
  return {
76
92
  locale: ElementLocale__namespace[locale] || ElementLocale__namespace["zhCn"],
77
93
  ...config2
@@ -31,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
31
31
  },
32
32
  showClose: {
33
33
  type: Boolean,
34
- default: true
34
+ default: false
35
35
  },
36
36
  showCancel: {
37
37
  type: Boolean,
@@ -55,19 +55,21 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
55
55
  submitText: {
56
56
  type: String
57
57
  },
58
- onCancel: {
59
- type: Function
58
+ iconColor: {
59
+ type: String,
60
+ default: "rgb(var(--hy-main))"
60
61
  },
61
- onSubmit: {
62
- type: Function
63
- }
62
+ onClose: Function,
63
+ onCancel: Function,
64
+ onSubmit: Function
64
65
  }, {
65
66
  "modelValue": { type: Boolean, default: false },
66
67
  "modelModifiers": {}
67
68
  }),
68
- emits: /* @__PURE__ */ vue.mergeModels(["on-submit", "on-close"], ["update:modelValue"]),
69
+ emits: /* @__PURE__ */ vue.mergeModels(["hide"], ["update:modelValue"]),
69
70
  setup(__props, { expose: __expose, emit: __emit }) {
70
71
  const props = __props;
72
+ const emits = __emit;
71
73
  const { t } = useLocale.useLocale();
72
74
  const visible = vue.useModel(__props, "modelValue");
73
75
  const loading = vue.ref(false);
@@ -85,8 +87,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
85
87
  }
86
88
  visible.value = false;
87
89
  loading.value = false;
90
+ emits("hide");
88
91
  }
89
- async function onCloseHandler() {
92
+ async function onCancelHandler() {
90
93
  if (loading.value) return;
91
94
  loading.value = true;
92
95
  if (props.onCancel) {
@@ -100,6 +103,23 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
100
103
  }
101
104
  visible.value = false;
102
105
  loading.value = false;
106
+ emits("hide");
107
+ }
108
+ async function onCloseHandler() {
109
+ if (loading.value) return;
110
+ loading.value = true;
111
+ if (props.onClose) {
112
+ try {
113
+ await props.onClose();
114
+ } catch (err) {
115
+ console.error(err);
116
+ loading.value = false;
117
+ return;
118
+ }
119
+ }
120
+ visible.value = false;
121
+ loading.value = false;
122
+ emits("hide");
103
123
  }
104
124
  __expose({
105
125
  show: () => {
@@ -121,7 +141,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
121
141
  top: "15%"
122
142
  }, _ctx.$attrs), {
123
143
  header: vue.withCtx(() => [
124
- vue.createElementVNode("div", { class: "h-[38px] flex items-center justify-between border-b border-border pl-4 pr-[10px]" }, [
144
+ vue.createElementVNode("div", {
145
+ class: "h-[38px] flex items-center justify-between border-b border-border pl-4 pr-[10px]",
146
+ onClick: vue.withModifiers(() => {
147
+ }, ["stop"])
148
+ }, [
125
149
  vue.createElementVNode(
126
150
  "span",
127
151
  { class: "text-sm text-main font-bold" },
@@ -151,44 +175,44 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
151
175
  2
152
176
  /* CLASS */
153
177
  )) : vue.createCommentVNode("v-if", true)
154
- ])
178
+ ], 8, ["onClick"])
155
179
  ]),
156
180
  default: vue.withCtx(() => [
157
- vue.createElementVNode("div", { class: "h-[253px] flex flex-col items-center justify-between pt-[37px] pb-[27px]" }, [
181
+ vue.createElementVNode("div", { class: "flex flex-col items-center justify-between pt-[37px] pb-[27px]" }, [
158
182
  vue.createElementVNode("div", { class: "flex flex-col items-center text-main" }, [
159
183
  vue.createVNode(vue.unref(elementPlus.ElIcon), {
160
184
  size: "40",
161
- color: "rgb(var(--hy-main))"
185
+ color: __props.iconColor
162
186
  }, {
163
187
  default: vue.withCtx(() => [
164
188
  vue.createVNode(vue.unref(iconsVue.Warning))
165
189
  ]),
166
190
  _: 1
167
191
  /* STABLE */
168
- }),
192
+ }, 8, ["color"]),
169
193
  vue.createElementVNode(
170
194
  "div",
171
195
  {
172
- class: vue.normalizeClass(["text-base font-bold mt-[10px] mb-[26px]", __props.titleClass])
196
+ class: vue.normalizeClass(["text-base text-center font-bold mt-[10px] mb-[26px]", __props.titleClass])
173
197
  },
174
198
  vue.toDisplayString(__props.title),
175
199
  3
176
200
  /* TEXT, CLASS */
177
201
  ),
178
202
  vue.createElementVNode("div", {
179
- class: "max-w-[300px] text-smword-break",
203
+ class: "max-w-[300px] text-smword-break text-center break-all",
180
204
  innerHTML: __props.content
181
205
  }, null, 8, ["innerHTML"])
182
206
  ]),
183
207
  __props.showSubmit || __props.showCancel ? (vue.openBlock(), vue.createElementBlock("div", {
184
208
  key: 0,
185
- class: "mt-3"
209
+ class: "pt-[32px]"
186
210
  }, [
187
211
  __props.showCancel ? (vue.openBlock(), vue.createBlock(vue.unref(index.AppButton), {
188
212
  key: 0,
189
213
  type: __props.cancelType,
190
214
  disabled: loading.value,
191
- onClick: onCloseHandler
215
+ onClick: onCancelHandler
192
216
  }, {
193
217
  default: vue.withCtx(() => [
194
218
  vue.createTextVNode(
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
+ var useApi = require('../../hooks/useApi.js');
6
7
  var index = require('../appConfigProvider/index.js');
7
8
  var appConfirmDialog = require('./appConfirmDialog.vue.js');
8
9
  var useGlobalConfig = require('../../hooks/useGlobalConfig.js');
@@ -12,22 +13,25 @@ function appConfirmMethod(config) {
12
13
  let container = document.createDocumentFragment();
13
14
  const currentConfig = {
14
15
  ...config,
15
- onClose: () => {
16
- if (config.onClose) {
17
- config.onClose();
18
- }
16
+ onHide: () => {
19
17
  destroy();
20
18
  }
21
19
  };
22
20
  let confirmDialogInstance = null;
23
21
  function render(props) {
24
22
  const globalConfig = useGlobalConfig.useGlobalConfig();
23
+ const {
24
+ locale = "zhCn",
25
+ api = useApi.defaultAxios,
26
+ ...args
27
+ } = vue.unref(globalConfig) || {};
25
28
  const vm = vue.createVNode(appConfirmDialog.default, props);
26
29
  const configProvider = vue.createVNode(
27
30
  index.AppConfigProvider,
28
31
  {
29
- locale: vue.unref(globalConfig).locale,
30
- api: vue.unref(globalConfig).api
32
+ locale,
33
+ api,
34
+ ...args
31
35
  },
32
36
  () => [vm]
33
37
  );
@@ -52,10 +56,10 @@ function appConfirmMethod(config) {
52
56
  appConfirmDialog.default.tip = (props) => {
53
57
  const { t } = useLocale.useLocale();
54
58
  return appConfirmMethod({
55
- showCancel: false,
56
59
  dialogTitle: t("confirmDialog.prompt"),
57
60
  title: t("confirmDialog.prompt"),
58
61
  content: t("confirmDialog.content"),
62
+ showCancel: false,
59
63
  ...props
60
64
  });
61
65
  };
@@ -75,6 +79,7 @@ appConfirmDialog.default.warning = (props) => {
75
79
  title: t("confirmDialog.prompt"),
76
80
  titleClass: "text-warning",
77
81
  content: t("confirmDialog.content"),
82
+ iconColor: "rgb(var(--hy-warning))",
78
83
  ...props
79
84
  });
80
85
  };
@@ -82,10 +87,11 @@ appConfirmDialog.default.danger = (props) => {
82
87
  const { t } = useLocale.useLocale();
83
88
  return appConfirmMethod({
84
89
  dialogTitle: t("confirmDialog.dangerousOperation"),
85
- titleClass: "text-danger-2",
90
+ titleClass: "text-danger",
86
91
  title: t("confirmDialog.prompt"),
87
92
  content: t("confirmDialog.content"),
88
93
  submitType: "danger",
94
+ iconColor: "rgb(var(--hy-danger))",
89
95
  ...props
90
96
  });
91
97
  };
@@ -3,12 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var appIcon = require('./appIcon.vue.js');
6
- var appIconBox$1 = require('./appIconBox.vue.js');
7
6
  var handler = require('../../utils/handler.js');
8
7
 
9
8
  const AppIcon = handler.withInstall(appIcon.default);
10
- const appIconBox = handler.withInstall(appIconBox$1.default);
11
9
 
12
10
  exports.AppIcon = AppIcon;
13
- exports.appIconBox = appIconBox;
14
11
  exports.default = AppIcon;
@@ -4,12 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
6
  var elementPlus = require('element-plus');
7
- var appIcon = require('./appIcon.vue.js');
7
+ var index = require('../appIcon/index.js');
8
8
 
9
9
  import "./style/appIconBox.scss";
10
10
 
11
11
  const __default__ = vue.defineComponent({
12
- name: "appIconBox"
12
+ name: "AppIconBox"
13
13
  });
14
14
  const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
15
15
  props: {
@@ -73,7 +73,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
73
73
  style: vue.normalizeStyle(style.value)
74
74
  },
75
75
  [
76
- vue.createVNode(appIcon.default, {
76
+ vue.createVNode(vue.unref(index.AppIcon), {
77
77
  prefix: __props.prefix,
78
78
  "svg-name": __props.svgName,
79
79
  style: { width: "100%", height: "100%" }
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var appIconBox = require('./appIconBox.vue.js');
6
+ var handler = require('../../utils/handler.js');
7
+
8
+ const AppIconBox = handler.withInstall(appIconBox.default);
9
+
10
+ exports.AppIconBox = AppIconBox;
11
+ exports.default = AppIconBox;