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
package/dist/tailwind.css CHANGED
@@ -680,6 +680,10 @@ video {
680
680
  margin-top: 10px;
681
681
  }
682
682
 
683
+ .mt-\[12px\] {
684
+ margin-top: 12px;
685
+ }
686
+
683
687
  .box-border {
684
688
  box-sizing: border-box;
685
689
  }
@@ -712,12 +716,12 @@ video {
712
716
  height: 0.75rem !important;
713
717
  }
714
718
 
715
- .h-0 {
716
- height: 0px;
719
+ .\!h-\[46px\] {
720
+ height: 46px !important;
717
721
  }
718
722
 
719
- .h-\[253px\] {
720
- height: 253px;
723
+ .h-0 {
724
+ height: 0px;
721
725
  }
722
726
 
723
727
  .h-\[364px\] {
@@ -752,6 +756,10 @@ video {
752
756
  width: 0.75rem !important;
753
757
  }
754
758
 
759
+ .\!w-\[46px\] {
760
+ width: 46px !important;
761
+ }
762
+
755
763
  .w-0 {
756
764
  width: 0px;
757
765
  }
@@ -760,8 +768,8 @@ video {
760
768
  width: 1.25rem;
761
769
  }
762
770
 
763
- .w-\[124px\] {
764
- width: 124px;
771
+ .w-\[160px\] {
772
+ width: 160px;
765
773
  }
766
774
 
767
775
  .w-\[200px\] {
@@ -953,11 +961,25 @@ video {
953
961
  background-color: rgb(var(--hy-background), var(--tw-bg-opacity, 1)) !important;
954
962
  }
955
963
 
964
+ .bg-\[rgba\(var\(--hy-theme\)\2c 0\.2\)\] {
965
+ background-color: rgba(var(--hy-theme),0.2);
966
+ }
967
+
956
968
  .bg-background-2 {
957
969
  --tw-bg-opacity: 1;
958
970
  background-color: rgb(var(--hy-background-2), var(--tw-bg-opacity, 1));
959
971
  }
960
972
 
973
+ .bg-info {
974
+ --tw-bg-opacity: 1;
975
+ background-color: rgb(var(--hy-info), var(--tw-bg-opacity, 1));
976
+ }
977
+
978
+ .bg-success {
979
+ --tw-bg-opacity: 1;
980
+ background-color: rgb(var(--hy-success), var(--tw-bg-opacity, 1));
981
+ }
982
+
961
983
  .bg-success\/50 {
962
984
  background-color: rgb(var(--hy-success), 0.5);
963
985
  }
@@ -1064,6 +1086,10 @@ video {
1064
1086
  padding-top: 11px;
1065
1087
  }
1066
1088
 
1089
+ .pt-\[32px\] {
1090
+ padding-top: 32px;
1091
+ }
1092
+
1067
1093
  .pt-\[37px\] {
1068
1094
  padding-top: 37px;
1069
1095
  }
@@ -1072,6 +1098,10 @@ video {
1072
1098
  padding-top: 5px;
1073
1099
  }
1074
1100
 
1101
+ .text-center {
1102
+ text-align: center;
1103
+ }
1104
+
1075
1105
  .text-base {
1076
1106
  font-size: 1rem;
1077
1107
  line-height: 1.5rem;
@@ -1087,6 +1117,10 @@ video {
1087
1117
  line-height: 1rem;
1088
1118
  }
1089
1119
 
1120
+ .font-\[600\] {
1121
+ font-weight: 600;
1122
+ }
1123
+
1090
1124
  .font-bold {
1091
1125
  font-weight: 700;
1092
1126
  }
@@ -1108,6 +1142,11 @@ video {
1108
1142
  color: rgb(var(--hy-auxiliary), var(--tw-text-opacity, 1));
1109
1143
  }
1110
1144
 
1145
+ .text-danger {
1146
+ --tw-text-opacity: 1;
1147
+ color: rgb(var(--hy-danger), var(--tw-text-opacity, 1));
1148
+ }
1149
+
1111
1150
  .text-danger-2 {
1112
1151
  --tw-text-opacity: 1;
1113
1152
  color: rgb(var(--hy-danger-2), var(--tw-text-opacity, 1));
@@ -1133,6 +1172,17 @@ video {
1133
1172
  color: rgb(var(--hy-warning), var(--tw-text-opacity, 1));
1134
1173
  }
1135
1174
 
1175
+ .shadow-\[0_0_4px_0\] {
1176
+ --tw-shadow: 0 0 4px 0;
1177
+ --tw-shadow-colored: 0 0 4px 0 var(--tw-shadow-color);
1178
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
1179
+ }
1180
+
1181
+ .shadow-success {
1182
+ --tw-shadow-color: rgb(var(--hy-success), 1);
1183
+ --tw-shadow: var(--tw-shadow-colored);
1184
+ }
1185
+
1136
1186
  .outline {
1137
1187
  outline-style: solid;
1138
1188
  }
@@ -1,7 +1,7 @@
1
1
  import { openBlock, createElementBlock, normalizeClass, createCommentVNode, createElementVNode, renderSlot, createBlock, unref, withCtx, createVNode, Fragment } from 'vue';
2
2
  import { ElIcon } from 'element-plus';
3
3
  import { Loading, ArrowDown } from '@element-plus/icons-vue';
4
- import _sfc_main$1 from '../appIcon/appIcon.vue.mjs';
4
+ import { AppIcon } from '../appIcon/index.mjs';
5
5
 
6
6
  import "./style/appButton.scss";
7
7
 
@@ -38,10 +38,10 @@ const _sfc_main = {
38
38
  setup(__props, { emit: __emit }) {
39
39
  const props = __props;
40
40
  const typeObj = {
41
- default: "button_default",
42
- primary: "button_function",
43
- success: "button_addTo",
44
- danger: "button_delete"
41
+ default: "hy-button_default",
42
+ primary: "hy-button_function",
43
+ success: "hy-button_addTo",
44
+ danger: "hy-button_delete"
45
45
  };
46
46
  const emit = __emit;
47
47
  const handleClick = (event) => {
@@ -80,7 +80,7 @@ const _sfc_main = {
80
80
  },
81
81
  [
82
82
  !__props.loading ? renderSlot(_ctx.$slots, "svg", { key: 0 }, () => [
83
- __props.svgName ? (openBlock(), createBlock(_sfc_main$1, {
83
+ __props.svgName ? (openBlock(), createBlock(unref(AppIcon), {
84
84
  key: 0,
85
85
  "svg-name": __props.svgName,
86
86
  "class-name": "!w-3 !h-3 text-main mr-2"
@@ -32,7 +32,7 @@
32
32
  }
33
33
  }
34
34
 
35
- .button_default {
35
+ .hy-button_default {
36
36
  background: rgba(94, 157, 180, 0.32);
37
37
 
38
38
  .hy-button__border {
@@ -96,7 +96,7 @@
96
96
  }
97
97
  }
98
98
 
99
- .button_function {
99
+ .hy-button_function {
100
100
  background: rgba(45, 242, 255, 0.32);
101
101
 
102
102
  .hy-button__border {
@@ -160,7 +160,7 @@
160
160
  }
161
161
  }
162
162
 
163
- .button_addTo {
163
+ .hy-button_addTo {
164
164
  background: rgba(44, 232, 152, 0.32);
165
165
 
166
166
  .hy-button__border {
@@ -224,7 +224,7 @@
224
224
  }
225
225
  }
226
226
 
227
- .button_delete {
227
+ .hy-button_delete {
228
228
  background: rgba(255, 77, 77, 0.32);
229
229
 
230
230
  .hy-button__border {
@@ -10,45 +10,61 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
10
10
  props: {
11
11
  locale: {
12
12
  type: String,
13
+ required: false,
13
14
  default: "zhCn"
14
15
  },
15
16
  api: {
16
- type: Object
17
+ type: [Object, Function],
18
+ required: false
19
+ },
20
+ userAvatarMap: {
21
+ type: Map,
22
+ required: false,
23
+ default: () => /* @__PURE__ */ new Map()
17
24
  },
18
25
  size: {
19
26
  type: String,
27
+ required: false,
20
28
  default: "default"
21
29
  },
22
30
  zIndex: {
23
- type: Number
31
+ type: Number,
32
+ required: false
24
33
  },
25
34
  button: {
26
- type: Object
35
+ type: Object,
36
+ required: false
27
37
  },
28
38
  link: {
29
- type: Object
39
+ type: Object,
40
+ required: false
30
41
  },
31
42
  dialog: {
32
- type: Object
43
+ type: Object,
44
+ required: false
33
45
  },
34
46
  message: {
35
- type: Object
47
+ type: Object,
48
+ required: false
36
49
  },
37
50
  emptyValues: {
38
- type: String
51
+ type: String,
52
+ required: false
39
53
  },
40
54
  valueOnClear: {
41
- type: [String, Number, null]
55
+ type: [String, Number, null],
56
+ required: false
42
57
  },
43
58
  table: {
44
- type: Object
59
+ type: Object,
60
+ required: false
45
61
  }
46
62
  },
47
63
  setup(__props) {
48
64
  const props = __props;
49
65
  const globalConfig = provideGlobalConfig(props);
50
66
  const config = computed(() => {
51
- const { locale, api, ...config2 } = globalConfig.value;
67
+ const { locale, api, userAvatarMap, ...config2 } = globalConfig.value;
52
68
  return {
53
69
  locale: ElementLocale[locale] || ElementLocale["zhCn"],
54
70
  ...config2
@@ -1,4 +1,4 @@
1
- import { defineComponent, useModel, ref, openBlock, createBlock, unref, mergeProps, withCtx, createElementVNode, createVNode, normalizeClass, toDisplayString, createElementBlock, createTextVNode, createCommentVNode, mergeModels } from 'vue';
1
+ import { defineComponent, useModel, ref, openBlock, createBlock, unref, mergeProps, withCtx, createElementVNode, createVNode, normalizeClass, toDisplayString, createElementBlock, createTextVNode, createCommentVNode, withModifiers, mergeModels } from 'vue';
2
2
  import { ElDialog, ElIcon } from 'element-plus';
3
3
  import { Warning, CircleClose } from '@element-plus/icons-vue';
4
4
  import { AppButton } from '../appButton/index.mjs';
@@ -27,7 +27,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
27
27
  },
28
28
  showClose: {
29
29
  type: Boolean,
30
- default: true
30
+ default: false
31
31
  },
32
32
  showCancel: {
33
33
  type: Boolean,
@@ -51,19 +51,21 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
51
51
  submitText: {
52
52
  type: String
53
53
  },
54
- onCancel: {
55
- type: Function
54
+ iconColor: {
55
+ type: String,
56
+ default: "rgb(var(--hy-main))"
56
57
  },
57
- onSubmit: {
58
- type: Function
59
- }
58
+ onClose: Function,
59
+ onCancel: Function,
60
+ onSubmit: Function
60
61
  }, {
61
62
  "modelValue": { type: Boolean, default: false },
62
63
  "modelModifiers": {}
63
64
  }),
64
- emits: /* @__PURE__ */ mergeModels(["on-submit", "on-close"], ["update:modelValue"]),
65
+ emits: /* @__PURE__ */ mergeModels(["hide"], ["update:modelValue"]),
65
66
  setup(__props, { expose: __expose, emit: __emit }) {
66
67
  const props = __props;
68
+ const emits = __emit;
67
69
  const { t } = useLocale();
68
70
  const visible = useModel(__props, "modelValue");
69
71
  const loading = ref(false);
@@ -81,8 +83,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
81
83
  }
82
84
  visible.value = false;
83
85
  loading.value = false;
86
+ emits("hide");
84
87
  }
85
- async function onCloseHandler() {
88
+ async function onCancelHandler() {
86
89
  if (loading.value) return;
87
90
  loading.value = true;
88
91
  if (props.onCancel) {
@@ -96,6 +99,23 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
96
99
  }
97
100
  visible.value = false;
98
101
  loading.value = false;
102
+ emits("hide");
103
+ }
104
+ async function onCloseHandler() {
105
+ if (loading.value) return;
106
+ loading.value = true;
107
+ if (props.onClose) {
108
+ try {
109
+ await props.onClose();
110
+ } catch (err) {
111
+ console.error(err);
112
+ loading.value = false;
113
+ return;
114
+ }
115
+ }
116
+ visible.value = false;
117
+ loading.value = false;
118
+ emits("hide");
99
119
  }
100
120
  __expose({
101
121
  show: () => {
@@ -117,7 +137,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
117
137
  top: "15%"
118
138
  }, _ctx.$attrs), {
119
139
  header: withCtx(() => [
120
- createElementVNode("div", { class: "h-[38px] flex items-center justify-between border-b border-border pl-4 pr-[10px]" }, [
140
+ createElementVNode("div", {
141
+ class: "h-[38px] flex items-center justify-between border-b border-border pl-4 pr-[10px]",
142
+ onClick: withModifiers(() => {
143
+ }, ["stop"])
144
+ }, [
121
145
  createElementVNode(
122
146
  "span",
123
147
  { class: "text-sm text-main font-bold" },
@@ -147,44 +171,44 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
147
171
  2
148
172
  /* CLASS */
149
173
  )) : createCommentVNode("v-if", true)
150
- ])
174
+ ], 8, ["onClick"])
151
175
  ]),
152
176
  default: withCtx(() => [
153
- createElementVNode("div", { class: "h-[253px] flex flex-col items-center justify-between pt-[37px] pb-[27px]" }, [
177
+ createElementVNode("div", { class: "flex flex-col items-center justify-between pt-[37px] pb-[27px]" }, [
154
178
  createElementVNode("div", { class: "flex flex-col items-center text-main" }, [
155
179
  createVNode(unref(ElIcon), {
156
180
  size: "40",
157
- color: "rgb(var(--hy-main))"
181
+ color: __props.iconColor
158
182
  }, {
159
183
  default: withCtx(() => [
160
184
  createVNode(unref(Warning))
161
185
  ]),
162
186
  _: 1
163
187
  /* STABLE */
164
- }),
188
+ }, 8, ["color"]),
165
189
  createElementVNode(
166
190
  "div",
167
191
  {
168
- class: normalizeClass(["text-base font-bold mt-[10px] mb-[26px]", __props.titleClass])
192
+ class: normalizeClass(["text-base text-center font-bold mt-[10px] mb-[26px]", __props.titleClass])
169
193
  },
170
194
  toDisplayString(__props.title),
171
195
  3
172
196
  /* TEXT, CLASS */
173
197
  ),
174
198
  createElementVNode("div", {
175
- class: "max-w-[300px] text-smword-break",
199
+ class: "max-w-[300px] text-smword-break text-center break-all",
176
200
  innerHTML: __props.content
177
201
  }, null, 8, ["innerHTML"])
178
202
  ]),
179
203
  __props.showSubmit || __props.showCancel ? (openBlock(), createElementBlock("div", {
180
204
  key: 0,
181
- class: "mt-3"
205
+ class: "pt-[32px]"
182
206
  }, [
183
207
  __props.showCancel ? (openBlock(), createBlock(unref(AppButton), {
184
208
  key: 0,
185
209
  type: __props.cancelType,
186
210
  disabled: loading.value,
187
- onClick: onCloseHandler
211
+ onClick: onCancelHandler
188
212
  }, {
189
213
  default: withCtx(() => [
190
214
  createTextVNode(
@@ -1,4 +1,5 @@
1
- import { createVNode, unref, render } from 'vue';
1
+ import { unref, createVNode, render } from 'vue';
2
+ import { defaultAxios } from '../../hooks/useApi.mjs';
2
3
  import { AppConfigProvider } from '../appConfigProvider/index.mjs';
3
4
  import _sfc_main from './appConfirmDialog.vue.mjs';
4
5
  import { useGlobalConfig } from '../../hooks/useGlobalConfig.mjs';
@@ -8,22 +9,25 @@ function appConfirmMethod(config) {
8
9
  let container = document.createDocumentFragment();
9
10
  const currentConfig = {
10
11
  ...config,
11
- onClose: () => {
12
- if (config.onClose) {
13
- config.onClose();
14
- }
12
+ onHide: () => {
15
13
  destroy();
16
14
  }
17
15
  };
18
16
  let confirmDialogInstance = null;
19
17
  function render$1(props) {
20
18
  const globalConfig = useGlobalConfig();
19
+ const {
20
+ locale = "zhCn",
21
+ api = defaultAxios,
22
+ ...args
23
+ } = unref(globalConfig) || {};
21
24
  const vm = createVNode(_sfc_main, props);
22
25
  const configProvider = createVNode(
23
26
  AppConfigProvider,
24
27
  {
25
- locale: unref(globalConfig).locale,
26
- api: unref(globalConfig).api
28
+ locale,
29
+ api,
30
+ ...args
27
31
  },
28
32
  () => [vm]
29
33
  );
@@ -48,10 +52,10 @@ function appConfirmMethod(config) {
48
52
  _sfc_main.tip = (props) => {
49
53
  const { t } = useLocale();
50
54
  return appConfirmMethod({
51
- showCancel: false,
52
55
  dialogTitle: t("confirmDialog.prompt"),
53
56
  title: t("confirmDialog.prompt"),
54
57
  content: t("confirmDialog.content"),
58
+ showCancel: false,
55
59
  ...props
56
60
  });
57
61
  };
@@ -71,6 +75,7 @@ _sfc_main.warning = (props) => {
71
75
  title: t("confirmDialog.prompt"),
72
76
  titleClass: "text-warning",
73
77
  content: t("confirmDialog.content"),
78
+ iconColor: "rgb(var(--hy-warning))",
74
79
  ...props
75
80
  });
76
81
  };
@@ -78,10 +83,11 @@ _sfc_main.danger = (props) => {
78
83
  const { t } = useLocale();
79
84
  return appConfirmMethod({
80
85
  dialogTitle: t("confirmDialog.dangerousOperation"),
81
- titleClass: "text-danger-2",
86
+ titleClass: "text-danger",
82
87
  title: t("confirmDialog.prompt"),
83
88
  content: t("confirmDialog.content"),
84
89
  submitType: "danger",
90
+ iconColor: "rgb(var(--hy-danger))",
85
91
  ...props
86
92
  });
87
93
  };
@@ -1,7 +1,8 @@
1
1
  import { defineComponent, useTemplateRef, computed, nextTick, unref, openBlock, createBlock, mergeProps, withCtx, createElementVNode, normalizeStyle, createCommentVNode, createElementBlock, Fragment, renderList, renderSlot, toDisplayString, createVNode, createTextVNode } from 'vue';
2
2
  import { ElForm, ElFormItem, ElPopover, ElInput, ElSelect, ElRadioGroup, ElCheckboxGroup } from 'element-plus';
3
3
  import { AppIcon } from '../appIcon/index.mjs';
4
- import _sfc_main$1 from '../appDatePicker/appDatePicker.vue.mjs';
4
+ import { AppDatePicker } from '../appDatePicker/index.mjs';
5
+ import { AppOrgCascader } from '../appOrgCascader/index.mjs';
5
6
  import { columnShowHandler, columnItemStyle, isRequired, renderText, isDisabled } from './js/index.mjs';
6
7
  import { resetAppFormValue } from './js/useAppForm.mjs';
7
8
  import { useLocale } from '../../hooks/useLocale.mjs';
@@ -247,7 +248,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
247
248
  "daterange",
248
249
  "monthrange",
249
250
  "yearrange"
250
- ].includes((_a = column.attrs) == null ? void 0 : _a.type) && unref(isArray)(column.field) ? (openBlock(), createBlock(_sfc_main$1, mergeProps({
251
+ ].includes((_a = column.attrs) == null ? void 0 : _a.type) && unref(isArray)(column.field) ? (openBlock(), createBlock(unref(AppDatePicker), mergeProps({
251
252
  key: 0,
252
253
  start: __props.model[column.field[0]],
253
254
  "onUpdate:start": ($event) => __props.model[column.field[0]] = $event,
@@ -257,7 +258,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
257
258
  style: { "width": "100%" }
258
259
  }, { ref_for: true }, column.attrs, {
259
260
  disabled: unref(isDisabled)(props, column)
260
- }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (openBlock(), createBlock(_sfc_main$1, mergeProps({
261
+ }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (openBlock(), createBlock(unref(AppDatePicker), mergeProps({
261
262
  key: 1,
262
263
  modelValue: __props.model[column.field],
263
264
  "onUpdate:modelValue": ($event) => __props.model[column.field] = $event,
@@ -295,6 +296,19 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
295
296
  ],
296
297
  2112
297
298
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
299
+ )) : column.type === "org-cascader" ? (openBlock(), createElementBlock(
300
+ Fragment,
301
+ { key: 6 },
302
+ [
303
+ createCommentVNode(" \u90E8\u95E8\u7EA7\u8054\u9009\u62E9\u6846 "),
304
+ createVNode(unref(AppOrgCascader), mergeProps({
305
+ modelValue: __props.model[column.field],
306
+ "onUpdate:modelValue": ($event) => __props.model[column.field] = $event,
307
+ disabled: unref(isDisabled)(props, column)
308
+ }, { ref_for: true }, column.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
309
+ ],
310
+ 2112
311
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
298
312
  )) : createCommentVNode("v-if", true)
299
313
  ],
300
314
  64
@@ -4,6 +4,15 @@ import { getDefaultValueFormatByType } from '../../../utils/date.mjs';
4
4
  import { useLocale } from '../../../hooks/useLocale.mjs';
5
5
  import { isArray } from '../../../utils/is.mjs';
6
6
 
7
+ const genDefaultLabel = (config) => {
8
+ if (config.label) return config.label;
9
+ const { t } = useLocale();
10
+ switch (config.type) {
11
+ // 部门级联选择框
12
+ case "org-cascader":
13
+ return t("form.department");
14
+ }
15
+ };
7
16
  const genPlaceholderHandler = (config) => {
8
17
  const { t } = useLocale();
9
18
  const { type, label, attrs = {} } = config || {};
@@ -11,8 +20,10 @@ const genPlaceholderHandler = (config) => {
11
20
  switch (type) {
12
21
  case "input":
13
22
  placeholder = placeholder || t("hy.pleaseEnterPlaceholder", [label]);
23
+ break;
14
24
  case "select":
15
25
  placeholder = placeholder || t("hy.pleaseSelectPlaceholder", [label]);
26
+ break;
16
27
  case "date-picker":
17
28
  if (["datetimerange", "daterange", "monthrange", "yearrange"].includes(
18
29
  attrs == null ? void 0 : attrs.type
@@ -38,6 +49,7 @@ const genPlaceholderHandler = (config) => {
38
49
  } else {
39
50
  placeholder = placeholder || t("hy.pleaseSelectPlaceholder", [label]);
40
51
  }
52
+ break;
41
53
  default:
42
54
  placeholder = placeholder || label;
43
55
  }
@@ -72,13 +84,15 @@ const rulesHandler = (config) => {
72
84
  return rules;
73
85
  };
74
86
  function appFormItemHandler(column = {}) {
75
- const { placeholder, startPlaceholder, endPlaceholder } = genPlaceholderHandler(column);
87
+ const label = genDefaultLabel(column);
88
+ const { placeholder, startPlaceholder, endPlaceholder } = genPlaceholderHandler({ ...column, label });
76
89
  const attrs = { ...column.attrs || {}, placeholder };
77
90
  column = mergeDeep(
78
91
  { ...column },
79
92
  {
80
93
  key: /* @__PURE__ */ Symbol("appFormItemKey"),
81
94
  field: column.prop,
95
+ label,
82
96
  readonly: column.readonly || false,
83
97
  rules: rulesHandler(column)
84
98
  }
@@ -1,8 +1,6 @@
1
1
  import _sfc_main from './appIcon.vue.mjs';
2
- import _sfc_main$1 from './appIconBox.vue.mjs';
3
2
  import { withInstall } from '../../utils/handler.mjs';
4
3
 
5
4
  const AppIcon = withInstall(_sfc_main);
6
- const appIconBox = withInstall(_sfc_main$1);
7
5
 
8
- export { AppIcon, appIconBox, AppIcon as default };
6
+ export { AppIcon, AppIcon as default };
@@ -1,8 +1,8 @@
1
1
  .app-icon {
2
2
  width: 16px;
3
3
  height: 16px;
4
- vertical-align: -0.15em;
5
- stroke: currentColor;
4
+ vertical-align: -0.1em;
5
+ display: inline-block;
6
6
  overflow: hidden;
7
7
  fill: currentColor;
8
8
  outline: none;
@@ -1,11 +1,11 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, createVNode, unref, createSlots, withCtx, createElementVNode, normalizeStyle, normalizeClass, renderSlot } from 'vue';
2
2
  import { ElTooltip } from 'element-plus';
3
- import _sfc_main$1 from './appIcon.vue.mjs';
3
+ import { AppIcon } from '../appIcon/index.mjs';
4
4
 
5
5
  import "./style/appIconBox.scss";
6
6
 
7
7
  const __default__ = defineComponent({
8
- name: "appIconBox"
8
+ name: "AppIconBox"
9
9
  });
10
10
  const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
11
11
  props: {
@@ -69,7 +69,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
69
69
  style: normalizeStyle(style.value)
70
70
  },
71
71
  [
72
- createVNode(_sfc_main$1, {
72
+ createVNode(unref(AppIcon), {
73
73
  prefix: __props.prefix,
74
74
  "svg-name": __props.svgName,
75
75
  style: { width: "100%", height: "100%" }
@@ -0,0 +1,6 @@
1
+ import _sfc_main from './appIconBox.vue.mjs';
2
+ import { withInstall } from '../../utils/handler.mjs';
3
+
4
+ const AppIconBox = withInstall(_sfc_main);
5
+
6
+ export { AppIconBox, AppIconBox as default };