hy-dispatch-ui-v3 0.1.6 → 0.2.0

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 (160) hide show
  1. package/README.md +47 -0
  2. package/dist/tailwind.css +349 -4
  3. package/es/components/appAudioPlayer/appAudioPlayer.vue.mjs +462 -0
  4. package/es/components/appAudioPlayer/index.mjs +6 -0
  5. package/es/components/appAudioPlayer/js/index.mjs +327 -0
  6. package/es/components/appAudioPlayer/style/appAudioPlayer.scss +319 -0
  7. package/es/components/appButton/style/appButton.scss +0 -1
  8. package/es/components/appConfigProvider/appConfigProvider.vue.mjs +22 -1
  9. package/es/components/appCutter/appCutter.vue.mjs +202 -129
  10. package/es/components/appDatePicker/appDatePicker.vue.mjs +1 -1
  11. package/es/components/appForm/appForm.vue.mjs +132 -209
  12. package/es/components/appForm/cpns/appFormItem.vue.mjs +312 -0
  13. package/es/components/appForm/cpns/arrayItem.vue.mjs +305 -0
  14. package/es/components/appForm/cpns/extraItem.vue.mjs +140 -0
  15. package/es/components/appForm/js/index.mjs +46 -24
  16. package/es/components/appForm/js/useAppForm.mjs +30 -6
  17. package/es/components/appForm/style/appForm.scss +53 -0
  18. package/es/components/appIcon/appIcon.vue.mjs +2 -1
  19. package/es/components/appIconBox/style/appIconBox.scss +0 -1
  20. package/es/components/appInput/appInput.vue.mjs +99 -0
  21. package/es/components/appInput/index.mjs +6 -0
  22. package/es/components/appMenu/appMenu.vue.mjs +129 -0
  23. package/es/components/appMenu/index.mjs +6 -0
  24. package/es/components/appMenu/style/appMenu.scss +145 -0
  25. package/es/components/appOrgCascader/appOrgCascader.vue.mjs +14 -10
  26. package/es/components/appSearch/appSearch.vue.mjs +55 -211
  27. package/es/components/appSearch/cpns/appSearchItem.vue.mjs +238 -0
  28. package/es/components/appSearch/js/index.mjs +20 -8
  29. package/es/components/appSearch/js/useAppSearch.mjs +10 -5
  30. package/es/components/appSearch/style/appSearch.scss +10 -0
  31. package/es/components/appTable/appTable.vue.mjs +312 -158
  32. package/es/components/appTable/cpns/columnSelect.vue.mjs +151 -156
  33. package/es/components/appTable/cpns/columnSelectItem.vue2.mjs +104 -110
  34. package/es/components/appTable/cpns/headerItem.vue.mjs +98 -0
  35. package/es/components/appTable/cpns/virtualTable.vue.mjs +560 -0
  36. package/es/components/appTable/js/index.mjs +46 -20
  37. package/es/components/appTable/js/search.mjs +1 -2
  38. package/es/components/appTable/js/useAppTable.mjs +58 -14
  39. package/es/components/appTable/style/appTable.scss +16 -0
  40. package/es/components/appTooltip/appTooltip.vue.mjs +24 -13
  41. package/es/components/appTree/appTree.vue.mjs +304 -0
  42. package/es/components/appTree/index.mjs +6 -0
  43. package/es/components/appTree/js/index.mjs +531 -0
  44. package/es/components/appUserAvatar/appUserAvatar.vue.mjs +9 -8
  45. package/es/components/appUserAvatar/style/appUserAvatar.scss +0 -1
  46. package/es/components/appVideoPlayer/appVideoPlayer.vue.mjs +647 -0
  47. package/es/components/appVideoPlayer/cpns/mediaLoading.vue.mjs +35 -0
  48. package/es/components/appVideoPlayer/index.mjs +6 -0
  49. package/es/components/appVideoPlayer/js/index.mjs +426 -0
  50. package/es/components/appVideoPlayer/style/appVideoPlayer.scss +275 -0
  51. package/es/components/appVideoPlayer/style/mediaLoading.scss +62 -0
  52. package/es/components/index.mjs +5 -0
  53. package/es/hooks/index.mjs +3 -0
  54. package/es/hooks/useApi.mjs +4 -4
  55. package/es/hooks/useAudioPlayerConfig.mjs +12 -0
  56. package/es/hooks/useGlobalConfig.mjs +18 -7
  57. package/es/hooks/useLocale.mjs +3 -11
  58. package/es/hooks/useMixins.mjs +1 -1
  59. package/es/hooks/usePermissionMap.mjs +12 -0
  60. package/es/hooks/useUserAvatarMap.mjs +2 -3
  61. package/es/hooks/useVideoPlayerConfig.mjs +12 -0
  62. package/es/index.mjs +14 -4
  63. package/es/locale/en.mjs +52 -3
  64. package/es/locale/zh_CN.mjs +48 -3
  65. package/es/make-installer.mjs +2 -0
  66. package/es/static/hy-svg-icons.js +462 -0
  67. package/es/static/protocolcheck.js +247 -0
  68. package/es/style/element/element.scss +9 -0
  69. package/es/style/element/index.scss +6 -3
  70. package/es/style/index.scss +11 -0
  71. package/es/style/theme.scss +73 -0
  72. package/es/utils/date.mjs +25 -1
  73. package/es/utils/file.mjs +5 -4
  74. package/es/utils/form.mjs +52 -0
  75. package/es/utils/handler.mjs +22 -2
  76. package/es/utils/index.mjs +6 -4
  77. package/es/utils/is.mjs +23 -2
  78. package/es/utils/loadScript.mjs +33 -0
  79. package/es/version.mjs +1 -1
  80. package/lib/components/appAudioPlayer/appAudioPlayer.vue.js +466 -0
  81. package/lib/components/appAudioPlayer/index.js +11 -0
  82. package/lib/components/appAudioPlayer/js/index.js +329 -0
  83. package/lib/components/appAudioPlayer/style/appAudioPlayer.scss +319 -0
  84. package/lib/components/appButton/style/appButton.scss +0 -1
  85. package/lib/components/appConfigProvider/appConfigProvider.vue.js +22 -1
  86. package/lib/components/appCutter/appCutter.vue.js +201 -128
  87. package/lib/components/appDatePicker/appDatePicker.vue.js +1 -1
  88. package/lib/components/appForm/appForm.vue.js +129 -206
  89. package/lib/components/appForm/cpns/appFormItem.vue.js +316 -0
  90. package/lib/components/appForm/cpns/arrayItem.vue.js +309 -0
  91. package/lib/components/appForm/cpns/extraItem.vue.js +144 -0
  92. package/lib/components/appForm/js/index.js +48 -23
  93. package/lib/components/appForm/js/useAppForm.js +30 -6
  94. package/lib/components/appForm/style/appForm.scss +53 -0
  95. package/lib/components/appIcon/appIcon.vue.js +2 -1
  96. package/lib/components/appIconBox/style/appIconBox.scss +0 -1
  97. package/lib/components/appInput/appInput.vue.js +103 -0
  98. package/lib/components/appInput/index.js +11 -0
  99. package/lib/components/appMenu/appMenu.vue.js +133 -0
  100. package/lib/components/appMenu/index.js +11 -0
  101. package/lib/components/appMenu/style/appMenu.scss +145 -0
  102. package/lib/components/appOrgCascader/appOrgCascader.vue.js +14 -10
  103. package/lib/components/appSearch/appSearch.vue.js +51 -207
  104. package/lib/components/appSearch/cpns/appSearchItem.vue.js +242 -0
  105. package/lib/components/appSearch/js/index.js +20 -7
  106. package/lib/components/appSearch/js/useAppSearch.js +10 -5
  107. package/lib/components/appSearch/style/appSearch.scss +10 -0
  108. package/lib/components/appTable/appTable.vue.js +319 -165
  109. package/lib/components/appTable/cpns/columnSelect.vue.js +151 -156
  110. package/lib/components/appTable/cpns/columnSelectItem.vue2.js +105 -111
  111. package/lib/components/appTable/cpns/headerItem.vue.js +102 -0
  112. package/lib/components/appTable/cpns/virtualTable.vue.js +564 -0
  113. package/lib/components/appTable/js/index.js +47 -19
  114. package/lib/components/appTable/js/search.js +1 -2
  115. package/lib/components/appTable/js/useAppTable.js +57 -13
  116. package/lib/components/appTable/style/appTable.scss +16 -0
  117. package/lib/components/appTooltip/appTooltip.vue.js +23 -12
  118. package/lib/components/appTree/appTree.vue.js +308 -0
  119. package/lib/components/appTree/index.js +11 -0
  120. package/lib/components/appTree/js/index.js +533 -0
  121. package/lib/components/appUserAvatar/appUserAvatar.vue.js +9 -8
  122. package/lib/components/appUserAvatar/style/appUserAvatar.scss +0 -1
  123. package/lib/components/appVideoPlayer/appVideoPlayer.vue.js +651 -0
  124. package/lib/components/appVideoPlayer/cpns/mediaLoading.vue.js +39 -0
  125. package/lib/components/appVideoPlayer/index.js +11 -0
  126. package/lib/components/appVideoPlayer/js/index.js +429 -0
  127. package/lib/components/appVideoPlayer/style/appVideoPlayer.scss +275 -0
  128. package/lib/components/appVideoPlayer/style/mediaLoading.scss +62 -0
  129. package/lib/components/index.js +42 -32
  130. package/lib/hooks/index.js +9 -0
  131. package/lib/hooks/useApi.js +4 -4
  132. package/lib/hooks/useAudioPlayerConfig.js +15 -0
  133. package/lib/hooks/useGlobalConfig.js +18 -7
  134. package/lib/hooks/useLocale.js +3 -11
  135. package/lib/hooks/useMixins.js +1 -1
  136. package/lib/hooks/usePermissionMap.js +15 -0
  137. package/lib/hooks/useUserAvatarMap.js +1 -2
  138. package/lib/hooks/useVideoPlayerConfig.js +15 -0
  139. package/lib/index.js +62 -33
  140. package/lib/locale/en.js +52 -3
  141. package/lib/locale/zh_CN.js +48 -3
  142. package/lib/make-installer.js +2 -0
  143. package/lib/static/hy-svg-icons.js +459 -8
  144. package/lib/static/protocolcheck.js +249 -0
  145. package/lib/style/element/element.scss +9 -0
  146. package/lib/style/element/index.scss +6 -3
  147. package/lib/style/index.scss +11 -0
  148. package/lib/style/theme.scss +73 -0
  149. package/lib/utils/date.js +25 -0
  150. package/lib/utils/file.js +4 -4
  151. package/lib/utils/form.js +57 -0
  152. package/lib/utils/handler.js +22 -1
  153. package/lib/utils/index.js +11 -1
  154. package/lib/utils/is.js +23 -1
  155. package/lib/utils/loadScript.js +37 -0
  156. package/lib/version.js +1 -1
  157. package/package.json +12 -10
  158. package/es/config/index.mjs +0 -1
  159. package/es/static/hy-svg-icons.mjs +0 -11
  160. package/lib/config/index.js +0 -2
@@ -1,10 +1,9 @@
1
- import { defineComponent, useModel, useTemplateRef, ref, computed, resolveComponent, openBlock, createElementBlock, withDirectives, createVNode, unref, withCtx, createElementVNode, renderSlot, normalizeStyle, createBlock, Fragment, createCommentVNode, toDisplayString, withModifiers, vShow, mergeProps, mergeModels } from 'vue';
1
+ import { defineComponent, useModel, useTemplateRef, ref, computed, openBlock, createElementBlock, withDirectives, createVNode, unref, withCtx, createElementVNode, renderSlot, normalizeStyle, createBlock, Fragment, createCommentVNode, toDisplayString, withModifiers, vShow, mergeProps, mergeModels } from 'vue';
2
2
  import { VueCropper } from 'vue-cropper';
3
3
  import { ElUpload, ElImage, ElIcon, ElMessage } from 'element-plus';
4
- import { Delete } from '@element-plus/icons-vue';
4
+ import { User, Delete } from '@element-plus/icons-vue';
5
+ import { blobToDataURL, sizeToTextHandler, fileUpload } from '../../utils/file.mjs';
5
6
  import { AppDialog } from '../appDialog/index.mjs';
6
- import { isFile } from '../../utils/is.mjs';
7
- import { sizeToTextHandler, blobToDataURL, fileUpload } from '../../utils/file.mjs';
8
7
  import { useLocale } from '../../hooks/useLocale.mjs';
9
8
 
10
9
  import "vue-cropper/dist/index.css";
@@ -16,9 +15,10 @@ const __default__ = defineComponent({
16
15
  });
17
16
  const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
18
17
  props: /* @__PURE__ */ mergeModels({
19
- dialogWidth: { type: [String, Number], default: 1e3 },
20
18
  defaultImg: { type: String },
19
+ // 默认展示图片
21
20
  uploadText: {
21
+ // 上传文本
22
22
  type: String,
23
23
  default: () => {
24
24
  const { t } = useLocale();
@@ -26,24 +26,49 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
26
26
  }
27
27
  },
28
28
  showUpload: { type: Boolean, default: true },
29
+ // 是否显示上传模块
29
30
  showText: { type: Boolean, default: true },
31
+ // 是否显示上传提示文本
30
32
  showDelete: { type: Boolean, default: true },
33
+ // 是否显示删除按钮
31
34
  maxSize: { type: Number, default: 1024 * 1024 * 2 },
35
+ // 限制上传文件大小
32
36
  accept: { type: String, default: "image/png,image/jpg,image/jpeg,image/gif" },
37
+ // 限制上传文件类型
33
38
  info: { type: Boolean, default: true },
39
+ // 裁剪框的大小信息
34
40
  outputSize: { type: Number, default: 1 },
41
+ // 裁剪生成图片的质量
35
42
  outputType: { type: String, default: "jpeg" },
43
+ // 裁剪生成图片的格式
36
44
  autoCrop: { type: Boolean, default: true },
45
+ // 是否默认生成截图框
37
46
  autoCropWidth: { type: Number, default: 100 },
47
+ // 默认生成截图框宽度
38
48
  autoCropHeight: { type: Number, default: 100 },
49
+ // 默认生成截图框高度
39
50
  fixedBox: { type: Boolean, default: false },
51
+ // 固定截图框大小 不允许改变
40
52
  fixed: { type: Boolean, default: true },
53
+ // 是否开启截图框宽高固定比例
41
54
  fixedNumber: { type: Array },
55
+ // 截图框的宽高比例
42
56
  full: { type: Boolean, default: true },
57
+ // 是否输出原图比例的截图
43
58
  canMoveBox: { type: Boolean, default: false },
59
+ // 截图框能否拖动
44
60
  original: { type: Boolean, default: false },
61
+ // 上传图片按照原始比例渲染
45
62
  centerBox: { type: Boolean, default: true },
46
- infoTrue: { type: Boolean, default: false }
63
+ // 截图框是否被限制在图片里面
64
+ infoTrue: { type: Boolean, default: false },
65
+ // true 为展示真实输出图片宽高 false 展示看到的截图框宽高
66
+ readonly: { type: Boolean, default: false },
67
+ // 是否只读
68
+ directTransmission: { type: Boolean, default: true },
69
+ // 是否使用直传接口
70
+ onClose: Function,
71
+ onCancel: Function
47
72
  }, {
48
73
  "modelValue": { type: String },
49
74
  "modelModifiers": {}
@@ -92,30 +117,24 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
92
117
  // 上传图片按照原始比例渲染
93
118
  centerBox: props.centerBox,
94
119
  // 截图框是否被限制在图片里面
95
- infoTrue: props.infoTrue
120
+ infoTrue: props.infoTrue,
96
121
  // true 为展示真实输出图片宽高 false 展示看到的截图框宽高
122
+ ...customOptions.value
97
123
  }));
98
- function openFilePicker(param, name = "img.png") {
99
- if (typeof param === "string") {
100
- openCutter(param, name);
101
- return;
102
- }
103
- if (isFile(param)) {
104
- beforeAvatarUpload(file);
105
- return;
106
- }
107
- uploadRef.value.click();
108
- }
109
- async function beforeAvatarUpload(file2) {
110
- const limit = file2.size < props.maxSize;
124
+ const customOptions = ref({});
125
+ let customSubmit = null;
126
+ let customCancel = null;
127
+ let customClose = null;
128
+ async function beforeAvatarUpload(file) {
129
+ const limit = file.size < props.maxSize;
111
130
  if (!limit) {
112
131
  ElMessage.error(
113
132
  t("cutter.uploadPictureLimit", [sizeToTextHandler(props.maxSize)])
114
133
  );
115
134
  return false;
116
135
  }
117
- const result = await blobToDataURL(file2);
118
- openCutter(result, file2.name);
136
+ const result = await blobToDataURL(file);
137
+ openCutter(result, file.name);
119
138
  return false;
120
139
  }
121
140
  function openCutter(src, name) {
@@ -134,16 +153,22 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
134
153
  async function onSubmitHandler() {
135
154
  return new Promise((resolve, reject) => {
136
155
  cropperRef.value.getCropBlob(async (data) => {
137
- var _a, _b;
138
156
  data.name = fileInfo.value.name;
139
- const res = await fileUpload(data).catch((res2) => {
140
- ElMessage.error(res2.msg || res2);
141
- reject();
142
- });
157
+ const res = await fileUpload(data, props.directTransmission).catch(
158
+ (res2) => {
159
+ ElMessage.error(res2.msg || res2);
160
+ reject();
161
+ }
162
+ );
143
163
  if (res.code === 200) {
144
- imgSrc.value = await blobToDataURL(data);
145
- modelValue.value = ((_a = res.data) == null ? void 0 : _a.key) || ((_b = res.data) == null ? void 0 : _b.url) || res.data;
146
- emits("confirm", res);
164
+ const url = await blobToDataURL(data);
165
+ const key = res.data?.key || res.data?.url || res.data;
166
+ imgSrc.value = url;
167
+ modelValue.value = key;
168
+ if (customSubmit) {
169
+ await customSubmit({ url, key });
170
+ }
171
+ emits("confirm", { url, key });
147
172
  resolve();
148
173
  } else {
149
174
  ElMessage.error(res.msg || res);
@@ -152,119 +177,167 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
152
177
  });
153
178
  });
154
179
  }
180
+ async function onCancelHandler() {
181
+ if (customCancel) {
182
+ return await customCancel();
183
+ }
184
+ if (props.onCancel) {
185
+ return await props.onCancel();
186
+ }
187
+ }
188
+ async function onCloseHandler() {
189
+ if (customCancel) {
190
+ return await customClose();
191
+ }
192
+ if (props.onClose) {
193
+ return await props.onClose();
194
+ }
195
+ }
155
196
  __expose({
156
- open: openFilePicker,
197
+ open: async (params) => {
198
+ const {
199
+ url,
200
+ fileName = "img.png",
201
+ options: options2,
202
+ file,
203
+ onSubmit,
204
+ onCancel,
205
+ onClose
206
+ } = params || {};
207
+ if (file) {
208
+ const result = await blobToDataURL(file);
209
+ openCutter(result, file.name);
210
+ } else if (url) {
211
+ openCutter(url, fileName);
212
+ } else {
213
+ uploadRef.value.click();
214
+ }
215
+ customOptions.value = options2 || {};
216
+ customClose = async () => {
217
+ if (onClose) {
218
+ await onClose();
219
+ }
220
+ customOptions.value = {};
221
+ };
222
+ customCancel = async () => {
223
+ if (onCancel) {
224
+ await onCancel();
225
+ }
226
+ customOptions.value = {};
227
+ };
228
+ customSubmit = async (value) => {
229
+ await onSubmit(value);
230
+ customOptions.value = {};
231
+ };
232
+ },
157
233
  clear: onClearHandler
158
234
  });
159
235
  return (_ctx, _cache) => {
160
- const _component_User = resolveComponent("User");
161
236
  return openBlock(), createElementBlock("div", { class: "inline-block" }, [
162
- withDirectives(createVNode(
163
- unref(ElUpload),
164
- {
165
- accept: ".png,.jpg,.gif,.jpeg",
166
- "before-upload": beforeAvatarUpload,
167
- action: "",
168
- class: "upload_box",
169
- "show-file-list": false
170
- },
171
- {
172
- default: withCtx(() => [
173
- createElementVNode(
174
- "div",
175
- {
176
- ref_key: "uploadRef",
177
- ref: uploadRef,
178
- class: "app-cutter-upload-box"
179
- },
180
- [
181
- renderSlot(_ctx.$slots, "default", { src: imgSrc.value }, () => [
182
- createElementVNode(
183
- "div",
184
- {
185
- class: "app-cutter-upload-card",
237
+ withDirectives(createVNode(unref(ElUpload), {
238
+ accept: ".png,.jpg,.gif,.jpeg",
239
+ "before-upload": beforeAvatarUpload,
240
+ action: "",
241
+ class: "upload_box",
242
+ "show-file-list": false,
243
+ disabled: __props.readonly
244
+ }, {
245
+ default: withCtx(() => [
246
+ createElementVNode(
247
+ "div",
248
+ {
249
+ ref_key: "uploadRef",
250
+ ref: uploadRef,
251
+ class: "app-cutter-upload-box"
252
+ },
253
+ [
254
+ renderSlot(_ctx.$slots, "default", { src: imgSrc.value }, () => [
255
+ createElementVNode(
256
+ "div",
257
+ {
258
+ class: "app-cutter-upload-card",
259
+ style: normalizeStyle({
260
+ width: `${__props.autoCropWidth}px`,
261
+ height: `${__props.autoCropHeight}px`
262
+ })
263
+ },
264
+ [
265
+ modelValue.value && imageSrc.value ? (openBlock(), createBlock(unref(ElImage), {
266
+ key: 0,
267
+ src: imageSrc.value,
186
268
  style: normalizeStyle({
187
269
  width: `${__props.autoCropWidth}px`,
188
270
  height: `${__props.autoCropHeight}px`
189
271
  })
190
- },
191
- [
192
- modelValue.value && imageSrc.value ? (openBlock(), createBlock(unref(ElImage), {
193
- key: 0,
194
- src: imageSrc.value,
195
- style: normalizeStyle({
196
- width: `${__props.autoCropWidth}px`,
197
- height: `${__props.autoCropHeight}px`
272
+ }, null, 8, ["src", "style"])) : (openBlock(), createElementBlock(
273
+ Fragment,
274
+ { key: 1 },
275
+ [
276
+ createCommentVNode(' <AppIcon\n v-else\n svg-name="emptyHead"\n style="width: 70px; height: 70px"\n /> '),
277
+ createVNode(unref(ElIcon), {
278
+ color: "rgb(var(--hy-auxiliary))",
279
+ size: "64"
280
+ }, {
281
+ default: withCtx(() => [
282
+ createVNode(unref(User))
283
+ ]),
284
+ _: 1
285
+ /* STABLE */
198
286
  })
199
- }, null, 8, ["src", "style"])) : (openBlock(), createElementBlock(
200
- Fragment,
201
- { key: 1 },
202
- [
203
- createCommentVNode(' <AppIcon\n v-else\n svg-name="emptyHead"\n style="width: 70px; height: 70px"\n /> '),
204
- createVNode(unref(ElIcon), {
205
- color: "rgb(var(--hy-auxiliary))",
206
- size: "64"
207
- }, {
208
- default: withCtx(() => [
209
- createVNode(_component_User)
210
- ]),
211
- _: 1
212
- /* STABLE */
213
- })
214
- ],
215
- 2112
216
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
217
- ))
218
- ],
219
- 4
220
- /* STYLE */
221
- )
222
- ]),
223
- __props.uploadText && __props.showText ? (openBlock(), createElementBlock(
224
- "div",
225
- {
226
- key: 0,
227
- class: "app-cutter-tip"
228
- },
229
- toDisplayString(__props.uploadText),
230
- 1
231
- /* TEXT */
232
- )) : createCommentVNode("v-if", true),
233
- __props.showDelete ? withDirectives((openBlock(), createElementBlock("div", {
234
- key: 1,
235
- class: "app-cutter-delete",
236
- onClick: withModifiers(($event) => onClearHandler(), ["stop"])
237
- }, [
238
- createCommentVNode(' <AppIcon svg-name="delete" /> '),
239
- createVNode(unref(ElIcon), { color: "rgb(var(--hy-danger-2))" }, {
240
- default: withCtx(() => [
241
- createVNode(unref(Delete))
242
- ]),
243
- _: 1
244
- /* STABLE */
245
- })
246
- ], 8, ["onClick"])), [
247
- [vShow, modelValue.value]
248
- ]) : createCommentVNode("v-if", true)
249
- ],
250
- 512
251
- /* NEED_PATCH */
252
- )
253
- ]),
254
- _: 3
255
- /* FORWARDED */
256
- },
257
- 512
258
- /* NEED_PATCH */
259
- ), [
287
+ ],
288
+ 2112
289
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
290
+ ))
291
+ ],
292
+ 4
293
+ /* STYLE */
294
+ )
295
+ ]),
296
+ __props.uploadText && __props.showText ? (openBlock(), createElementBlock(
297
+ "div",
298
+ {
299
+ key: 0,
300
+ class: "app-cutter-tip"
301
+ },
302
+ toDisplayString(__props.uploadText),
303
+ 1
304
+ /* TEXT */
305
+ )) : createCommentVNode("v-if", true),
306
+ __props.showDelete ? withDirectives((openBlock(), createElementBlock("div", {
307
+ key: 1,
308
+ class: "app-cutter-delete",
309
+ onClick: withModifiers(($event) => onClearHandler(), ["stop"])
310
+ }, [
311
+ createCommentVNode(' <AppIcon svg-name="delete" /> '),
312
+ createVNode(unref(ElIcon), { color: "rgb(var(--hy-danger-2))" }, {
313
+ default: withCtx(() => [
314
+ createVNode(unref(Delete))
315
+ ]),
316
+ _: 1
317
+ /* STABLE */
318
+ })
319
+ ], 8, ["onClick"])), [
320
+ [vShow, modelValue.value]
321
+ ]) : createCommentVNode("v-if", true)
322
+ ],
323
+ 512
324
+ /* NEED_PATCH */
325
+ )
326
+ ]),
327
+ _: 3
328
+ /* FORWARDED */
329
+ }, 8, ["disabled"]), [
260
330
  [vShow, __props.showUpload]
261
331
  ]),
262
- createVNode(unref(AppDialog), {
332
+ createVNode(unref(AppDialog), mergeProps({
263
333
  modelValue: visible.value,
264
334
  "onUpdate:modelValue": ($event) => visible.value = $event,
265
- title: unref(t)("cutter.imageSegmentation"),
335
+ title: unref(t)("cutter.imageSegmentation")
336
+ }, _ctx.$attrs, {
337
+ onClose: onCloseHandler,
338
+ onCancel: onCancelHandler,
266
339
  onSubmit: onSubmitHandler
267
- }, {
340
+ }), {
268
341
  default: withCtx(() => [
269
342
  createElementVNode("div", { class: "h-[500px]" }, [
270
343
  createVNode(unref(VueCropper), mergeProps({
@@ -276,7 +349,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
276
349
  ]),
277
350
  _: 1
278
351
  /* STABLE */
279
- }, 8, ["modelValue", "onUpdate:modelValue", "title"])
352
+ }, 16, ["modelValue", "onUpdate:modelValue", "title"])
280
353
  ]);
281
354
  };
282
355
  }
@@ -61,7 +61,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
61
61
  startValue.value = value[0] ? `${value[0]}${isFill ? " 00:00:00" : ""}` : null;
62
62
  endValue.value = value[1] ? `${value[1]}${isFill ? " 23:59:59" : ""}` : null;
63
63
  } else {
64
- dateValue.value = isFill && (value == null ? void 0 : value.length) ? [`${value[0]} 00:00:00`, `${value[1]} 23:59:59`] : value;
64
+ dateValue.value = isFill && value?.length ? [`${value[0]} 00:00:00`, `${value[1]} 23:59:59`] : value;
65
65
  }
66
66
  emits("change", dateValue.value);
67
67
  }