@vue-ui-kit/ant 2.1.9 → 2.2.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-ui-kit/ant",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
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.
|
|
49
|
+
"e-virt-table": "^1.3.10",
|
|
50
50
|
"uuid": "^10.0.0",
|
|
51
51
|
"xe-utils": "^3.7.6"
|
|
52
52
|
},
|
|
@@ -118,6 +118,13 @@ export interface PFormGroupProps<F extends Recordable = Recordable> {
|
|
|
118
118
|
getFormSetting: (data: Partial<F>) => PFormProps<Partial<F>>;
|
|
119
119
|
title?: string;
|
|
120
120
|
tabLabel?: string;
|
|
121
|
+
/**
|
|
122
|
+
* 获取完整标签页标签
|
|
123
|
+
* @param data 数据
|
|
124
|
+
* @param idx 实际索引
|
|
125
|
+
* @returns 标签页标签
|
|
126
|
+
*/
|
|
127
|
+
getTabLabel?: (data: Partial<F>, idx: number) => string;
|
|
121
128
|
editAble?: boolean;
|
|
122
129
|
showAdd?: boolean;
|
|
123
130
|
/* 是否启用折叠 */
|
|
@@ -73,6 +73,12 @@
|
|
|
73
73
|
blockInstance.value[activeKey.value]?.$form?.validate();
|
|
74
74
|
});
|
|
75
75
|
};
|
|
76
|
+
const calculateTabLabel = (data: Partial<F>, idx: number) => {
|
|
77
|
+
return (
|
|
78
|
+
props.getTabLabel?.(data, idx) ??
|
|
79
|
+
`${props.tabLabel} ${props.keepSerial ? idx + 1 : (data.__index ?? 0) + 1}`
|
|
80
|
+
);
|
|
81
|
+
};
|
|
76
82
|
watch(
|
|
77
83
|
() => model.value,
|
|
78
84
|
() => {
|
|
@@ -280,7 +286,7 @@
|
|
|
280
286
|
<a-tab-pane
|
|
281
287
|
v-for="(item, idx) in model"
|
|
282
288
|
:key="idx"
|
|
283
|
-
:tab="
|
|
289
|
+
:tab="calculateTabLabel(item, idx)"
|
|
284
290
|
:force-render="fr"
|
|
285
291
|
>
|
|
286
292
|
<template #closeIcon>
|