fix: 修复搜索组件的历史搜索中同一条搜索语句点击第二次不能填充搜索框的问题
This commit is contained in:
@@ -205,8 +205,9 @@ export default {
|
||||
this.$emit('search', { q: '', str: '', metaList: [] })
|
||||
}
|
||||
},
|
||||
focus () {
|
||||
this.codeMirror.focus()
|
||||
focus (e) {
|
||||
toRaw(this.codeMirror).setValue(e.str)
|
||||
// this.codeMirror.focus()
|
||||
},
|
||||
changeMode () {
|
||||
const str = this.codeMirror.getValue().trim()
|
||||
|
||||
@@ -191,7 +191,7 @@ export default {
|
||||
this.showHistory = false
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.search.$refs.textMode) {
|
||||
this.$refs.search.$refs.textMode.focus()
|
||||
this.$refs.search.$refs.textMode.focus(row)
|
||||
}
|
||||
})
|
||||
if (this.showList) {
|
||||
|
||||
@@ -130,7 +130,7 @@ export default {
|
||||
this.showHistory = false
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.search.$refs.textMode) {
|
||||
this.$refs.search.$refs.textMode.focus()
|
||||
this.$refs.search.$refs.textMode.focus(row)
|
||||
}
|
||||
})
|
||||
if (this.showList) {
|
||||
|
||||
Reference in New Issue
Block a user