一.下拉选项固定
<el-select v-model="form.fileOrgType" placeholder="请选择">
<el-option label="是" value="Y"> </el-option>
<el-option label="否" value="N"></el-option>
</el-select>
二.下拉选项从数据库中获取
<el-select v-model="value" placeholder="请选择" @change="handleChange">
<el-option v-for="item in socialData" :key="item._id" :label="item.name" :value="item._id"> </el-option>
</el-select>
export default {
data() {
return {
socialData: [],
value: ''
};
},
methods: {
//获取媒体类型
getSocialList(params) {
getSocialList(params).then((res) => {
th