前言:项目要求 需要下拉框可用户自己输入内容添加数据,所以百度找到了这个方法 记录一下。
<el-select v-model="addForm.name" @change.native="selectBlurLogic" @blur.native="selectBlurLogic"><el-option label="1" value="1"></el-option></el-select>
methods:{// 下拉框输入selectBlurLogic(e){this.$set(this.addForm,'name',e.target.value)}}
完啦~ 希望自己能记住!!