issues
search
ElemeFE
/
element
A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.12k
stars
14.64k
forks
source link
选择器远程搜索回显
#21715
Open
mumu-0603
opened
2 years ago
mumu-0603
commented
2 years ago
remoteMethod(query) { if (query !== '') { console.log(this.$refs) teacher(query, this.id).then(res => { setTimeout(() => { this.options = res.data.data this.loading = false // this.options = this.options.filter(item => { // return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1 // }) }, 200) }) this.loading = true setTimeout(() => { this.loading = false // this.options = this.list.filter(item => { // return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1 // }) }, 200) } else { this.options = [] } }, 这是回显 this.form.teacher_id = [this.form.teacher_id] 回填显示正确直接搜索自动替换,绑定值不变input显示发生变化
mumu-0603
commented
2 years ago
回显显示正常 输入以后自动替换绑定的值并mei没发生变化