fix: 修复实体列表搜索框在清除内容后,切换模式内容还存在的问题
This commit is contained in:
@@ -164,6 +164,18 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.metaList.splice(index - 1, 2)
|
this.metaList.splice(index - 1, 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.metaList.length > 0) {
|
||||||
|
const parser = new Parser(this.columnList)
|
||||||
|
const errorList = parser.validateMeta(this.metaList)
|
||||||
|
if (_.isEmpty(errorList)) {
|
||||||
|
this.reloadUrl({ q: parser.parseMeta(this.metaList).q })
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const routeQuery = this.$route.query
|
||||||
|
delete routeQuery.q
|
||||||
|
this.reloadUrl(routeQuery, 'cleanOldParams')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 选择搜索条件的事件
|
// 选择搜索条件的事件
|
||||||
selectColumn (value, meta) {
|
selectColumn (value, meta) {
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
cleanParams () {
|
cleanParams () {
|
||||||
toRaw(this.codeMirror).setValue('')
|
toRaw(this.codeMirror).setValue('')
|
||||||
|
const routeQuery = this.$route.query
|
||||||
|
delete routeQuery.q
|
||||||
|
this.reloadUrl(routeQuery, 'cleanOldParams')
|
||||||
},
|
},
|
||||||
initCodeMirror () {
|
initCodeMirror () {
|
||||||
this.codeMirror = CodeMirror.fromTextArea(this.$refs.textSearch, {
|
this.codeMirror = CodeMirror.fromTextArea(this.$refs.textSearch, {
|
||||||
|
|||||||
Reference in New Issue
Block a user