Element UI select选择器使用记录
<a-form-item
label="类型"
:labelCol="{span: 7}"
:wrapperCol="{span: 10}">
<el-select v-model="dataFrom.type" placeholder="请选择" style="width: 100%">
<el-option
v-for="item in dictTypeList1"
:key="item.name"
:label="item.name"
:value="item.code">
</el-option>
</el-select>
</a-form-item>
dictTypeList: []
created() {
this.initDictType(),
},
initDictType() {
request('/user/sysDictKey/dictData', 'get', {'id': '200022'}).then(({data: res}) => {
this.dictTypeList = res.data
})
},
结合数据字典