@vunk/form 2.17.2 → 2.18.1

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 (139) hide show
  1. package/components/api-tables-select/index.cjs +1 -1
  2. package/components/api-tables-select/index.mjs +1 -1
  3. package/components/button/index.cjs +1 -1
  4. package/components/button/index.mjs +1 -1
  5. package/components/card-input-collection/index.cjs +2 -2
  6. package/components/card-input-collection/index.css +11 -11
  7. package/components/card-input-collection/index.mjs +2 -2
  8. package/components/cascader/index.cjs +1 -1
  9. package/components/cascader/index.mjs +1 -1
  10. package/components/checkbox/index.cjs +1 -1
  11. package/components/checkbox/index.mjs +1 -1
  12. package/components/color-picker/index.cjs +1 -1
  13. package/components/color-picker/index.mjs +1 -1
  14. package/components/date-picker/index.cjs +1 -1
  15. package/components/date-picker/index.mjs +1 -1
  16. package/components/date-picker-range/index.cjs +11 -4
  17. package/components/date-picker-range/index.mjs +11 -4
  18. package/components/date-picker-range/src/ctx.d.ts +2 -2
  19. package/components/date-picker-range/src/index.vue.d.ts +8 -5
  20. package/components/dialog/index.cjs +1 -1
  21. package/components/dialog/index.mjs +1 -1
  22. package/components/dialog-input-collection/index.cjs +58 -36
  23. package/components/dialog-input-collection/index.mjs +51 -29
  24. package/components/dialog-input-collection/src/dialog-form.vue.d.ts +1 -0
  25. package/components/dialog-input-collection/src/index.vue.d.ts +2 -0
  26. package/components/download-plus/index.cjs +25 -14
  27. package/components/download-plus/index.mjs +26 -15
  28. package/components/download-plus/src/index.vue.d.ts +1 -0
  29. package/components/editable-text/index.cjs +1 -1
  30. package/components/editable-text/index.mjs +1 -1
  31. package/components/esri-input-geojson/index.cjs +16 -11
  32. package/components/esri-input-geojson/index.mjs +16 -11
  33. package/components/esri-input-geojson/src/ctx.d.ts +1 -1
  34. package/components/esri-input-geojson/src/index.vue.d.ts +4 -3
  35. package/components/fieldset/index.cjs +1 -1
  36. package/components/fieldset/index.mjs +1 -1
  37. package/components/form/index.cjs +1 -1
  38. package/components/form/index.mjs +1 -1
  39. package/components/form-item/index.cjs +19 -16
  40. package/components/form-item/index.css +12 -12
  41. package/components/form-item/index.mjs +20 -17
  42. package/components/form-item-renderer/index.cjs +2 -2
  43. package/components/form-item-renderer/index.mjs +2 -2
  44. package/components/form-item-renderer-template/index.cjs +1 -1
  45. package/components/form-item-renderer-template/index.mjs +1 -1
  46. package/components/forms-provider/index.cjs +3 -3
  47. package/components/forms-provider/index.mjs +3 -3
  48. package/components/information/index.cjs +1 -1
  49. package/components/information/index.mjs +1 -1
  50. package/components/information-collection/index.cjs +1 -1
  51. package/components/information-collection/index.mjs +1 -1
  52. package/components/information-tag/index.cjs +1 -1
  53. package/components/information-tag/index.mjs +1 -1
  54. package/components/information-templates-default/index.cjs +1 -1
  55. package/components/information-templates-default/index.mjs +1 -1
  56. package/components/input/index.cjs +1 -1
  57. package/components/input/index.mjs +1 -1
  58. package/components/input-array/index.cjs +2 -2
  59. package/components/input-array/index.mjs +2 -2
  60. package/components/input-collection/index.cjs +13 -8
  61. package/components/input-collection/index.css +8 -8
  62. package/components/input-collection/index.mjs +8 -3
  63. package/components/input-collection/src/core.vue.d.ts +1 -0
  64. package/components/input-file/index.cjs +2 -2
  65. package/components/input-file/index.mjs +2 -2
  66. package/components/input-link/index.cjs +20 -10
  67. package/components/input-link/index.mjs +17 -7
  68. package/components/input-link/src/ctx.d.ts +3 -3
  69. package/components/input-link/src/index.vue.d.ts +9 -6
  70. package/components/input-number/index.cjs +1 -1
  71. package/components/input-number/index.mjs +1 -1
  72. package/components/input-tag/index.cjs +1 -1
  73. package/components/input-tag/index.mjs +1 -1
  74. package/components/monaco-editor/index.cjs +1 -1
  75. package/components/monaco-editor/index.mjs +1 -1
  76. package/components/radio/index.cjs +3 -3
  77. package/components/radio/index.css +8 -8
  78. package/components/radio/index.mjs +3 -3
  79. package/components/radio/src/index.vue.d.ts +2 -2
  80. package/components/radio/src/option.vue.d.ts +1 -1
  81. package/components/radio/src/wraper.vue.d.ts +1 -1
  82. package/components/renderer-data/index.cjs +1 -1
  83. package/components/renderer-data/index.mjs +1 -1
  84. package/components/select/index.cjs +3 -3
  85. package/components/select/index.css +9 -9
  86. package/components/select/index.mjs +3 -3
  87. package/components/slider/index.cjs +1 -1
  88. package/components/slider/index.mjs +1 -1
  89. package/components/switch/index.cjs +1 -1
  90. package/components/switch/index.mjs +1 -1
  91. package/components/tables-select/index.cjs +7 -4
  92. package/components/tables-select/index.mjs +7 -4
  93. package/components/tables-select/src/index.vue.d.ts +1 -0
  94. package/components/template-instances-provider/index.cjs +1 -1
  95. package/components/template-instances-provider/index.mjs +1 -1
  96. package/components/templates-default/index.cjs +1 -1
  97. package/components/templates-default/index.mjs +1 -1
  98. package/components/templates-element-plus/index.cjs +1 -1
  99. package/components/templates-element-plus/index.mjs +1 -1
  100. package/components/templates-esri/index.cjs +1 -1
  101. package/components/templates-esri/index.mjs +1 -1
  102. package/components/templates-layout/index.cjs +1 -1
  103. package/components/templates-layout/index.mjs +1 -1
  104. package/components/templates-variant/index.cjs +1 -1
  105. package/components/templates-variant/index.mjs +1 -1
  106. package/components/time-picker/index.cjs +1 -1
  107. package/components/time-picker/index.mjs +1 -1
  108. package/components/upload/index.cjs +42 -29
  109. package/components/upload/index.mjs +41 -28
  110. package/components/upload/src/ctx.d.ts +1 -1
  111. package/components/upload/src/file.vue.d.ts +4 -3
  112. package/components/upload/src/index.vue.d.ts +7 -5
  113. package/components/upload/src/wraper.vue.d.ts +2 -2
  114. package/components/upload-plus/index.cjs +57 -38
  115. package/components/upload-plus/index.mjs +58 -39
  116. package/components/upload-plus/src/index.vue.d.ts +1 -0
  117. package/components/van-cascader/index.cjs +1 -1
  118. package/components/van-cascader/index.mjs +1 -1
  119. package/components/var-datetime-picker/index.cjs +19 -16
  120. package/components/var-datetime-picker/index.mjs +19 -16
  121. package/components/var-datetime-picker/src/index.vue.d.ts +1 -0
  122. package/components/vditor/index.cjs +1 -1
  123. package/components/vditor/index.mjs +1 -1
  124. package/composables/element-plus/index.cjs +23 -0
  125. package/composables/element-plus/index.d.ts +1 -0
  126. package/composables/element-plus/index.mjs +21 -0
  127. package/composables/element-plus/useLocale.d.ts +8 -0
  128. package/index.css +48 -48
  129. package/index.d.ts +1 -0
  130. package/index.esm.js +1 -0
  131. package/locale/index.cjs +110 -0
  132. package/locale/index.d.ts +2 -0
  133. package/locale/index.mjs +107 -0
  134. package/locale/lang/en.d.ts +53 -0
  135. package/locale/lang/index.cjs +2 -0
  136. package/locale/lang/index.d.ts +0 -0
  137. package/locale/lang/index.mjs +1 -0
  138. package/locale/lang/zh-cn.d.ts +53 -0
  139. package/package.json +160 -1
@@ -1,13 +1,14 @@
1
1
  import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, Fragment, createCommentVNode, normalizeClass, createBlock, createElementVNode, withModifiers, createVNode, withCtx, toDisplayString, createTextVNode, normalizeStyle, shallowRef, normalizeProps, guardReactiveProps, mergeProps, createSlots, renderSlot, h } from 'vue';
2
2
  import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
3
3
  import { bindPropsFactory, onEmitsFactory, vOn } from '@vunk/core/shared/utils-vue';
4
- import { uploadProps, ElProgress, ElIcon, ElButton, useNamespace, useLocale, ElUpload, ElLink, ElMessageBox, genFileId } from 'element-plus';
4
+ import { uploadProps, ElProgress, ElIcon, ElButton, useNamespace, ElUpload, ElLink, ElMessageBox, genFileId } from 'element-plus';
5
5
  import { pickObject } from '@vunk/core/shared/utils-object';
6
6
  import { createUploadBindProps } from '@vunk/form/shared/element-plus';
7
7
  import { h as check_default, z as zoom_in_default, d as delete_default, i as close_default, j as circle_check_default, k as document_default, a as download_default } from '../index.mjs';
8
8
  import { RestFetch } from '@vunk/core/shared/utils-fetch';
9
9
  import { NOOP } from '@vunk/core/shared/utils-function';
10
10
  import { isCallable } from '@vunk/shared/function';
11
+ import { useLocale } from '@vunk/form/composables/element-plus';
11
12
  import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
12
13
  import { useComputedReadonly } from '@vunk/form/composables';
13
14
  import progress from '@vunk/form/shared/progress-it';
@@ -22,7 +23,7 @@ const props = {
22
23
  preview: null,
23
24
  previewLabel: {
24
25
  type: String,
25
- default: "\u9884\u89C8"
26
+ default: void 0
26
27
  },
27
28
  beforeUpload: {
28
29
  type: Function,
@@ -113,7 +114,7 @@ var _sfc_main$2 = defineComponent({
113
114
  },
114
115
  previewLabel: {
115
116
  type: String,
116
- default: "\u9884\u89C8"
117
+ default: void 0
117
118
  }
118
119
  },
119
120
  emits: {
@@ -122,7 +123,7 @@ var _sfc_main$2 = defineComponent({
122
123
  setup(props, { emit }) {
123
124
  const nsUpload = useNamespace("upload");
124
125
  const nsIcon = useNamespace("icon");
125
- const { t } = useLocale();
126
+ const { tr } = useLocale();
126
127
  const handleRemove = (file = props.file) => {
127
128
  emit("remove", file);
128
129
  };
@@ -150,17 +151,19 @@ var _sfc_main$2 = defineComponent({
150
151
  }
151
152
  return props.preview;
152
153
  });
154
+ const previewText = computed(() => props.previewLabel || tr("el.upload.preview", "\u9884\u89C8"));
153
155
  const handlePreview = (file = props.file) => {
154
156
  previewable.value && props.onPreview(file);
155
157
  };
156
158
  return {
157
159
  handleRemove,
158
- t,
159
160
  nsIcon,
160
161
  nsUpload,
161
162
  handleDownload,
162
163
  handlePreview,
163
- previewable
164
+ previewText,
165
+ previewable,
166
+ tr
164
167
  };
165
168
  }
166
169
  });
@@ -269,7 +272,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
269
272
  }, {
270
273
  default: withCtx(() => [
271
274
  createTextVNode(
272
- toDisplayString(_ctx.previewLabel),
275
+ toDisplayString(_ctx.previewText),
273
276
  1
274
277
  /* TEXT */
275
278
  )
@@ -285,11 +288,15 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
285
288
  type: "primary",
286
289
  onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleDownload(_ctx.file))
287
290
  }, {
288
- default: withCtx(() => _cache[8] || (_cache[8] = [
289
- createTextVNode(" \u4E0B\u8F7D ")
290
- ])),
291
- _: 1,
292
- __: [8]
291
+ default: withCtx(() => [
292
+ createTextVNode(
293
+ toDisplayString(_ctx.tr("vkf.upload.download", "\u4E0B\u8F7D")),
294
+ 1
295
+ /* TEXT */
296
+ )
297
+ ]),
298
+ _: 1
299
+ /* STABLE */
293
300
  })
294
301
  ],
295
302
  2
@@ -437,7 +444,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
437
444
  /* STABLE_FRAGMENT */
438
445
  );
439
446
  }
440
- var FileVue = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/upload/src/file.vue"]]);
447
+ var FileVue = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "D:\\labCode\\vunk-form2\\packages\\components\\upload\\src\\file.vue"]]);
441
448
 
442
449
  var _sfc_main$1 = defineComponent({
443
450
  components: {
@@ -450,6 +457,7 @@ var _sfc_main$1 = defineComponent({
450
457
  emits,
451
458
  setup(props2, { emit }) {
452
459
  const formItemBindProps = _VkfFormItemCtx.createBindProps(props2);
460
+ const { tr } = useLocale();
453
461
  const coreBindProps = createUploadBindProps(props2, ["disabled", "fileList", "beforeUpload", "onSuccess"]);
454
462
  const uploadRef = shallowRef();
455
463
  const handleRemove = (file) => {
@@ -473,11 +481,11 @@ var _sfc_main$1 = defineComponent({
473
481
  };
474
482
  if (props2.confirmExceed) {
475
483
  ElMessageBox.confirm(
476
- `\u5DF2\u8D85\u8FC7\u6700\u5927\u4E0A\u4F20\u6570\u91CF\u9650\u5236\uFF0C\u662F\u5426\u4F7F\u7528\u65B0\u6587\u4EF6\u91CD\u65B0\u4E0A\u4F20\uFF1F`,
477
- "\u63D0\u793A",
484
+ tr("vkf.upload.exceedConfirm", "\u5DF2\u8D85\u8FC7\u6700\u5927\u4E0A\u4F20\u6570\u91CF\u9650\u5236\uFF0C\u662F\u5426\u4F7F\u7528\u65B0\u6587\u4EF6\u91CD\u65B0\u4E0A\u4F20\uFF1F"),
485
+ tr("el.messagebox.title", "\u63D0\u793A"),
478
486
  {
479
- confirmButtonText: "\u7EE7\u7EED",
480
- cancelButtonText: "\u53D6\u6D88",
487
+ confirmButtonText: tr("el.upload.continue", "\u7EE7\u7EED"),
488
+ cancelButtonText: tr("el.messagebox.cancel", "\u53D6\u6D88"),
481
489
  type: "warning"
482
490
  }
483
491
  ).then(doUpload);
@@ -521,7 +529,8 @@ var _sfc_main$1 = defineComponent({
521
529
  onSuccess,
522
530
  // onProgress,
523
531
  beforeUpload,
524
- handleExceed
532
+ handleExceed,
533
+ tr
525
534
  };
526
535
  }
527
536
  });
@@ -567,11 +576,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
567
576
  default: withCtx(() => [
568
577
  renderSlot(_ctx.$slots, "default", {}, () => [
569
578
  createVNode(_component_ElLink, { type: "primary" }, {
570
- default: withCtx(() => _cache[1] || (_cache[1] = [
571
- createTextVNode(" + \u9009\u62E9\u6587\u4EF6 ")
572
- ])),
573
- _: 1,
574
- __: [1]
579
+ default: withCtx(() => [
580
+ createTextVNode(
581
+ " + " + toDisplayString(_ctx.tr("vkf.upload.selectFile", "\u9009\u62E9\u6587\u4EF6")),
582
+ 1
583
+ /* TEXT */
584
+ )
585
+ ]),
586
+ _: 1
587
+ /* STABLE */
575
588
  })
576
589
  ])
577
590
  ]),
@@ -600,9 +613,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
600
613
  "is-empty": _ctx.fileList?.length === 0
601
614
  }])
602
615
  },
603
- "\u6682\u65E0",
604
- 2
605
- /* CLASS */
616
+ toDisplayString(_ctx.tr("vkf.upload.empty", "\u6682\u65E0")),
617
+ 3
618
+ /* TEXT, CLASS */
606
619
  )
607
620
  ]),
608
621
  _: 3
@@ -612,7 +625,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
612
625
  /* FULL_PROPS */
613
626
  );
614
627
  }
615
- var Core = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/upload/src/index.vue"]]);
628
+ var Core = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "D:\\labCode\\vunk-form2\\packages\\components\\upload\\src\\index.vue"]]);
616
629
 
617
630
  var _sfc_main = defineComponent({
618
631
  name: "VkfUpload",
@@ -630,7 +643,7 @@ var _sfc_main = defineComponent({
630
643
  }
631
644
  });
632
645
 
633
- var VkfUpload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/upload/src/wraper.vue"]]);
646
+ var VkfUpload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:\\labCode\\vunk-form2\\packages\\components\\upload\\src\\wraper.vue"]]);
634
647
 
635
648
  var types = /*#__PURE__*/Object.freeze({
636
649
  __proto__: null
@@ -10,7 +10,7 @@ export declare const props: {
10
10
  preview: any;
11
11
  previewLabel: {
12
12
  type: StringConstructor;
13
- default: string;
13
+ default: any;
14
14
  };
15
15
  beforeUpload: {
16
16
  type: FunctionConstructor;
@@ -28,11 +28,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
28
28
  };
29
29
  previewLabel: {
30
30
  type: StringConstructor;
31
- default: string;
31
+ default: any;
32
32
  };
33
33
  }>, {
34
34
  handleRemove: (file?: UploadFile) => void;
35
- t: import("element-plus").Translator;
36
35
  nsIcon: {
37
36
  namespace: import("vue").ComputedRef<string>;
38
37
  b: (blockSuffix?: string) => string;
@@ -71,7 +70,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
71
70
  };
72
71
  handleDownload: (file?: UploadFile) => void;
73
72
  handlePreview: (file?: UploadFile) => void;
73
+ previewText: import("vue").ComputedRef<string>;
74
74
  previewable: import("vue").ComputedRef<unknown>;
75
+ tr: import("@vunk/form/composables/element-plus").TranslateWithFallback;
75
76
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
76
77
  remove: (e: UploadFile) => UploadFile;
77
78
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -101,7 +102,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
101
102
  };
102
103
  previewLabel: {
103
104
  type: StringConstructor;
104
- default: string;
105
+ default: any;
105
106
  };
106
107
  }>> & Readonly<{
107
108
  onRemove?: (e: UploadFile) => any;
@@ -9,7 +9,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
9
9
  preview: any;
10
10
  previewLabel: {
11
11
  type: StringConstructor;
12
- default: string;
12
+ default: any;
13
13
  };
14
14
  beforeUpload: {
15
15
  type: FunctionConstructor;
@@ -321,6 +321,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
321
321
  onSuccess: (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
322
322
  beforeUpload: (rawFile: UploadRawFile) => Promise<any>;
323
323
  handleExceed: (files: File[], uploadFiles: import("element-plus").UploadUserFile[]) => void;
324
+ tr: import("@vunk/form/composables/element-plus").TranslateWithFallback;
324
325
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
325
326
  'update:fileList': any;
326
327
  remove: (e: UploadFile) => UploadFile;
@@ -332,7 +333,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
332
333
  preview: any;
333
334
  previewLabel: {
334
335
  type: StringConstructor;
335
- default: string;
336
+ default: any;
336
337
  };
337
338
  beforeUpload: {
338
339
  type: FunctionConstructor;
@@ -1304,11 +1305,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1304
1305
  };
1305
1306
  previewLabel: {
1306
1307
  type: StringConstructor;
1307
- default: string;
1308
+ default: any;
1308
1309
  };
1309
1310
  }>, {
1310
1311
  handleRemove: (file?: UploadFile) => void;
1311
- t: import("element-plus").Translator;
1312
1312
  nsIcon: {
1313
1313
  namespace: import("vue").ComputedRef<string>;
1314
1314
  b: (blockSuffix?: string) => string;
@@ -1347,7 +1347,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1347
1347
  };
1348
1348
  handleDownload: (file?: UploadFile) => void;
1349
1349
  handlePreview: (file?: UploadFile) => void;
1350
+ previewText: import("vue").ComputedRef<string>;
1350
1351
  previewable: import("vue").ComputedRef<unknown>;
1352
+ tr: import("@vunk/form/composables/element-plus").TranslateWithFallback;
1351
1353
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1352
1354
  remove: (e: UploadFile) => UploadFile;
1353
1355
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -1377,7 +1379,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1377
1379
  };
1378
1380
  previewLabel: {
1379
1381
  type: StringConstructor;
1380
- default: string;
1382
+ default: any;
1381
1383
  };
1382
1384
  }>> & Readonly<{
1383
1385
  onRemove?: (e: UploadFile) => any;
@@ -6,7 +6,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
6
6
  preview: any;
7
7
  previewLabel: {
8
8
  type: StringConstructor;
9
- default: string;
9
+ default: any;
10
10
  };
11
11
  beforeUpload: {
12
12
  type: FunctionConstructor;
@@ -283,7 +283,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
283
283
  preview: any;
284
284
  previewLabel: {
285
285
  type: StringConstructor;
286
- default: string;
286
+ default: any;
287
287
  };
288
288
  beforeUpload: {
289
289
  type: FunctionConstructor;
@@ -14,6 +14,7 @@ var platform = require('@skzz/platform/shared/fetch/platform');
14
14
  var index$1 = require('../index.cjs');
15
15
  var composables = require('@vunk/core/composables');
16
16
  var _class = require('@vunk/shared/class');
17
+ var elementPlus$1 = require('@vunk/form/composables/element-plus');
17
18
  var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
18
19
 
19
20
  const props = {
@@ -18251,6 +18252,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
18251
18252
  const ToggleHandler = _class.ToggleHandler;
18252
18253
  const props = __props;
18253
18254
  const emit = __emit;
18255
+ const { tr } = elementPlus$1.useLocale();
18254
18256
  const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props);
18255
18257
  const uuid = Math.random().toString(36).slice(-8);
18256
18258
  const containerFile = composables.useModelComputed({
@@ -18317,14 +18319,14 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
18317
18319
  fileStatus.value = Status.error;
18318
18320
  elementPlus.ElMessage({
18319
18321
  type: "error",
18320
- message: "\u4E0A\u4F20\u5931\u8D25"
18322
+ message: tr("vkf.uploadPlus.uploadFailed", "\u4E0A\u4F20\u5931\u8D25")
18321
18323
  });
18322
18324
  return;
18323
18325
  }
18324
18326
  if (uploaded) {
18325
18327
  elementPlus.ElMessage({
18326
18328
  type: "success",
18327
- message: "\u4E0A\u4F20\u6210\u529F"
18329
+ message: tr("vkf.uploadPlus.uploadSuccess", "\u4E0A\u4F20\u6210\u529F")
18328
18330
  });
18329
18331
  emit("success", mergedFile);
18330
18332
  fileStatus.value = Status.done;
@@ -18358,7 +18360,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
18358
18360
  fileStatus.value = Status.error;
18359
18361
  elementPlus.ElMessage({
18360
18362
  type: "error",
18361
- message: "\u4E0A\u4F20\u5931\u8D25"
18363
+ message: tr("vkf.uploadPlus.uploadFailed", "\u4E0A\u4F20\u5931\u8D25")
18362
18364
  });
18363
18365
  });
18364
18366
  };
@@ -18439,7 +18441,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
18439
18441
  console.error("\u5408\u5E76\u5931\u8D25", err);
18440
18442
  elementPlus.ElMessage({
18441
18443
  type: "error",
18442
- message: "\u5408\u5E76\u5931\u8D25"
18444
+ message: tr("vkf.uploadPlus.mergeFailed", "\u5408\u5E76\u5931\u8D25")
18443
18445
  });
18444
18446
  throw err;
18445
18447
  }).finally(() => {
@@ -18470,7 +18472,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
18470
18472
  vue.onBeforeUnmount(() => {
18471
18473
  offlineToggle.remove();
18472
18474
  });
18473
- const __returned__ = { vLoading, ToggleHandler, props, emit, formItemBindProps, uuid, containerFile, fileStatus, containerHash, chunks, uploadingXhrs, filePrefixIcon, handleFileChange, handleUpload, handlePause, cUploadedChunks, merging, cFile, OnlineToggle, offlineToggle, get VkfFormItem() {
18475
+ const __returned__ = { vLoading, ToggleHandler, props, emit, tr, formItemBindProps, uuid, containerFile, fileStatus, containerHash, chunks, uploadingXhrs, filePrefixIcon, handleFileChange, handleUpload, handlePause, cUploadedChunks, merging, cFile, OnlineToggle, offlineToggle, get VkfFormItem() {
18474
18476
  return formItem.VkfFormItem;
18475
18477
  }, get ElInput() {
18476
18478
  return elementPlus.ElInput;
@@ -18496,11 +18498,12 @@ const _hoisted_3 = {
18496
18498
  key: 0,
18497
18499
  class: "vkf-upload-plus-msg-x"
18498
18500
  };
18499
- const _hoisted_4 = {
18501
+ const _hoisted_4 = { class: "vkf-upload-plus-msg" };
18502
+ const _hoisted_5 = {
18500
18503
  key: 1,
18501
18504
  class: "vkf-upload-plus-cube-x"
18502
18505
  };
18503
- const _hoisted_5 = ["id", "accept"];
18506
+ const _hoisted_6 = ["id", "accept"];
18504
18507
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
18505
18508
  return vue.openBlock(), vue.createBlock(
18506
18509
  $setup["VkfFormItem"],
@@ -18519,8 +18522,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
18519
18522
  }),
18520
18523
  "model-value": $setup.containerFile?.name,
18521
18524
  "prefix-icon": $setup.filePrefixIcon,
18522
- placeholder: "\u8BF7\u9009\u62E9\u6587\u4EF6"
18523
- }, null, 8, ["class", "model-value", "prefix-icon"]),
18525
+ placeholder: $setup.tr("vkf.uploadPlus.selectFile", "\u8BF7\u9009\u62E9\u6587\u4EF6")
18526
+ }, null, 8, ["class", "model-value", "prefix-icon", "placeholder"]),
18524
18527
  $setup.fileStatus === $setup.Status.done ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
18525
18528
  vue.createVNode($setup["ElIcon"], null, {
18526
18529
  default: vue.withCtx(() => [
@@ -18529,15 +18532,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
18529
18532
  _: 1
18530
18533
  /* STABLE */
18531
18534
  }),
18532
- _cache[0] || (_cache[0] = vue.createElementVNode(
18535
+ vue.createElementVNode(
18533
18536
  "span",
18534
- { class: "vkf-upload-plus-msg" },
18535
- " \u4E0A\u4F20\u6210\u529F ",
18536
- -1
18537
- /* CACHED */
18538
- ))
18537
+ _hoisted_4,
18538
+ vue.toDisplayString($setup.tr("vkf.uploadPlus.uploadSuccess", "\u4E0A\u4F20\u6210\u529F")),
18539
+ 1
18540
+ /* TEXT */
18541
+ )
18539
18542
  ])) : vue.createCommentVNode("v-if", true),
18540
- $setup.fileStatus === $setup.Status.uploading || $setup.fileStatus === $setup.Status.pause ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
18543
+ $setup.fileStatus === $setup.Status.uploading || $setup.fileStatus === $setup.Status.pause ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
18541
18544
  (vue.openBlock(true), vue.createElementBlock(
18542
18545
  vue.Fragment,
18543
18546
  null,
@@ -18585,18 +18588,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
18585
18588
  class: "vkf-upload-plus-input",
18586
18589
  accept: _ctx.accept,
18587
18590
  onChange: $setup.handleFileChange
18588
- }, null, 40, _hoisted_5),
18591
+ }, null, 40, _hoisted_6),
18589
18592
  vue.createVNode($setup["ElButtonGroup"], { class: "vkf-upload-plus-btng" }, {
18590
18593
  default: vue.withCtx(() => [
18591
18594
  $setup.merging ? vue.withDirectives((vue.openBlock(), vue.createBlock($setup["ElButton"], {
18592
18595
  key: 0,
18593
18596
  type: "success"
18594
18597
  }, {
18595
- default: vue.withCtx(() => _cache[1] || (_cache[1] = [
18596
- vue.createTextVNode(" \u5408\u5E76 ")
18597
- ])),
18598
- _: 1,
18599
- __: [1]
18598
+ default: vue.withCtx(() => [
18599
+ vue.createTextVNode(
18600
+ vue.toDisplayString($setup.tr("vkf.uploadPlus.merge", "\u5408\u5E76")),
18601
+ 1
18602
+ /* TEXT */
18603
+ )
18604
+ ]),
18605
+ _: 1
18606
+ /* STABLE */
18600
18607
  })), [
18601
18608
  [$setup["vLoading"], $setup.merging]
18602
18609
  ]) : $setup.fileStatus === $setup.Status.uploading ? (vue.openBlock(), vue.createBlock($setup["ElButton"], {
@@ -18604,32 +18611,44 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
18604
18611
  type: "danger",
18605
18612
  onClick: $setup.handlePause
18606
18613
  }, {
18607
- default: vue.withCtx(() => _cache[2] || (_cache[2] = [
18608
- vue.createTextVNode(" \u6682\u505C ")
18609
- ])),
18610
- _: 1,
18611
- __: [2]
18614
+ default: vue.withCtx(() => [
18615
+ vue.createTextVNode(
18616
+ vue.toDisplayString($setup.tr("vkf.common.pause", "\u6682\u505C")),
18617
+ 1
18618
+ /* TEXT */
18619
+ )
18620
+ ]),
18621
+ _: 1
18622
+ /* STABLE */
18612
18623
  })) : $setup.fileStatus === $setup.Status.done ? (vue.openBlock(), vue.createBlock($setup["ElButton"], {
18613
18624
  key: 2,
18614
18625
  type: "success",
18615
18626
  disabled: ""
18616
18627
  }, {
18617
- default: vue.withCtx(() => _cache[3] || (_cache[3] = [
18618
- vue.createTextVNode(" \u5DF2\u4F20 ")
18619
- ])),
18620
- _: 1,
18621
- __: [3]
18628
+ default: vue.withCtx(() => [
18629
+ vue.createTextVNode(
18630
+ vue.toDisplayString($setup.tr("vkf.uploadPlus.uploaded", "\u5DF2\u4F20")),
18631
+ 1
18632
+ /* TEXT */
18633
+ )
18634
+ ]),
18635
+ _: 1
18636
+ /* STABLE */
18622
18637
  })) : (vue.openBlock(), vue.createBlock($setup["ElButton"], {
18623
18638
  key: 3,
18624
18639
  type: "primary",
18625
18640
  disabled: !$setup.containerFile,
18626
18641
  onClick: $setup.handleUpload
18627
18642
  }, {
18628
- default: vue.withCtx(() => _cache[4] || (_cache[4] = [
18629
- vue.createTextVNode(" \u4E0A\u4F20 ")
18630
- ])),
18631
- _: 1,
18632
- __: [4]
18643
+ default: vue.withCtx(() => [
18644
+ vue.createTextVNode(
18645
+ vue.toDisplayString($setup.tr("vkf.common.upload", "\u4E0A\u4F20")),
18646
+ 1
18647
+ /* TEXT */
18648
+ )
18649
+ ]),
18650
+ _: 1
18651
+ /* STABLE */
18633
18652
  }, 8, ["disabled"]))
18634
18653
  ]),
18635
18654
  _: 1
@@ -18644,7 +18663,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
18644
18663
  /* FULL_PROPS */
18645
18664
  );
18646
18665
  }
18647
- var VkfUploadPlus = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/upload-plus/src/index.vue"]]);
18666
+ var VkfUploadPlus = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:\\labCode\\vunk-form2\\packages\\components\\upload-plus\\src\\index.vue"]]);
18648
18667
 
18649
18668
  var types = /*#__PURE__*/Object.freeze({
18650
18669
  __proto__: null