@vunk/form 2.18.0 → 2.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,12 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var vue = require('vue');
6
6
  var formItem = require('@vunk/form/components/form-item');
7
7
  var composables = require('@vunk/form/composables');
8
- var elementPlus = require('element-plus');
8
+ var elementPlus$1 = require('element-plus');
9
9
  var core = require('@vunk/core');
10
10
  var templatesDefault = require('@vunk/form/components/templates-default');
11
11
  var templateInstancesProvider = require('@vunk/form/components/template-instances-provider');
12
12
  var formItemRenderer = require('@vunk/form/components/form-item-renderer');
13
13
  var rendererData = require('@vunk/form/components/renderer-data');
14
+ var elementPlus = require('@vunk/form/composables/element-plus');
14
15
  var _function = require('@vunk/shared/function');
15
16
  var index = require('../index.cjs');
16
17
  var cloneDeep = require('../cloneDeep.cjs');
@@ -96,6 +97,7 @@ var _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
96
97
  const emit = __emit;
97
98
  const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props);
98
99
  const readonly = composables.useComputedReadonly(props);
100
+ const { tr } = elementPlus.useLocale();
99
101
  const formData = vue.computed(() => {
100
102
  if (!props.prop || props.prop.length === 0) {
101
103
  return props.modelValue;
@@ -158,14 +160,14 @@ var _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
158
160
  return formItemProps;
159
161
  });
160
162
  }
161
- const __returned__ = { props, emit, formItemBindProps, readonly, formData, handlePlus, handleMinus, handleFormSetData, createTheFormItems, get VkfFormItem() {
163
+ const __returned__ = { props, emit, formItemBindProps, readonly, tr, formData, handlePlus, handleMinus, handleFormSetData, createTheFormItems, get VkfFormItem() {
162
164
  return formItem.VkfFormItem;
163
165
  }, get ElButton() {
164
- return elementPlus.ElButton;
166
+ return elementPlus$1.ElButton;
165
167
  }, get ElCard() {
166
- return elementPlus.ElCard;
168
+ return elementPlus$1.ElCard;
167
169
  }, get ElEmpty() {
168
- return elementPlus.ElEmpty;
170
+ return elementPlus$1.ElEmpty;
169
171
  }, get VkfTemplatesDefault() {
170
172
  return templatesDefault.VkfTemplatesDefault;
171
173
  }, get VkfTemplateInstancesProvider() {
@@ -206,18 +208,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
206
208
  type: "primary",
207
209
  onClick: _cache[1] || (_cache[1] = ($event) => $setup.handlePlus(-1))
208
210
  }, {
209
- default: vue.withCtx(() => _cache[3] || (_cache[3] = [
210
- vue.createTextVNode(" \u6DFB\u52A0 ")
211
- ])),
212
- _: 1,
213
- __: [3]
211
+ default: vue.withCtx(() => [
212
+ vue.createTextVNode(
213
+ vue.toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
214
+ 1
215
+ /* TEXT */
216
+ )
217
+ ]),
218
+ _: 1
219
+ /* STABLE */
214
220
  })
215
221
  ])) : vue.createCommentVNode("v-if", true),
216
222
  !_ctx.modelValue?.length ? (vue.openBlock(), vue.createBlock($setup["ElEmpty"], {
217
223
  key: 1,
218
224
  class: "vkf-card-input-collection-empty"
219
225
  }, {
220
- image: vue.withCtx(() => _cache[4] || (_cache[4] = [
226
+ image: vue.withCtx(() => _cache[2] || (_cache[2] = [
221
227
  vue.createTextVNode(vue.toDisplayString(""))
222
228
  ])),
223
229
  _: 1
@@ -255,22 +261,30 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
255
261
  type: "primary",
256
262
  onClick: () => $setup.handlePlus(index)
257
263
  }, {
258
- default: vue.withCtx(() => [..._cache[5] || (_cache[5] = [
259
- vue.createTextVNode(" \u6DFB\u52A0 ")
260
- ])]),
261
- _: 2,
262
- __: [5]
264
+ default: vue.withCtx(() => [
265
+ vue.createTextVNode(
266
+ vue.toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
267
+ 1
268
+ /* TEXT */
269
+ )
270
+ ]),
271
+ _: 2
272
+ /* DYNAMIC */
263
273
  }, 1032, ["onClick"]),
264
274
  vue.createVNode($setup["ElButton"], {
265
275
  type: "danger",
266
276
  disabled: _ctx.modelValue.length <= 1 && $setup.props.keepLast,
267
277
  onClick: () => $setup.handleMinus(index)
268
278
  }, {
269
- default: vue.withCtx(() => [..._cache[6] || (_cache[6] = [
270
- vue.createTextVNode(" \u5220\u9664 ")
271
- ])]),
272
- _: 2,
273
- __: [6]
279
+ default: vue.withCtx(() => [
280
+ vue.createTextVNode(
281
+ vue.toDisplayString($setup.tr("vkf.common.delete", "\u5220\u9664")),
282
+ 1
283
+ /* TEXT */
284
+ )
285
+ ]),
286
+ _: 2
287
+ /* DYNAMIC */
274
288
  }, 1032, ["disabled", "onClick"])
275
289
  ])
276
290
  ]),
@@ -302,11 +316,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
302
316
  icon: $setup.Plus,
303
317
  onClick: _cache[0] || (_cache[0] = ($event) => $setup.handlePlus(-1))
304
318
  }, {
305
- default: vue.withCtx(() => _cache[2] || (_cache[2] = [
306
- vue.createTextVNode(" \u6DFB\u52A0 ")
307
- ])),
308
- _: 1,
309
- __: [2]
319
+ default: vue.withCtx(() => [
320
+ vue.createTextVNode(
321
+ vue.toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
322
+ 1
323
+ /* TEXT */
324
+ )
325
+ ]),
326
+ _: 1
327
+ /* STABLE */
310
328
  }, 8, ["icon"])) : vue.createCommentVNode("v-if", true)
311
329
  ]),
312
330
  key: "0"
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, openBlock, createBlock, withCtx, createVNode, mergeProps, createSlots, createElementBlock, createTextVNode, createCommentVNode, toDisplayString, Fragment, renderList, createElementVNode, renderSlot, h } from 'vue';
1
+ import { defineComponent, computed, openBlock, createBlock, withCtx, createVNode, mergeProps, createSlots, createElementBlock, createTextVNode, toDisplayString, createCommentVNode, Fragment, renderList, createElementVNode, renderSlot, h } from 'vue';
2
2
  import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
3
3
  import { useComputedReadonly } from '@vunk/form/composables';
4
4
  import { ElButton, ElCard, ElEmpty } from 'element-plus';
@@ -7,6 +7,7 @@ import { VkfTemplatesDefault } from '@vunk/form/components/templates-default';
7
7
  import { VkfTemplateInstancesProvider } from '@vunk/form/components/template-instances-provider';
8
8
  import { VkfFormItemRenderer } from '@vunk/form/components/form-item-renderer';
9
9
  import { VkfRendererData } from '@vunk/form/components/renderer-data';
10
+ import { useLocale } from '@vunk/form/composables/element-plus';
10
11
  import { isCallable } from '@vunk/shared/function';
11
12
  import { p as plus_default } from '../index.mjs';
12
13
  import { c as cloneDeep } from '../cloneDeep.mjs';
@@ -92,6 +93,7 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
92
93
  const emit = __emit;
93
94
  const formItemBindProps = _VkfFormItemCtx.createBindProps(props);
94
95
  const readonly = useComputedReadonly(props);
96
+ const { tr } = useLocale();
95
97
  const formData = computed(() => {
96
98
  if (!props.prop || props.prop.length === 0) {
97
99
  return props.modelValue;
@@ -154,7 +156,7 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
154
156
  return formItemProps;
155
157
  });
156
158
  }
157
- const __returned__ = { props, emit, formItemBindProps, readonly, formData, handlePlus, handleMinus, handleFormSetData, createTheFormItems, get VkfFormItem() {
159
+ const __returned__ = { props, emit, formItemBindProps, readonly, tr, formData, handlePlus, handleMinus, handleFormSetData, createTheFormItems, get VkfFormItem() {
158
160
  return VkfFormItem;
159
161
  }, get ElButton() {
160
162
  return ElButton;
@@ -202,18 +204,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
202
204
  type: "primary",
203
205
  onClick: _cache[1] || (_cache[1] = ($event) => $setup.handlePlus(-1))
204
206
  }, {
205
- default: withCtx(() => _cache[3] || (_cache[3] = [
206
- createTextVNode(" \u6DFB\u52A0 ")
207
- ])),
208
- _: 1,
209
- __: [3]
207
+ default: withCtx(() => [
208
+ createTextVNode(
209
+ toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
210
+ 1
211
+ /* TEXT */
212
+ )
213
+ ]),
214
+ _: 1
215
+ /* STABLE */
210
216
  })
211
217
  ])) : createCommentVNode("v-if", true),
212
218
  !_ctx.modelValue?.length ? (openBlock(), createBlock($setup["ElEmpty"], {
213
219
  key: 1,
214
220
  class: "vkf-card-input-collection-empty"
215
221
  }, {
216
- image: withCtx(() => _cache[4] || (_cache[4] = [
222
+ image: withCtx(() => _cache[2] || (_cache[2] = [
217
223
  createTextVNode(toDisplayString(""))
218
224
  ])),
219
225
  _: 1
@@ -251,22 +257,30 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
251
257
  type: "primary",
252
258
  onClick: () => $setup.handlePlus(index)
253
259
  }, {
254
- default: withCtx(() => [..._cache[5] || (_cache[5] = [
255
- createTextVNode(" \u6DFB\u52A0 ")
256
- ])]),
257
- _: 2,
258
- __: [5]
260
+ default: withCtx(() => [
261
+ createTextVNode(
262
+ toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
263
+ 1
264
+ /* TEXT */
265
+ )
266
+ ]),
267
+ _: 2
268
+ /* DYNAMIC */
259
269
  }, 1032, ["onClick"]),
260
270
  createVNode($setup["ElButton"], {
261
271
  type: "danger",
262
272
  disabled: _ctx.modelValue.length <= 1 && $setup.props.keepLast,
263
273
  onClick: () => $setup.handleMinus(index)
264
274
  }, {
265
- default: withCtx(() => [..._cache[6] || (_cache[6] = [
266
- createTextVNode(" \u5220\u9664 ")
267
- ])]),
268
- _: 2,
269
- __: [6]
275
+ default: withCtx(() => [
276
+ createTextVNode(
277
+ toDisplayString($setup.tr("vkf.common.delete", "\u5220\u9664")),
278
+ 1
279
+ /* TEXT */
280
+ )
281
+ ]),
282
+ _: 2
283
+ /* DYNAMIC */
270
284
  }, 1032, ["disabled", "onClick"])
271
285
  ])
272
286
  ]),
@@ -298,11 +312,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
298
312
  icon: $setup.Plus,
299
313
  onClick: _cache[0] || (_cache[0] = ($event) => $setup.handlePlus(-1))
300
314
  }, {
301
- default: withCtx(() => _cache[2] || (_cache[2] = [
302
- createTextVNode(" \u6DFB\u52A0 ")
303
- ])),
304
- _: 1,
305
- __: [2]
315
+ default: withCtx(() => [
316
+ createTextVNode(
317
+ toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
318
+ 1
319
+ /* TEXT */
320
+ )
321
+ ]),
322
+ _: 1
323
+ /* STABLE */
306
324
  }, 8, ["icon"])) : createCommentVNode("v-if", true)
307
325
  ]),
308
326
  key: "0"
@@ -261,6 +261,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
261
261
  emit: ((event: "update:modelValue", ...args: unknown[]) => void) & ((event: "update:modelValue", ...args: any) => void) & ((event: "update:modelValue", ...args: any[]) => void);
262
262
  formItemBindProps: import("vue").ComputedRef<{}>;
263
263
  readonly: import("vue").ComputedRef<boolean>;
264
+ tr: import("@vunk/form/composables/element-plus").TranslateWithFallback;
264
265
  formData: import("vue").ComputedRef<NormalObject | NormalObject[]>;
265
266
  handlePlus: (index: number) => void;
266
267
  handleMinus: (index: number) => void;
@@ -349,7 +349,7 @@ var _sfc_main = /* @__PURE__ */vue.defineComponent({
349
349
  });
350
350
  });
351
351
  const buttonsColumn = vue.computed(() => ({
352
- label: tr("vkf.dialogInputCollection.operations", "\u64CD\u4F5C"),
352
+ label: tr("vkf.common.operations", "\u64CD\u4F5C"),
353
353
  align: "center",
354
354
  width: "85",
355
355
  hidden: readonly.value || !props.splicable,
@@ -371,7 +371,7 @@ var _sfc_main = /* @__PURE__ */vue.defineComponent({
371
371
  }, null), vue.createVNode(elementPlus$1.ElPopconfirm, {
372
372
  "title": tr("vkf.dialogInputCollection.deleteConfirm", "\u786E\u5B9A\u5220\u9664\u5417\uFF1F"),
373
373
  "onConfirm": () => handleMinus($index),
374
- "confirmButtonText": tr("el.upload.delete", "\u5220\u9664"),
374
+ "confirmButtonText": tr("vkf.common.delete", "\u5220\u9664"),
375
375
  "cancelButtonText": tr("el.popconfirm.cancelButtonText", "\u53D6\u6D88")
376
376
  }, {
377
377
  reference: () => vue.createVNode(elementPlus$1.ElButton, {
@@ -520,7 +520,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
520
520
  }, {
521
521
  default: vue.withCtx(() => [
522
522
  vue.createTextVNode(
523
- vue.toDisplayString($setup.tr("vkf.dialogInputCollection.add", "\u6DFB\u52A0")),
523
+ vue.toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
524
524
  1
525
525
  /* TEXT */
526
526
  )
@@ -555,7 +555,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
555
555
  }, {
556
556
  default: vue.withCtx(() => [
557
557
  vue.createTextVNode(
558
- vue.toDisplayString($setup.tr("vkf.dialogInputCollection.add", "\u6DFB\u52A0")),
558
+ vue.toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
559
559
  1
560
560
  /* TEXT */
561
561
  )
@@ -345,7 +345,7 @@ var _sfc_main = /* @__PURE__ */defineComponent({
345
345
  });
346
346
  });
347
347
  const buttonsColumn = computed(() => ({
348
- label: tr("vkf.dialogInputCollection.operations", "\u64CD\u4F5C"),
348
+ label: tr("vkf.common.operations", "\u64CD\u4F5C"),
349
349
  align: "center",
350
350
  width: "85",
351
351
  hidden: readonly.value || !props.splicable,
@@ -367,7 +367,7 @@ var _sfc_main = /* @__PURE__ */defineComponent({
367
367
  }, null), createVNode(ElPopconfirm, {
368
368
  "title": tr("vkf.dialogInputCollection.deleteConfirm", "\u786E\u5B9A\u5220\u9664\u5417\uFF1F"),
369
369
  "onConfirm": () => handleMinus($index),
370
- "confirmButtonText": tr("el.upload.delete", "\u5220\u9664"),
370
+ "confirmButtonText": tr("vkf.common.delete", "\u5220\u9664"),
371
371
  "cancelButtonText": tr("el.popconfirm.cancelButtonText", "\u53D6\u6D88")
372
372
  }, {
373
373
  reference: () => createVNode(ElButton, {
@@ -516,7 +516,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
516
516
  }, {
517
517
  default: withCtx(() => [
518
518
  createTextVNode(
519
- toDisplayString($setup.tr("vkf.dialogInputCollection.add", "\u6DFB\u52A0")),
519
+ toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
520
520
  1
521
521
  /* TEXT */
522
522
  )
@@ -551,7 +551,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
551
551
  }, {
552
552
  default: withCtx(() => [
553
553
  createTextVNode(
554
- toDisplayString($setup.tr("vkf.dialogInputCollection.add", "\u6DFB\u52A0")),
554
+ toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
555
555
  1
556
556
  /* TEXT */
557
557
  )
@@ -4,9 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
6
  var formItem = require('@vunk/form/components/form-item');
7
- var elementPlus = require('element-plus');
7
+ var elementPlus$1 = require('element-plus');
8
8
  var index = require('../index.cjs');
9
9
  var composables = require('@vunk/form/composables');
10
+ var elementPlus = require('@vunk/form/composables/element-plus');
10
11
  var formItemRenderer = require('@vunk/form/components/form-item-renderer');
11
12
  var templateInstancesProvider = require('@vunk/form/components/template-instances-provider');
12
13
  var templatesDefault = require('@vunk/form/components/templates-default');
@@ -83,6 +84,9 @@ var _sfc_main$1 = /* @__PURE__ */vue.defineComponent({
83
84
  const emit = __emit;
84
85
  const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props);
85
86
  const readonly = composables.useComputedReadonly(props);
87
+ const {
88
+ tr
89
+ } = elementPlus.useLocale();
86
90
  const addToFirst = () => {
87
91
  const data = props.modelValue ? [...props.modelValue] : [];
88
92
  if (props.buttonAdd === "push") {
@@ -143,6 +147,7 @@ var _sfc_main$1 = /* @__PURE__ */vue.defineComponent({
143
147
  emit,
144
148
  formItemBindProps,
145
149
  readonly,
150
+ tr,
146
151
  addToFirst,
147
152
  hasMinus,
148
153
  formData,
@@ -153,7 +158,7 @@ var _sfc_main$1 = /* @__PURE__ */vue.defineComponent({
153
158
  return formItem.VkfFormItem;
154
159
  },
155
160
  get ElButton() {
156
- return elementPlus.ElButton;
161
+ return elementPlus$1.ElButton;
157
162
  },
158
163
  get Plus() {
159
164
  return index.plus_default;
@@ -197,11 +202,15 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
197
202
  type: "primary",
198
203
  onClick: $setup.addToFirst
199
204
  }, {
200
- default: vue.withCtx(() => _cache[1] || (_cache[1] = [
201
- vue.createTextVNode(" \u6DFB\u52A0 ")
202
- ])),
203
- _: 1,
204
- __: [1]
205
+ default: vue.withCtx(() => [
206
+ vue.createTextVNode(
207
+ vue.toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
208
+ 1
209
+ /* TEXT */
210
+ )
211
+ ]),
212
+ _: 1
213
+ /* STABLE */
205
214
  })
206
215
  ])) : vue.createCommentVNode("v-if", true),
207
216
  vue.createVNode($setup["VkfRendererData"], {
@@ -241,11 +250,15 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
241
250
  icon: $setup.Plus,
242
251
  onClick: $setup.addToFirst
243
252
  }, {
244
- default: vue.withCtx(() => _cache[0] || (_cache[0] = [
245
- vue.createTextVNode(" \u6DFB\u52A0 ")
246
- ])),
247
- _: 1,
248
- __: [0]
253
+ default: vue.withCtx(() => [
254
+ vue.createTextVNode(
255
+ vue.toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
256
+ 1
257
+ /* TEXT */
258
+ )
259
+ ]),
260
+ _: 1
261
+ /* STABLE */
249
262
  }, 8, ["icon"])
250
263
  ]),
251
264
  key: "0"
@@ -1,8 +1,9 @@
1
- import { defineComponent, computed, createVNode, mergeProps, openBlock, createBlock, normalizeProps, guardReactiveProps, createSlots, withCtx, createElementBlock, createTextVNode, createCommentVNode } from 'vue';
1
+ import { defineComponent, computed, createVNode, mergeProps, openBlock, createBlock, normalizeProps, guardReactiveProps, createSlots, withCtx, createElementBlock, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
2
2
  import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
3
3
  import { ElButton } from 'element-plus';
4
4
  import { d as delete_default, p as plus_default } from '../index.mjs';
5
5
  import { useComputedReadonly } from '@vunk/form/composables';
6
+ import { useLocale } from '@vunk/form/composables/element-plus';
6
7
  import { VkfFormItemRenderer } from '@vunk/form/components/form-item-renderer';
7
8
  import { VkfTemplateInstancesProvider } from '@vunk/form/components/template-instances-provider';
8
9
  import { VkfTemplatesDefault } from '@vunk/form/components/templates-default';
@@ -79,6 +80,9 @@ var _sfc_main$1 = /* @__PURE__ */defineComponent({
79
80
  const emit = __emit;
80
81
  const formItemBindProps = _VkfFormItemCtx.createBindProps(props);
81
82
  const readonly = useComputedReadonly(props);
83
+ const {
84
+ tr
85
+ } = useLocale();
82
86
  const addToFirst = () => {
83
87
  const data = props.modelValue ? [...props.modelValue] : [];
84
88
  if (props.buttonAdd === "push") {
@@ -139,6 +143,7 @@ var _sfc_main$1 = /* @__PURE__ */defineComponent({
139
143
  emit,
140
144
  formItemBindProps,
141
145
  readonly,
146
+ tr,
142
147
  addToFirst,
143
148
  hasMinus,
144
149
  formData,
@@ -193,11 +198,15 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
193
198
  type: "primary",
194
199
  onClick: $setup.addToFirst
195
200
  }, {
196
- default: withCtx(() => _cache[1] || (_cache[1] = [
197
- createTextVNode(" \u6DFB\u52A0 ")
198
- ])),
199
- _: 1,
200
- __: [1]
201
+ default: withCtx(() => [
202
+ createTextVNode(
203
+ toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
204
+ 1
205
+ /* TEXT */
206
+ )
207
+ ]),
208
+ _: 1
209
+ /* STABLE */
201
210
  })
202
211
  ])) : createCommentVNode("v-if", true),
203
212
  createVNode($setup["VkfRendererData"], {
@@ -237,11 +246,15 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
237
246
  icon: $setup.Plus,
238
247
  onClick: $setup.addToFirst
239
248
  }, {
240
- default: withCtx(() => _cache[0] || (_cache[0] = [
241
- createTextVNode(" \u6DFB\u52A0 ")
242
- ])),
243
- _: 1,
244
- __: [0]
249
+ default: withCtx(() => [
250
+ createTextVNode(
251
+ toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
252
+ 1
253
+ /* TEXT */
254
+ )
255
+ ]),
256
+ _: 1
257
+ /* STABLE */
245
258
  }, 8, ["icon"])
246
259
  ]),
247
260
  key: "0"
@@ -255,6 +255,7 @@ declare const _default: import("vue").DefineComponent<{}, {
255
255
  emit: ((event: "update:modelValue", ...args: unknown[]) => void) & ((event: "update:modelValue", ...args: any) => void) & ((event: "update:modelValue", ...args: any[]) => void);
256
256
  formItemBindProps: import("vue").ComputedRef<{}>;
257
257
  readonly: import("vue").ComputedRef<boolean>;
258
+ tr: import("@vunk/form/composables/element-plus").TranslateWithFallback;
258
259
  addToFirst: () => void;
259
260
  hasMinus: import("vue").ComputedRef<boolean>;
260
261
  formData: import("vue").ComputedRef<any[] | import("@vunk/core").NormalObject>;
@@ -244,6 +244,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
244
244
  emit: ((event: "update:modelValue", ...args: unknown[]) => void) & ((event: "update:modelValue", ...args: any) => void) & ((event: "update:modelValue", ...args: any[]) => void);
245
245
  formItemBindProps: import("vue").ComputedRef<{}>;
246
246
  readonly: import("vue").ComputedRef<boolean>;
247
+ tr: import("@vunk/form/composables/element-plus").TranslateWithFallback;
247
248
  addToFirst: () => void;
248
249
  hasMinus: import("vue").ComputedRef<boolean>;
249
250
  formData: import("vue").ComputedRef<any[] | NormalObject>;
@@ -179,7 +179,7 @@ var _sfc_main$1 = /* @__PURE__ */vue.defineComponent({
179
179
  }
180
180
  };
181
181
  const buttonsColumn = vue.computed(() => ({
182
- label: tr("vkf.inputCollection.operations", "\u64CD\u4F5C"),
182
+ label: tr("vkf.common.operations", "\u64CD\u4F5C"),
183
183
  align: "center",
184
184
  width: "85",
185
185
  hidden: readonly.value || !props.splicable,
@@ -349,11 +349,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
349
349
  type: "primary",
350
350
  onClick: $setup.addToFirst
351
351
  }, {
352
- default: vue.withCtx(() => _cache[1] || (_cache[1] = [
353
- vue.createTextVNode(" \u6DFB\u52A0 ")
354
- ])),
355
- _: 1,
356
- __: [1]
352
+ default: vue.withCtx(() => [
353
+ vue.createTextVNode(
354
+ vue.toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
355
+ 1
356
+ /* TEXT */
357
+ )
358
+ ]),
359
+ _: 1
360
+ /* STABLE */
357
361
  })
358
362
  ])) : vue.createCommentVNode("v-if", true),
359
363
  vue.createVNode($setup["VkfRendererData"], {
@@ -393,11 +397,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
393
397
  icon: $setup.Plus,
394
398
  onClick: $setup.addToFirst
395
399
  }, {
396
- default: vue.withCtx(() => _cache[0] || (_cache[0] = [
397
- vue.createTextVNode(" \u6DFB\u52A0 ")
398
- ])),
399
- _: 1,
400
- __: [0]
400
+ default: vue.withCtx(() => [
401
+ vue.createTextVNode(
402
+ vue.toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
403
+ 1
404
+ /* TEXT */
405
+ )
406
+ ]),
407
+ _: 1
408
+ /* STABLE */
401
409
  }, 8, ["icon"])) : vue.createCommentVNode("v-if", true)
402
410
  ]),
403
411
  key: "0"
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, createVNode, Fragment, ref, openBlock, createBlock, withCtx, normalizeProps, guardReactiveProps, createSlots, createElementBlock, createTextVNode, createCommentVNode, renderSlot, h } from 'vue';
1
+ import { defineComponent, computed, createVNode, Fragment, ref, openBlock, createBlock, withCtx, normalizeProps, guardReactiveProps, createSlots, createElementBlock, createTextVNode, toDisplayString, createCommentVNode, renderSlot, h } from 'vue';
2
2
  import { p as plus_default, g as minus_default } from '../index.mjs';
3
3
  import { ensetData, getValue } from '@vunk/core';
4
4
  import { VkfFieldset } from '@vunk/form/components/fieldset';
@@ -175,7 +175,7 @@ var _sfc_main$1 = /* @__PURE__ */defineComponent({
175
175
  }
176
176
  };
177
177
  const buttonsColumn = computed(() => ({
178
- label: tr("vkf.inputCollection.operations", "\u64CD\u4F5C"),
178
+ label: tr("vkf.common.operations", "\u64CD\u4F5C"),
179
179
  align: "center",
180
180
  width: "85",
181
181
  hidden: readonly.value || !props.splicable,
@@ -345,11 +345,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
345
345
  type: "primary",
346
346
  onClick: $setup.addToFirst
347
347
  }, {
348
- default: withCtx(() => _cache[1] || (_cache[1] = [
349
- createTextVNode(" \u6DFB\u52A0 ")
350
- ])),
351
- _: 1,
352
- __: [1]
348
+ default: withCtx(() => [
349
+ createTextVNode(
350
+ toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
351
+ 1
352
+ /* TEXT */
353
+ )
354
+ ]),
355
+ _: 1
356
+ /* STABLE */
353
357
  })
354
358
  ])) : createCommentVNode("v-if", true),
355
359
  createVNode($setup["VkfRendererData"], {
@@ -389,11 +393,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
389
393
  icon: $setup.Plus,
390
394
  onClick: $setup.addToFirst
391
395
  }, {
392
- default: withCtx(() => _cache[0] || (_cache[0] = [
393
- createTextVNode(" \u6DFB\u52A0 ")
394
- ])),
395
- _: 1,
396
- __: [0]
396
+ default: withCtx(() => [
397
+ createTextVNode(
398
+ toDisplayString($setup.tr("vkf.common.add", "\u6DFB\u52A0")),
399
+ 1
400
+ /* TEXT */
401
+ )
402
+ ]),
403
+ _: 1
404
+ /* STABLE */
397
405
  }, 8, ["icon"])) : createCommentVNode("v-if", true)
398
406
  ]),
399
407
  key: "0"
@@ -294,7 +294,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
294
294
  }, {
295
295
  default: vue.withCtx(() => [
296
296
  vue.createTextVNode(
297
- vue.toDisplayString(_ctx.tr("vkf.upload.download", "\u4E0B\u8F7D")),
297
+ vue.toDisplayString(_ctx.tr("vkf.common.download", "\u4E0B\u8F7D")),
298
298
  1
299
299
  /* TEXT */
300
300
  )
@@ -290,7 +290,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
290
290
  }, {
291
291
  default: withCtx(() => [
292
292
  createTextVNode(
293
- toDisplayString(_ctx.tr("vkf.upload.download", "\u4E0B\u8F7D")),
293
+ toDisplayString(_ctx.tr("vkf.common.download", "\u4E0B\u8F7D")),
294
294
  1
295
295
  /* TEXT */
296
296
  )
package/locale/index.cjs CHANGED
@@ -4,13 +4,13 @@ const en = {
4
4
  vkf: {
5
5
  common: {
6
6
  operations: "Operations",
7
+ add: "Add",
8
+ delete: "Delete",
7
9
  pause: "Pause",
8
10
  upload: "Upload",
9
11
  download: "Download"
10
12
  },
11
13
  dialogInputCollection: {
12
- operations: "Operations",
13
- add: "Add",
14
14
  deleteConfirm: "Delete this item?"
15
15
  },
16
16
  downloadPlus: {
@@ -27,9 +27,6 @@ const en = {
27
27
  required: "{label} is required",
28
28
  pattern: "Enter {label}: {pattern}"
29
29
  },
30
- inputCollection: {
31
- operations: "Operations"
32
- },
33
30
  inputLink: {
34
31
  label: "Backfill URL",
35
32
  placeholder: "Paste the file download URL here after uploading",
@@ -39,8 +36,7 @@ const en = {
39
36
  upload: {
40
37
  selectFile: "Select file",
41
38
  empty: "No file",
42
- exceedConfirm: "The file limit has been exceeded. Replace existing files with the new files?",
43
- download: "Download"
39
+ exceedConfirm: "The file limit has been exceeded. Replace existing files with the new files?"
44
40
  },
45
41
  uploadPlus: {
46
42
  selectFile: "Select file",
@@ -57,13 +53,13 @@ const zhCn = {
57
53
  vkf: {
58
54
  common: {
59
55
  operations: "\u64CD\u4F5C",
56
+ add: "\u6DFB\u52A0",
57
+ delete: "\u5220\u9664",
60
58
  pause: "\u6682\u505C",
61
59
  upload: "\u4E0A\u4F20",
62
60
  download: "\u4E0B\u8F7D"
63
61
  },
64
62
  dialogInputCollection: {
65
- operations: "\u64CD\u4F5C",
66
- add: "\u6DFB\u52A0",
67
63
  deleteConfirm: "\u786E\u5B9A\u5220\u9664\u5417\uFF1F"
68
64
  },
69
65
  downloadPlus: {
@@ -80,9 +76,6 @@ const zhCn = {
80
76
  required: "{label}\u4E0D\u80FD\u4E3A\u7A7A",
81
77
  pattern: "\u8F93\u5165 {label} {pattern}"
82
78
  },
83
- inputCollection: {
84
- operations: "\u64CD\u4F5C"
85
- },
86
79
  inputLink: {
87
80
  label: "\u56DE\u586B\u5730\u5740",
88
81
  placeholder: "\u4E0A\u4F20\u6587\u4EF6\u540E, \u5C06\u6587\u4EF6\u4E0B\u8F7D\u5730\u5740\u7C98\u8D34\u5230\u6B64\u5904",
@@ -92,8 +85,7 @@ const zhCn = {
92
85
  upload: {
93
86
  selectFile: "\u9009\u62E9\u6587\u4EF6",
94
87
  empty: "\u6682\u65E0",
95
- 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",
96
- download: "\u4E0B\u8F7D"
88
+ 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"
97
89
  },
98
90
  uploadPlus: {
99
91
  selectFile: "\u8BF7\u9009\u62E9\u6587\u4EF6",
package/locale/index.mjs CHANGED
@@ -2,13 +2,13 @@ const en = {
2
2
  vkf: {
3
3
  common: {
4
4
  operations: "Operations",
5
+ add: "Add",
6
+ delete: "Delete",
5
7
  pause: "Pause",
6
8
  upload: "Upload",
7
9
  download: "Download"
8
10
  },
9
11
  dialogInputCollection: {
10
- operations: "Operations",
11
- add: "Add",
12
12
  deleteConfirm: "Delete this item?"
13
13
  },
14
14
  downloadPlus: {
@@ -25,9 +25,6 @@ const en = {
25
25
  required: "{label} is required",
26
26
  pattern: "Enter {label}: {pattern}"
27
27
  },
28
- inputCollection: {
29
- operations: "Operations"
30
- },
31
28
  inputLink: {
32
29
  label: "Backfill URL",
33
30
  placeholder: "Paste the file download URL here after uploading",
@@ -37,8 +34,7 @@ const en = {
37
34
  upload: {
38
35
  selectFile: "Select file",
39
36
  empty: "No file",
40
- exceedConfirm: "The file limit has been exceeded. Replace existing files with the new files?",
41
- download: "Download"
37
+ exceedConfirm: "The file limit has been exceeded. Replace existing files with the new files?"
42
38
  },
43
39
  uploadPlus: {
44
40
  selectFile: "Select file",
@@ -55,13 +51,13 @@ const zhCn = {
55
51
  vkf: {
56
52
  common: {
57
53
  operations: "\u64CD\u4F5C",
54
+ add: "\u6DFB\u52A0",
55
+ delete: "\u5220\u9664",
58
56
  pause: "\u6682\u505C",
59
57
  upload: "\u4E0A\u4F20",
60
58
  download: "\u4E0B\u8F7D"
61
59
  },
62
60
  dialogInputCollection: {
63
- operations: "\u64CD\u4F5C",
64
- add: "\u6DFB\u52A0",
65
61
  deleteConfirm: "\u786E\u5B9A\u5220\u9664\u5417\uFF1F"
66
62
  },
67
63
  downloadPlus: {
@@ -78,9 +74,6 @@ const zhCn = {
78
74
  required: "{label}\u4E0D\u80FD\u4E3A\u7A7A",
79
75
  pattern: "\u8F93\u5165 {label} {pattern}"
80
76
  },
81
- inputCollection: {
82
- operations: "\u64CD\u4F5C"
83
- },
84
77
  inputLink: {
85
78
  label: "\u56DE\u586B\u5730\u5740",
86
79
  placeholder: "\u4E0A\u4F20\u6587\u4EF6\u540E, \u5C06\u6587\u4EF6\u4E0B\u8F7D\u5730\u5740\u7C98\u8D34\u5230\u6B64\u5904",
@@ -90,8 +83,7 @@ const zhCn = {
90
83
  upload: {
91
84
  selectFile: "\u9009\u62E9\u6587\u4EF6",
92
85
  empty: "\u6682\u65E0",
93
- 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",
94
- download: "\u4E0B\u8F7D"
86
+ 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"
95
87
  },
96
88
  uploadPlus: {
97
89
  selectFile: "\u8BF7\u9009\u62E9\u6587\u4EF6",
@@ -2,13 +2,13 @@ declare const en: {
2
2
  vkf: {
3
3
  common: {
4
4
  operations: string;
5
+ add: string;
6
+ delete: string;
5
7
  pause: string;
6
8
  upload: string;
7
9
  download: string;
8
10
  };
9
11
  dialogInputCollection: {
10
- operations: string;
11
- add: string;
12
12
  deleteConfirm: string;
13
13
  };
14
14
  downloadPlus: {
@@ -25,9 +25,6 @@ declare const en: {
25
25
  required: string;
26
26
  pattern: string;
27
27
  };
28
- inputCollection: {
29
- operations: string;
30
- };
31
28
  inputLink: {
32
29
  label: string;
33
30
  placeholder: string;
@@ -38,7 +35,6 @@ declare const en: {
38
35
  selectFile: string;
39
36
  empty: string;
40
37
  exceedConfirm: string;
41
- download: string;
42
38
  };
43
39
  uploadPlus: {
44
40
  selectFile: string;
@@ -2,13 +2,13 @@ declare const zhCn: {
2
2
  vkf: {
3
3
  common: {
4
4
  operations: string;
5
+ add: string;
6
+ delete: string;
5
7
  pause: string;
6
8
  upload: string;
7
9
  download: string;
8
10
  };
9
11
  dialogInputCollection: {
10
- operations: string;
11
- add: string;
12
12
  deleteConfirm: string;
13
13
  };
14
14
  downloadPlus: {
@@ -25,9 +25,6 @@ declare const zhCn: {
25
25
  required: string;
26
26
  pattern: string;
27
27
  };
28
- inputCollection: {
29
- operations: string;
30
- };
31
28
  inputLink: {
32
29
  label: string;
33
30
  placeholder: string;
@@ -38,7 +35,6 @@ declare const zhCn: {
38
35
  selectFile: string;
39
36
  empty: string;
40
37
  exceedConfirm: string;
41
- download: string;
42
38
  };
43
39
  uploadPlus: {
44
40
  selectFile: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vunk/form",
3
- "version": "2.18.0",
3
+ "version": "2.18.2",
4
4
  "description": "",
5
5
  "main": "index.esm.js",
6
6
  "scripts": {
@@ -355,6 +355,150 @@
355
355
  "types": "./components/api-tables-select/index.d.ts",
356
356
  "require": "./components/api-tables-select/index.cjs"
357
357
  },
358
+ "./components/vditor/src/types": {
359
+ "types": "./components/vditor/src/types.d.ts"
360
+ },
361
+ "./components/var-datetime-picker/src/types": {
362
+ "types": "./components/var-datetime-picker/src/types.d.ts"
363
+ },
364
+ "./components/van-cascader/src/types": {
365
+ "types": "./components/van-cascader/src/types.d.ts"
366
+ },
367
+ "./components/upload-plus/src/types": {
368
+ "types": "./components/upload-plus/src/types.d.ts"
369
+ },
370
+ "./components/upload/src/types": {
371
+ "types": "./components/upload/src/types.d.ts"
372
+ },
373
+ "./components/time-picker/src/types": {
374
+ "types": "./components/time-picker/src/types.d.ts"
375
+ },
376
+ "./components/templates-variant/src/types": {
377
+ "types": "./components/templates-variant/src/types.d.ts"
378
+ },
379
+ "./components/templates-layout/src/types": {
380
+ "types": "./components/templates-layout/src/types.d.ts"
381
+ },
382
+ "./components/templates-esri/src/types": {
383
+ "types": "./components/templates-esri/src/types.d.ts"
384
+ },
385
+ "./components/templates-element-plus/src/types": {
386
+ "types": "./components/templates-element-plus/src/types.d.ts"
387
+ },
388
+ "./components/templates-default/src/types": {
389
+ "types": "./components/templates-default/src/types.d.ts"
390
+ },
391
+ "./components/tables-select/src/types": {
392
+ "types": "./components/tables-select/src/types.d.ts"
393
+ },
394
+ "./components/switch/src/types": {
395
+ "types": "./components/switch/src/types.d.ts"
396
+ },
397
+ "./components/slider/src/types": {
398
+ "types": "./components/slider/src/types.d.ts"
399
+ },
400
+ "./components/select/src/types": {
401
+ "types": "./components/select/src/types.d.ts"
402
+ },
403
+ "./components/renderer-data/src/types": {
404
+ "types": "./components/renderer-data/src/types.d.ts"
405
+ },
406
+ "./components/radio/src/types": {
407
+ "types": "./components/radio/src/types.d.ts"
408
+ },
409
+ "./components/monaco-editor/src/types": {
410
+ "types": "./components/monaco-editor/src/types.d.ts"
411
+ },
412
+ "./components/input-tag/src/types": {
413
+ "types": "./components/input-tag/src/types.d.ts"
414
+ },
415
+ "./components/input-number/src/types": {
416
+ "types": "./components/input-number/src/types.d.ts"
417
+ },
418
+ "./components/input-link/src/types": {
419
+ "types": "./components/input-link/src/types.d.ts"
420
+ },
421
+ "./components/input-file/src/types": {
422
+ "types": "./components/input-file/src/types.d.ts"
423
+ },
424
+ "./components/input-collection/src/types": {
425
+ "types": "./components/input-collection/src/types.d.ts"
426
+ },
427
+ "./components/input-array/src/types": {
428
+ "types": "./components/input-array/src/types.d.ts"
429
+ },
430
+ "./components/input/src/types": {
431
+ "types": "./components/input/src/types.d.ts"
432
+ },
433
+ "./components/information-templates-default/src/types": {
434
+ "types": "./components/information-templates-default/src/types.d.ts"
435
+ },
436
+ "./components/information-tag/src/types": {
437
+ "types": "./components/information-tag/src/types.d.ts"
438
+ },
439
+ "./components/information-collection/src/types": {
440
+ "types": "./components/information-collection/src/types.d.ts"
441
+ },
442
+ "./components/information/src/types": {
443
+ "types": "./components/information/src/types.d.ts"
444
+ },
445
+ "./components/forms-provider/src/types": {
446
+ "types": "./components/forms-provider/src/types.d.ts"
447
+ },
448
+ "./components/form-item-renderer-template/src/types": {
449
+ "types": "./components/form-item-renderer-template/src/types.d.ts"
450
+ },
451
+ "./components/form-item-renderer/src/types": {
452
+ "types": "./components/form-item-renderer/src/types.d.ts"
453
+ },
454
+ "./components/form-item/src/types": {
455
+ "types": "./components/form-item/src/types.d.ts"
456
+ },
457
+ "./components/form/src/types": {
458
+ "types": "./components/form/src/types.d.ts"
459
+ },
460
+ "./components/fieldset/src/types": {
461
+ "types": "./components/fieldset/src/types.d.ts"
462
+ },
463
+ "./components/esri-input-geojson/src/types": {
464
+ "types": "./components/esri-input-geojson/src/types.d.ts"
465
+ },
466
+ "./components/editable-text/src/types": {
467
+ "types": "./components/editable-text/src/types.d.ts"
468
+ },
469
+ "./components/download-plus/src/types": {
470
+ "types": "./components/download-plus/src/types.d.ts"
471
+ },
472
+ "./components/dialog-input-collection/src/types": {
473
+ "types": "./components/dialog-input-collection/src/types.d.ts"
474
+ },
475
+ "./components/dialog/src/types": {
476
+ "types": "./components/dialog/src/types.d.ts"
477
+ },
478
+ "./components/date-picker-range/src/types": {
479
+ "types": "./components/date-picker-range/src/types.d.ts"
480
+ },
481
+ "./components/date-picker/src/types": {
482
+ "types": "./components/date-picker/src/types.d.ts"
483
+ },
484
+ "./components/color-picker/src/types": {
485
+ "types": "./components/color-picker/src/types.d.ts"
486
+ },
487
+ "./components/checkbox/src/types": {
488
+ "types": "./components/checkbox/src/types.d.ts"
489
+ },
490
+ "./components/cascader/src/types": {
491
+ "types": "./components/cascader/src/types.d.ts"
492
+ },
493
+ "./components/card-input-collection/src/types": {
494
+ "types": "./components/card-input-collection/src/types.d.ts"
495
+ },
496
+ "./components/button/src/types": {
497
+ "types": "./components/button/src/types.d.ts"
498
+ },
499
+ "./components/api-tables-select/src/types": {
500
+ "types": "./components/api-tables-select/src/types.d.ts"
501
+ },
358
502
  "./index.css": {
359
503
  "import": "./index.css"
360
504
  },