添加不使用API Service的时候生成ruleForm属性
This commit is contained in:
parent
9da7412017
commit
94a075fa20
@ -242,7 +242,20 @@ const state = reactive({
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@:ruleForm: {},
|
@:ruleForm: {
|
||||||
|
@:@(@pkFieldName):0,
|
||||||
|
@foreach (var column in Model.TableField){
|
||||||
|
if (@column.WhetherAddUpdate == "Y"){
|
||||||
|
if(@column.NetType.StartsWith("int")||@column.NetType.StartsWith("decimal")||@column.NetType.StartsWith("float")||@column.NetType.StartsWith("double")){
|
||||||
|
@:@(@column.LowerPropertyName):@(string.IsNullOrEmpty(@column.DefaultValue)?"null":@column.DefaultValue),
|
||||||
|
} else if(@column.NetType.StartsWith("string")){
|
||||||
|
@:@column.LowerPropertyName:@(string.IsNullOrEmpty(@column.DefaultValue)?"null":("'"+column.DefaultValue+"'")),
|
||||||
|
}else{
|
||||||
|
@:@column.LowerPropertyName:null,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@:},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user