ElemeFE / ElemeFE/element

选择器远程搜索回显

Open
#21,715 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

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显示发生变化

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.