update boolean form
This commit is contained in:
1 parent
fdc0a90190
commit
ba74345be1
2 files changed
+10
-1
No files matched your search
@@ -67,6 +67,15 @@
|
||||
>
|
||||
<el-option v-for="e in item?.enum" :key="e" :label="e" :value="e" />
|
||||
</el-select>
|
||||
<el-select
|
||||
v-else-if="item?.type === 'boolean'"
|
||||
v-model="value[itemKey?.toString()]"
|
||||
clearable
|
||||
:placeholder="$t('common.title.placeholderOfSelect')"
|
||||
>
|
||||
<el-option key="true" :label="'true'" :value="true" />
|
||||
<el-option key="false" :label="'false'" :value="false" />
|
||||
</el-select>
|
||||
<el-input v-else v-model="value[itemKey?.toString()]" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@ export interface ISchema {
|
||||
[key: string]: ISchema;
|
||||
};
|
||||
enum: (string | number)[];
|
||||
type: 'object' | 'array' | 'string' | 'number';
|
||||
type: 'object' | 'array' | 'string' | 'number' | 'boolean';
|
||||
title: string;
|
||||
optional: boolean;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user