@vue-ui-kit/ant 2.1.9 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-ui-kit/ant",
3
- "version": "2.1.9",
3
+ "version": "2.2.0",
4
4
  "description": "Vue3 UI Kit based on Ant Design",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",
@@ -46,7 +46,7 @@
46
46
  "email": "adoin@qq.com"
47
47
  },
48
48
  "dependencies": {
49
- "e-virt-table": "^1.3.6",
49
+ "e-virt-table": "^1.3.10",
50
50
  "uuid": "^10.0.0",
51
51
  "xe-utils": "^3.7.6"
52
52
  },
@@ -117,7 +117,7 @@ export interface GroupMenuItem<F extends Recordable = Recordable> {
117
117
  export interface PFormGroupProps<F extends Recordable = Recordable> {
118
118
  getFormSetting: (data: Partial<F>) => PFormProps<Partial<F>>;
119
119
  title?: string;
120
- tabLabel?: string;
120
+ tabLabel?: string | ((data: Partial<F>) => string);
121
121
  editAble?: boolean;
122
122
  showAdd?: boolean;
123
123
  /* 是否启用折叠 */
@@ -73,6 +73,9 @@
73
73
  blockInstance.value[activeKey.value]?.$form?.validate();
74
74
  });
75
75
  };
76
+ const getTabLabel = (data: Partial<F>) => {
77
+ return typeof props.tabLabel === 'function' ? props.tabLabel(data) : props.tabLabel;
78
+ };
76
79
  watch(
77
80
  () => model.value,
78
81
  () => {
@@ -280,7 +283,7 @@
280
283
  <a-tab-pane
281
284
  v-for="(item, idx) in model"
282
285
  :key="idx"
283
- :tab="`${tabLabel} ${keepSerial ? idx + 1 : (item.__index ?? 0) + 1}`"
286
+ :tab="`${getTabLabel(item)} ${keepSerial ? idx + 1 : (item.__index ?? 0) + 1}`"
284
287
  :force-render="fr"
285
288
  >
286
289
  <template #closeIcon>