@vunk/form 2.17.2 → 2.18.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 (57) hide show
  1. package/components/date-picker-range/index.cjs +10 -3
  2. package/components/date-picker-range/index.mjs +10 -3
  3. package/components/date-picker-range/src/ctx.d.ts +2 -2
  4. package/components/date-picker-range/src/index.vue.d.ts +8 -5
  5. package/components/dialog-input-collection/index.cjs +55 -33
  6. package/components/dialog-input-collection/index.mjs +48 -26
  7. package/components/dialog-input-collection/src/dialog-form.vue.d.ts +1 -0
  8. package/components/dialog-input-collection/src/index.vue.d.ts +2 -0
  9. package/components/download-plus/index.cjs +24 -13
  10. package/components/download-plus/index.mjs +25 -14
  11. package/components/download-plus/src/index.vue.d.ts +1 -0
  12. package/components/esri-input-geojson/index.cjs +12 -7
  13. package/components/esri-input-geojson/index.mjs +12 -7
  14. package/components/esri-input-geojson/src/ctx.d.ts +1 -1
  15. package/components/esri-input-geojson/src/index.vue.d.ts +4 -3
  16. package/components/form-item/index.cjs +17 -14
  17. package/components/form-item/index.mjs +18 -15
  18. package/components/input-collection/index.cjs +11 -6
  19. package/components/input-collection/index.mjs +6 -1
  20. package/components/input-collection/src/core.vue.d.ts +1 -0
  21. package/components/input-link/index.cjs +19 -9
  22. package/components/input-link/index.mjs +16 -6
  23. package/components/input-link/src/ctx.d.ts +3 -3
  24. package/components/input-link/src/index.vue.d.ts +9 -6
  25. package/components/radio/src/index.vue.d.ts +2 -2
  26. package/components/radio/src/option.vue.d.ts +1 -1
  27. package/components/radio/src/wraper.vue.d.ts +1 -1
  28. package/components/tables-select/index.cjs +6 -3
  29. package/components/tables-select/index.mjs +6 -3
  30. package/components/tables-select/src/index.vue.d.ts +1 -0
  31. package/components/upload/index.cjs +39 -26
  32. package/components/upload/index.mjs +38 -25
  33. package/components/upload/src/ctx.d.ts +1 -1
  34. package/components/upload/src/file.vue.d.ts +4 -3
  35. package/components/upload/src/index.vue.d.ts +7 -5
  36. package/components/upload/src/wraper.vue.d.ts +2 -2
  37. package/components/upload-plus/index.cjs +56 -37
  38. package/components/upload-plus/index.mjs +57 -38
  39. package/components/upload-plus/src/index.vue.d.ts +1 -0
  40. package/components/var-datetime-picker/index.cjs +18 -15
  41. package/components/var-datetime-picker/index.mjs +18 -15
  42. package/components/var-datetime-picker/src/index.vue.d.ts +1 -0
  43. package/composables/element-plus/index.cjs +23 -0
  44. package/composables/element-plus/index.d.ts +1 -0
  45. package/composables/element-plus/index.mjs +21 -0
  46. package/composables/element-plus/useLocale.d.ts +8 -0
  47. package/index.d.ts +1 -0
  48. package/index.esm.js +1 -0
  49. package/locale/index.cjs +110 -0
  50. package/locale/index.d.ts +2 -0
  51. package/locale/index.mjs +107 -0
  52. package/locale/lang/en.d.ts +53 -0
  53. package/locale/lang/index.cjs +2 -0
  54. package/locale/lang/index.d.ts +0 -0
  55. package/locale/lang/index.mjs +1 -0
  56. package/locale/lang/zh-cn.d.ts +53 -0
  57. package/package.json +16 -1
@@ -192,6 +192,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
192
192
  }[]>;
193
193
  fileStatus: import("vue").WritableComputedRef<Status, Status>;
194
194
  filePrefixIcon: import("vue").ComputedRef<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
195
+ tr: import("@vunk/form/composables/element-plus").TranslateWithFallback;
195
196
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
196
197
  'update:fileStatus': any;
197
198
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -14,6 +14,7 @@ var SceneView = require('@arcgis/core/views/SceneView');
14
14
  var core$1 = require('@vunk/core');
15
15
  var Graphic = require('@arcgis/core/Graphic');
16
16
  var composables = require('@vunk/form/composables');
17
+ var elementPlus$1 = require('@vunk/form/composables/element-plus');
17
18
  var utilsPromise = require('@vunk/core/shared/utils-promise');
18
19
 
19
20
  var EDIT_TYPE = /* @__PURE__ */ ((EDIT_TYPE2) => {
@@ -105,7 +106,7 @@ const props = {
105
106
  },
106
107
  dialogEditTitle: {
107
108
  type: String,
108
- default: "\u7ED8\u5236\u56FE\u6591"
109
+ default: void 0
109
110
  },
110
111
  flying: {
111
112
  type: Boolean,
@@ -1269,8 +1270,11 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
1269
1270
  }) {
1270
1271
  const inputBindProps = input._VkfInputCtx.createBindProps(props2, ["inputSlots", "readonly", "modelValue"]);
1271
1272
  const inputOnEmits = input._VkfInputCtx.createOnEmits(emit, ["update:modelValue"]);
1273
+ const {
1274
+ tr
1275
+ } = elementPlus$1.useLocale();
1272
1276
  const getInputModelValue = v => {
1273
- const emptyStr = "\u6682\u65E0\u6570\u636E";
1277
+ const emptyStr = tr("el.table.emptyText", "\u6682\u65E0\u6570\u636E");
1274
1278
  if (!v) return emptyStr;
1275
1279
  if (!v.features.length) return emptyStr;
1276
1280
  return JSON.stringify(v);
@@ -1317,7 +1321,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
1317
1321
  immediate: true
1318
1322
  });
1319
1323
  const handleUpdateSketchValue = e => {
1320
- sketchValue.value = e;
1324
+ sketchValue.value = Array.isArray(e) ? e : e.toArray();
1321
1325
  if (props2.skipSave) {
1322
1326
  u();
1323
1327
  }
@@ -1341,7 +1345,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
1341
1345
  const doSave = () => {
1342
1346
  u();
1343
1347
  elementPlus.ElMessage({
1344
- message: "\u4FDD\u5B58\u6210\u529F",
1348
+ message: tr("vkf.esriInputGeojson.saveSuccess", "\u4FDD\u5B58\u6210\u529F"),
1345
1349
  type: "success"
1346
1350
  });
1347
1351
  dialogShow.value = false;
@@ -1368,7 +1372,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
1368
1372
  toGeojson(e.raw).then(res => {
1369
1373
  emit("update:modelValue", res);
1370
1374
  }).then(() => {
1371
- elementPlus.ElMessage.success("\u4E0A\u4F20\u6210\u529F");
1375
+ elementPlus.ElMessage.success(tr("vkf.esriInputGeojson.uploadSuccess", "\u4E0A\u4F20\u6210\u529F"));
1372
1376
  }).then(fly);
1373
1377
  }
1374
1378
  function onEdit() {
@@ -1445,7 +1449,8 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
1445
1449
  sketchIf,
1446
1450
  fly,
1447
1451
  layerRef,
1448
- getInputModelValue
1452
+ getInputModelValue,
1453
+ tr
1449
1454
  };
1450
1455
  }
1451
1456
  });
@@ -1559,7 +1564,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1559
1564
  vue.createVNode(_component_ElDialog, {
1560
1565
  modelValue: _ctx.dialogShow,
1561
1566
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.dialogShow = $event),
1562
- title: _ctx.dialogEditTitle,
1567
+ title: _ctx.dialogEditTitle || _ctx.tr("vkf.esriInputGeojson.dialogEditTitle", "\u7ED8\u5236\u56FE\u6591"),
1563
1568
  fullscreen: _ctx.dialogEditFullscreen,
1564
1569
  "modal-class": "vkf-esri-input-geojson-dialog",
1565
1570
  "append-to-body": true,
@@ -10,6 +10,7 @@ import SceneView from '@arcgis/core/views/SceneView';
10
10
  import { VkAsyncTeleport } from '@vunk/core';
11
11
  import Graphic from '@arcgis/core/Graphic';
12
12
  import { useComputedReadonly } from '@vunk/form/composables';
13
+ import { useLocale } from '@vunk/form/composables/element-plus';
13
14
  import { Deferred } from '@vunk/core/shared/utils-promise';
14
15
 
15
16
  var EDIT_TYPE = /* @__PURE__ */ ((EDIT_TYPE2) => {
@@ -101,7 +102,7 @@ const props = {
101
102
  },
102
103
  dialogEditTitle: {
103
104
  type: String,
104
- default: "\u7ED8\u5236\u56FE\u6591"
105
+ default: void 0
105
106
  },
106
107
  flying: {
107
108
  type: Boolean,
@@ -1265,8 +1266,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
1265
1266
  }) {
1266
1267
  const inputBindProps = _VkfInputCtx.createBindProps(props2, ["inputSlots", "readonly", "modelValue"]);
1267
1268
  const inputOnEmits = _VkfInputCtx.createOnEmits(emit, ["update:modelValue"]);
1269
+ const {
1270
+ tr
1271
+ } = useLocale();
1268
1272
  const getInputModelValue = v => {
1269
- const emptyStr = "\u6682\u65E0\u6570\u636E";
1273
+ const emptyStr = tr("el.table.emptyText", "\u6682\u65E0\u6570\u636E");
1270
1274
  if (!v) return emptyStr;
1271
1275
  if (!v.features.length) return emptyStr;
1272
1276
  return JSON.stringify(v);
@@ -1313,7 +1317,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
1313
1317
  immediate: true
1314
1318
  });
1315
1319
  const handleUpdateSketchValue = e => {
1316
- sketchValue.value = e;
1320
+ sketchValue.value = Array.isArray(e) ? e : e.toArray();
1317
1321
  if (props2.skipSave) {
1318
1322
  u();
1319
1323
  }
@@ -1337,7 +1341,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
1337
1341
  const doSave = () => {
1338
1342
  u();
1339
1343
  ElMessage({
1340
- message: "\u4FDD\u5B58\u6210\u529F",
1344
+ message: tr("vkf.esriInputGeojson.saveSuccess", "\u4FDD\u5B58\u6210\u529F"),
1341
1345
  type: "success"
1342
1346
  });
1343
1347
  dialogShow.value = false;
@@ -1364,7 +1368,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
1364
1368
  toGeojson(e.raw).then(res => {
1365
1369
  emit("update:modelValue", res);
1366
1370
  }).then(() => {
1367
- ElMessage.success("\u4E0A\u4F20\u6210\u529F");
1371
+ ElMessage.success(tr("vkf.esriInputGeojson.uploadSuccess", "\u4E0A\u4F20\u6210\u529F"));
1368
1372
  }).then(fly);
1369
1373
  }
1370
1374
  function onEdit() {
@@ -1441,7 +1445,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
1441
1445
  sketchIf,
1442
1446
  fly,
1443
1447
  layerRef,
1444
- getInputModelValue
1448
+ getInputModelValue,
1449
+ tr
1445
1450
  };
1446
1451
  }
1447
1452
  });
@@ -1555,7 +1560,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1555
1560
  createVNode(_component_ElDialog, {
1556
1561
  modelValue: _ctx.dialogShow,
1557
1562
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.dialogShow = $event),
1558
- title: _ctx.dialogEditTitle,
1563
+ title: _ctx.dialogEditTitle || _ctx.tr("vkf.esriInputGeojson.dialogEditTitle", "\u7ED8\u5236\u56FE\u6591"),
1559
1564
  fullscreen: _ctx.dialogEditFullscreen,
1560
1565
  "modal-class": "vkf-esri-input-geojson-dialog",
1561
1566
  "append-to-body": true,
@@ -59,7 +59,7 @@ export declare const props: {
59
59
  };
60
60
  dialogEditTitle: {
61
61
  type: StringConstructor;
62
- default: string;
62
+ default: any;
63
63
  };
64
64
  flying: {
65
65
  type: BooleanConstructor;
@@ -59,7 +59,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
59
59
  };
60
60
  dialogEditTitle: {
61
61
  type: StringConstructor;
62
- default: string;
62
+ default: any;
63
63
  };
64
64
  flying: {
65
65
  type: BooleanConstructor;
@@ -375,7 +375,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
375
375
  append: () => JSX.Element;
376
376
  availableCreatureTools: import("vue").ComputedRef<("circle" | "point" | "polygon" | "polyline" | "rectangle")[]>;
377
377
  sketchValue: Ref<Graphic[], Graphic[]>;
378
- handleUpdateSketchValue: (e: __esri.Graphic[]) => void;
378
+ handleUpdateSketchValue: (e: __esri.Collection<__esri.Graphic> | __esri.Graphic[]) => void;
379
379
  sketchRef: Ref<__esri.Sketch, __esri.Sketch>;
380
380
  sketchLoad: __VaSketch.OnLoad;
381
381
  shetchPanel: import("vue").ComputedRef<Element>;
@@ -393,6 +393,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
393
393
  fly: () => Promise<void>;
394
394
  layerRef: Ref<__esri.GraphicsLayer, __esri.GraphicsLayer>;
395
395
  getInputModelValue: (v: import("geojson").FeatureCollection<import("geojson").Geometry, any>) => string;
396
+ tr: import("@vunk/form/composables/element-plus").TranslateWithFallback;
396
397
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
397
398
  'update:modelValue': (e: import("geojson").FeatureCollection) => import("geojson").FeatureCollection<import("geojson").Geometry, {
398
399
  [name: string]: any;
@@ -469,7 +470,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
469
470
  };
470
471
  dialogEditTitle: {
471
472
  type: StringConstructor;
472
- default: string;
473
+ default: any;
473
474
  };
474
475
  flying: {
475
476
  type: BooleanConstructor;
@@ -7,6 +7,7 @@ var utilsVue = require('@vunk/core/shared/utils-vue');
7
7
  var vue = require('vue');
8
8
  var elementPlus$1 = require('@vunk/form/shared/element-plus');
9
9
  var composables = require('@vunk/form/composables');
10
+ var elementPlus$2 = require('@vunk/form/composables/element-plus');
10
11
  var utilsObject = require('@vunk/core/shared/utils-object');
11
12
  var rules = require('@vunk/form/shared/rules');
12
13
  var index = require('../index.cjs');
@@ -191,21 +192,23 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
191
192
  }) {
192
193
  const formItemBindProps = elementPlus$1.createFormItemBindProps(props2, ["rules"]);
193
194
  const readonly = composables.useComputedReadonly(props2);
194
- const globalConfig = elementPlus.useGlobalConfig();
195
- const localeName = vue.computed(() => {
196
- return globalConfig.value?.locale?.name;
197
- });
198
- const requiredMessage = `${props2.label || "\u8BE5\u5B57\u6BB5"}\u4E0D\u80FD\u4E3A\u7A7A`;
195
+ const {
196
+ tr
197
+ } = elementPlus$2.useLocale();
198
+ const getDefaultLabel = () => props2.label || tr("vkf.formItem.defaultField", "\u8BE5\u5B57\u6BB5");
199
199
  const setDefaultMessage = rule => {
200
- if (localeName.value === "zh-cn") {
201
- if (rule.message) return;
202
- if (rule.required) {
203
- rule.message = requiredMessage;
204
- }
205
- const ruleInfo = rules.PATTERN_OPTIONS.find(i => i.value === rule.pattern);
206
- if (ruleInfo) {
207
- rule.message = `\u8F93\u5165 ${props2.label || "\u8BE5\u5B57\u6BB5"} ${ruleInfo.title}`;
208
- }
200
+ if (rule.message) return;
201
+ if (rule.required) {
202
+ rule.message = tr("vkf.formItem.required", "{label}\u4E0D\u80FD\u4E3A\u7A7A", {
203
+ label: getDefaultLabel()
204
+ });
205
+ }
206
+ const ruleInfo = rules.PATTERN_OPTIONS.find(i => i.value === rule.pattern);
207
+ if (ruleInfo) {
208
+ rule.message = tr("vkf.formItem.pattern", "\u8F93\u5165 {label} {pattern}", {
209
+ label: getDefaultLabel(),
210
+ pattern: ruleInfo.title
211
+ });
209
212
  }
210
213
  };
211
214
  const rules$1 = vue.computed(() => {
@@ -1,8 +1,9 @@
1
- import { formItemProps, ElFormItem, ElTooltip, ElIcon, ElButton, useGlobalConfig } from 'element-plus';
1
+ import { formItemProps, ElFormItem, ElTooltip, ElIcon, ElButton } from 'element-plus';
2
2
  import { bindPropsFactory } from '@vunk/core/shared/utils-vue';
3
3
  import { defineComponent, openBlock, createBlock, mergeProps, withCtx, renderSlot, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, normalizeProps, guardReactiveProps, createVNode, computed, h } from 'vue';
4
4
  import { createFormItemBindProps } from '@vunk/form/shared/element-plus';
5
5
  import { useComputedReadonly, useRendererData } from '@vunk/form/composables';
6
+ import { useLocale } from '@vunk/form/composables/element-plus';
6
7
  import { isPlainObject } from '@vunk/core/shared/utils-object';
7
8
  import { PATTERN_OPTIONS } from '@vunk/form/shared/rules';
8
9
  import { w as warning_default } from '../index.mjs';
@@ -187,21 +188,23 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
187
188
  }) {
188
189
  const formItemBindProps = createFormItemBindProps(props2, ["rules"]);
189
190
  const readonly = useComputedReadonly(props2);
190
- const globalConfig = useGlobalConfig();
191
- const localeName = computed(() => {
192
- return globalConfig.value?.locale?.name;
193
- });
194
- const requiredMessage = `${props2.label || "\u8BE5\u5B57\u6BB5"}\u4E0D\u80FD\u4E3A\u7A7A`;
191
+ const {
192
+ tr
193
+ } = useLocale();
194
+ const getDefaultLabel = () => props2.label || tr("vkf.formItem.defaultField", "\u8BE5\u5B57\u6BB5");
195
195
  const setDefaultMessage = rule => {
196
- if (localeName.value === "zh-cn") {
197
- if (rule.message) return;
198
- if (rule.required) {
199
- rule.message = requiredMessage;
200
- }
201
- const ruleInfo = PATTERN_OPTIONS.find(i => i.value === rule.pattern);
202
- if (ruleInfo) {
203
- rule.message = `\u8F93\u5165 ${props2.label || "\u8BE5\u5B57\u6BB5"} ${ruleInfo.title}`;
204
- }
196
+ if (rule.message) return;
197
+ if (rule.required) {
198
+ rule.message = tr("vkf.formItem.required", "{label}\u4E0D\u80FD\u4E3A\u7A7A", {
199
+ label: getDefaultLabel()
200
+ });
201
+ }
202
+ const ruleInfo = PATTERN_OPTIONS.find(i => i.value === rule.pattern);
203
+ if (ruleInfo) {
204
+ rule.message = tr("vkf.formItem.pattern", "\u8F93\u5165 {label} {pattern}", {
205
+ label: getDefaultLabel(),
206
+ pattern: ruleInfo.title
207
+ });
205
208
  }
206
209
  };
207
210
  const rules = computed(() => {
@@ -12,8 +12,9 @@ var rendererData = require('@vunk/form/components/renderer-data');
12
12
  var templateInstancesProvider = require('@vunk/form/components/template-instances-provider');
13
13
  var templatesDefault = require('@vunk/form/components/templates-default');
14
14
  var composables = require('@vunk/form/composables');
15
+ var elementPlus = require('@vunk/form/composables/element-plus');
15
16
  var tableColumns = require('@vunk/plus/components/table-columns');
16
- var elementPlus = require('element-plus');
17
+ var elementPlus$1 = require('element-plus');
17
18
  var _function = require('@vunk/shared/function');
18
19
  var cloneDeep = require('../cloneDeep.cjs');
19
20
  var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
@@ -97,9 +98,12 @@ var _sfc_main$1 = /* @__PURE__ */vue.defineComponent({
97
98
  emit: __emit
98
99
  }) {
99
100
  __expose();
100
- const ElTable = elementPlus.ElTable;
101
+ const ElTable = elementPlus$1.ElTable;
101
102
  const props = __props;
102
103
  const emit = __emit;
104
+ const {
105
+ tr
106
+ } = elementPlus.useLocale();
103
107
  const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props);
104
108
  const readonly = composables.useComputedReadonly(props);
105
109
  const formData = vue.computed(() => {
@@ -175,21 +179,21 @@ var _sfc_main$1 = /* @__PURE__ */vue.defineComponent({
175
179
  }
176
180
  };
177
181
  const buttonsColumn = vue.computed(() => ({
178
- label: "\u64CD\u4F5C",
182
+ label: tr("vkf.inputCollection.operations", "\u64CD\u4F5C"),
179
183
  align: "center",
180
184
  width: "85",
181
185
  hidden: readonly.value || !props.splicable,
182
186
  className: "vk-input-collection__buttons",
183
187
  slots: ({
184
188
  $index
185
- }) => vue.createVNode(vue.Fragment, null, [vue.createVNode(elementPlus.ElButton, {
189
+ }) => vue.createVNode(vue.Fragment, null, [vue.createVNode(elementPlus$1.ElButton, {
186
190
  "size": "small",
187
191
  "icon": index.plus_default,
188
192
  "type": "primary",
189
193
  "link": true,
190
194
  "circle": true,
191
195
  "onClick": () => handlePlus($index)
192
- }, null), vue.createVNode(elementPlus.ElButton, {
196
+ }, null), vue.createVNode(elementPlus$1.ElButton, {
193
197
  "size": "small",
194
198
  "icon": index.minus_default,
195
199
  "type": "primary",
@@ -270,6 +274,7 @@ var _sfc_main$1 = /* @__PURE__ */vue.defineComponent({
270
274
  ElTable,
271
275
  props,
272
276
  emit,
277
+ tr,
273
278
  formItemBindProps,
274
279
  readonly,
275
280
  formData,
@@ -310,7 +315,7 @@ var _sfc_main$1 = /* @__PURE__ */vue.defineComponent({
310
315
  return tableColumns.VkTableColumns;
311
316
  },
312
317
  get ElButton() {
313
- return elementPlus.ElButton;
318
+ return elementPlus$1.ElButton;
314
319
  }
315
320
  };
316
321
  Object.defineProperty(__returned__, "__isScriptSetup", {
@@ -8,6 +8,7 @@ import { VkfRendererData } from '@vunk/form/components/renderer-data';
8
8
  import { VkfTemplateInstancesProvider } from '@vunk/form/components/template-instances-provider';
9
9
  import { VkfTemplatesDefault } from '@vunk/form/components/templates-default';
10
10
  import { useComputedReadonly } from '@vunk/form/composables';
11
+ import { useLocale } from '@vunk/form/composables/element-plus';
11
12
  import { VkTableColumns } from '@vunk/plus/components/table-columns';
12
13
  import { ElButton, ElTable } from 'element-plus';
13
14
  import { isCallable } from '@vunk/shared/function';
@@ -96,6 +97,9 @@ var _sfc_main$1 = /* @__PURE__ */defineComponent({
96
97
  const ElTable$1 = ElTable;
97
98
  const props = __props;
98
99
  const emit = __emit;
100
+ const {
101
+ tr
102
+ } = useLocale();
99
103
  const formItemBindProps = _VkfFormItemCtx.createBindProps(props);
100
104
  const readonly = useComputedReadonly(props);
101
105
  const formData = computed(() => {
@@ -171,7 +175,7 @@ var _sfc_main$1 = /* @__PURE__ */defineComponent({
171
175
  }
172
176
  };
173
177
  const buttonsColumn = computed(() => ({
174
- label: "\u64CD\u4F5C",
178
+ label: tr("vkf.inputCollection.operations", "\u64CD\u4F5C"),
175
179
  align: "center",
176
180
  width: "85",
177
181
  hidden: readonly.value || !props.splicable,
@@ -266,6 +270,7 @@ var _sfc_main$1 = /* @__PURE__ */defineComponent({
266
270
  ElTable: ElTable$1,
267
271
  props,
268
272
  emit,
273
+ tr,
269
274
  formItemBindProps,
270
275
  readonly,
271
276
  formData,
@@ -267,6 +267,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
267
267
  "onUpdate:modelValue"?: (...args: any[] | unknown[]) => any;
268
268
  }> & {}>;
269
269
  emit: ((event: "update:modelValue", ...args: unknown[]) => void) & ((event: "update:modelValue", ...args: any) => void) & ((event: "update:modelValue", ...args: any[]) => void);
270
+ tr: import("@vunk/form/composables/element-plus").TranslateWithFallback;
270
271
  formItemBindProps: import("vue").ComputedRef<{}>;
271
272
  readonly: import("vue").ComputedRef<boolean>;
272
273
  formData: import("vue").ComputedRef<NormalObject | NormalObject[]>;
@@ -4,10 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var input = require('@vunk/form/components/input');
6
6
  var vue = require('vue');
7
- var elementPlus = require('element-plus');
7
+ var elementPlus$1 = require('element-plus');
8
8
  var index = require('../index.cjs');
9
9
  var utilsObject = require('@vunk/core/shared/utils-object');
10
10
  var composables = require('@vunk/form/composables');
11
+ var elementPlus = require('@vunk/form/composables/element-plus');
11
12
  var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
12
13
 
13
14
  const props = {
@@ -22,11 +23,11 @@ const props = {
22
23
  },
23
24
  label: {
24
25
  type: String,
25
- default: "\u56DE\u586B\u5730\u5740"
26
+ default: void 0
26
27
  },
27
28
  placeholder: {
28
29
  type: String,
29
- default: "\u4E0A\u4F20\u6587\u4EF6\u540E, \u5C06\u6587\u4EF6\u4E0B\u8F7D\u5730\u5740\u7C98\u8D34\u5230\u6B64\u5904"
30
+ default: void 0
30
31
  },
31
32
  readonly: {
32
33
  type: Boolean,
@@ -58,7 +59,7 @@ const props = {
58
59
  */
59
60
  referenceLabel: {
60
61
  type: String,
61
- default: "\u53C2\u8003\u5730\u5740"
62
+ default: void 0
62
63
  },
63
64
  modelValue: {
64
65
  type: String,
@@ -80,14 +81,18 @@ var _sfc_main = vue.defineComponent({
80
81
  const coreProps = input._VkfInputCtx.createBindProps(props2);
81
82
  const coreEmits = input._VkfInputCtx.createOnEmits(emit);
82
83
  const readonly = composables.useComputedReadonly(props2);
84
+ const { tr } = elementPlus.useLocale();
85
+ const inputLabel = vue.computed(() => props2.label || tr("vkf.inputLink.label", "\u56DE\u586B\u5730\u5740"));
86
+ const inputPlaceholder = vue.computed(() => props2.placeholder || tr("vkf.inputLink.placeholder", "\u4E0A\u4F20\u6587\u4EF6\u540E, \u5C06\u6587\u4EF6\u4E0B\u8F7D\u5730\u5740\u7C98\u8D34\u5230\u6B64\u5904"));
87
+ const theReferenceLabel = vue.computed(() => props2.referenceLabel || tr("vkf.inputLink.referenceLabel", "\u53C2\u8003\u5730\u5740"));
83
88
  const createAppendEl = (url) => () => vue.h(
84
- elementPlus.ElButton,
89
+ elementPlus$1.ElButton,
85
90
  {
86
91
  onClick: () => window.open(url),
87
92
  disabled: !url
88
93
  },
89
94
  () => vue.h(
90
- elementPlus.ElIcon,
95
+ elementPlus$1.ElIcon,
91
96
  {
92
97
  class: "vkf-input-link-icon",
93
98
  size: 16
@@ -99,7 +104,7 @@ var _sfc_main = vue.defineComponent({
99
104
  const data = [
100
105
  {
101
106
  pattern: /^(http|https):\/\/([\w.]+\/?)\S*$/,
102
- message: "\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u94FE\u63A5\u5730\u5740"
107
+ message: tr("vkf.inputLink.invalidUrl", "\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u94FE\u63A5\u5730\u5740")
103
108
  }
104
109
  ];
105
110
  if (Array.isArray(props2.rules)) {
@@ -114,7 +119,10 @@ var _sfc_main = vue.defineComponent({
114
119
  coreProps,
115
120
  coreEmits,
116
121
  createAppendEl,
122
+ inputLabel,
123
+ inputPlaceholder,
117
124
  rules,
125
+ theReferenceLabel,
118
126
  readonly
119
127
  };
120
128
  }
@@ -125,7 +133,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
125
133
  const _component_VkfInput = vue.resolveComponent("VkfInput");
126
134
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
127
135
  vue.createVNode(_component_VkfInput, {
128
- label: _ctx.referenceLabel,
136
+ label: _ctx.theReferenceLabel,
129
137
  disabled: true,
130
138
  "model-value": _ctx.referenceUrl ?? _ctx.uploadUrl,
131
139
  "input-slots": {
@@ -133,13 +141,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
133
141
  }
134
142
  }, null, 8, ["label", "model-value", "input-slots"]),
135
143
  !_ctx.referenceOnly ? (vue.openBlock(), vue.createBlock(_component_VkfInput, vue.mergeProps({ key: 0 }, _ctx.coreProps, {
144
+ label: _ctx.inputLabel,
145
+ placeholder: _ctx.inputPlaceholder,
136
146
  rules: _ctx.rules,
137
147
  readonly: _ctx.readonly,
138
148
  type: _ctx.readonly ? "text" : _ctx.type,
139
149
  "input-slots": {
140
150
  append: _ctx.readonly ? _ctx.createAppendEl(_ctx.modelValue) : void 0
141
151
  }
142
- }, vue.toHandlers(_ctx.coreEmits)), null, 16, ["rules", "readonly", "type", "input-slots"])) : vue.createCommentVNode("v-if", true)
152
+ }, vue.toHandlers(_ctx.coreEmits)), null, 16, ["label", "placeholder", "rules", "readonly", "type", "input-slots"])) : vue.createCommentVNode("v-if", true)
143
153
  ]);
144
154
  }
145
155
  var VkfInputLink = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/input-link/src/index.vue"]]);
@@ -4,6 +4,7 @@ import { ElButton, ElIcon } from 'element-plus';
4
4
  import { r as right_default } from '../index.mjs';
5
5
  import { isPlainObject } from '@vunk/core/shared/utils-object';
6
6
  import { useComputedReadonly } from '@vunk/form/composables';
7
+ import { useLocale } from '@vunk/form/composables/element-plus';
7
8
  import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
8
9
 
9
10
  const props = {
@@ -18,11 +19,11 @@ const props = {
18
19
  },
19
20
  label: {
20
21
  type: String,
21
- default: "\u56DE\u586B\u5730\u5740"
22
+ default: void 0
22
23
  },
23
24
  placeholder: {
24
25
  type: String,
25
- default: "\u4E0A\u4F20\u6587\u4EF6\u540E, \u5C06\u6587\u4EF6\u4E0B\u8F7D\u5730\u5740\u7C98\u8D34\u5230\u6B64\u5904"
26
+ default: void 0
26
27
  },
27
28
  readonly: {
28
29
  type: Boolean,
@@ -54,7 +55,7 @@ const props = {
54
55
  */
55
56
  referenceLabel: {
56
57
  type: String,
57
- default: "\u53C2\u8003\u5730\u5740"
58
+ default: void 0
58
59
  },
59
60
  modelValue: {
60
61
  type: String,
@@ -76,6 +77,10 @@ var _sfc_main = defineComponent({
76
77
  const coreProps = _VkfInputCtx.createBindProps(props2);
77
78
  const coreEmits = _VkfInputCtx.createOnEmits(emit);
78
79
  const readonly = useComputedReadonly(props2);
80
+ const { tr } = useLocale();
81
+ const inputLabel = computed(() => props2.label || tr("vkf.inputLink.label", "\u56DE\u586B\u5730\u5740"));
82
+ const inputPlaceholder = computed(() => props2.placeholder || tr("vkf.inputLink.placeholder", "\u4E0A\u4F20\u6587\u4EF6\u540E, \u5C06\u6587\u4EF6\u4E0B\u8F7D\u5730\u5740\u7C98\u8D34\u5230\u6B64\u5904"));
83
+ const theReferenceLabel = computed(() => props2.referenceLabel || tr("vkf.inputLink.referenceLabel", "\u53C2\u8003\u5730\u5740"));
79
84
  const createAppendEl = (url) => () => h(
80
85
  ElButton,
81
86
  {
@@ -95,7 +100,7 @@ var _sfc_main = defineComponent({
95
100
  const data = [
96
101
  {
97
102
  pattern: /^(http|https):\/\/([\w.]+\/?)\S*$/,
98
- message: "\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u94FE\u63A5\u5730\u5740"
103
+ message: tr("vkf.inputLink.invalidUrl", "\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u94FE\u63A5\u5730\u5740")
99
104
  }
100
105
  ];
101
106
  if (Array.isArray(props2.rules)) {
@@ -110,7 +115,10 @@ var _sfc_main = defineComponent({
110
115
  coreProps,
111
116
  coreEmits,
112
117
  createAppendEl,
118
+ inputLabel,
119
+ inputPlaceholder,
113
120
  rules,
121
+ theReferenceLabel,
114
122
  readonly
115
123
  };
116
124
  }
@@ -121,7 +129,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
121
129
  const _component_VkfInput = resolveComponent("VkfInput");
122
130
  return openBlock(), createElementBlock("div", _hoisted_1, [
123
131
  createVNode(_component_VkfInput, {
124
- label: _ctx.referenceLabel,
132
+ label: _ctx.theReferenceLabel,
125
133
  disabled: true,
126
134
  "model-value": _ctx.referenceUrl ?? _ctx.uploadUrl,
127
135
  "input-slots": {
@@ -129,13 +137,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
129
137
  }
130
138
  }, null, 8, ["label", "model-value", "input-slots"]),
131
139
  !_ctx.referenceOnly ? (openBlock(), createBlock(_component_VkfInput, mergeProps({ key: 0 }, _ctx.coreProps, {
140
+ label: _ctx.inputLabel,
141
+ placeholder: _ctx.inputPlaceholder,
132
142
  rules: _ctx.rules,
133
143
  readonly: _ctx.readonly,
134
144
  type: _ctx.readonly ? "text" : _ctx.type,
135
145
  "input-slots": {
136
146
  append: _ctx.readonly ? _ctx.createAppendEl(_ctx.modelValue) : void 0
137
147
  }
138
- }, toHandlers(_ctx.coreEmits)), null, 16, ["rules", "readonly", "type", "input-slots"])) : createCommentVNode("v-if", true)
148
+ }, toHandlers(_ctx.coreEmits)), null, 16, ["label", "placeholder", "rules", "readonly", "type", "input-slots"])) : createCommentVNode("v-if", true)
139
149
  ]);
140
150
  }
141
151
  var VkfInputLink = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/input-link/src/index.vue"]]);
@@ -9,11 +9,11 @@ export declare const props: {
9
9
  };
10
10
  label: {
11
11
  type: StringConstructor;
12
- default: string;
12
+ default: any;
13
13
  };
14
14
  placeholder: {
15
15
  type: StringConstructor;
16
- default: string;
16
+ default: any;
17
17
  };
18
18
  readonly: {
19
19
  type: BooleanConstructor;
@@ -45,7 +45,7 @@ export declare const props: {
45
45
  */
46
46
  referenceLabel: {
47
47
  type: StringConstructor;
48
- default: string;
48
+ default: any;
49
49
  };
50
50
  modelValue: {
51
51
  type: StringConstructor;