feat: 参数配置都是可选的参数
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user