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