feat: 参数配置都是可选的参数

This commit is contained in:
TsMask
2023-12-18 20:23:17 +08:00
parent 208d7a4725
commit 3f20faf5be

View File

@@ -837,6 +837,8 @@ function arrayEditInit(data: Record<string, any>, dataRule: any) {
if (!item) {
continue;
}
// 可选的
row.optional = 'true';
// 根据规则类型转值
if (['enum', 'int'].includes(row.type)) {
row.value = Number(item.value);
@@ -870,6 +872,8 @@ function arrayAddInit(data: any[], dataRule: any) {
row.value = [];
continue;
}
// 可选的
row.optional = 'true';
// index值
if (row.name === 'index') {
let newIndex = dataLastIndex !== 0 ? dataLastIndex : parseInt(row.value);