-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
liwei
committed
Sep 17, 2021
1 parent
e6d4cf7
commit ebcfca0
Showing
17 changed files
with
230 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<template> | ||
<div> | ||
<p>{{ model }}</p> | ||
<el-form-schema | ||
:schema="schema" | ||
v-model="model" | ||
label-width="150px" | ||
> | ||
</el-form-schema> | ||
</div> | ||
</template> | ||
<script> | ||
export default { | ||
data() { | ||
return { | ||
schema: { | ||
sel: { | ||
tag: 'el-select', | ||
label: "下拉框", | ||
items: [] | ||
}, | ||
radio: { | ||
tag: 'el-radio', | ||
label: "单选框", | ||
items: [] | ||
}, | ||
checkbox: { | ||
tag: 'el-checkbox', | ||
label: "复选框", | ||
items: [] | ||
}, | ||
}, | ||
model: {} | ||
}; | ||
}, | ||
mounted() { | ||
setTimeout(() => { | ||
// 第一种赋值 | ||
this.schema.sel.items = [{ | ||
label:"测试", | ||
value: 1 | ||
}]; | ||
// 第二种赋值:对象数组 | ||
this.schema.radio.items = [ | ||
"A", | ||
"B", | ||
"C" | ||
]; | ||
// 第三种赋值:字符串数组 | ||
this.schema.checkbox.items = { | ||
0: "测试1", | ||
1: '测试2' | ||
}; | ||
}, 3000); | ||
} | ||
}; | ||
</script> |
Oops, something went wrong.