fix: 🐛 在弹窗界面中引用的列表组件,点击重置搜索条件按钮时,会关闭弹窗的bug (#95)

This commit is contained in:
nsnail 2024-02-27 18:31:08 +08:00 committed by GitHub
parent 802251e423
commit 8fee14cd6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 4 deletions

View File

@ -119,7 +119,7 @@
<el-button-group>
<el-button @click="search" icon="el-icon-search" type="primary">查询</el-button>
<el-button @click="tool.refreshTab(vue)" icon="el-icon-refresh-left">重置</el-button>
<el-button @click="reset" icon="el-icon-refresh-left">重置</el-button>
</el-button-group>
</form>
</template>
@ -137,6 +137,7 @@ export default {
data() {
return {
casLoaded: false,
keepKeywords: null,
form: {
root: {},
filter: {},
@ -188,7 +189,9 @@ export default {
Object.keys(this.form.dy).forEach((x) => {
delete this.form.dy[x]
})
if (this.keepKeywords) {
this.form.root.keywords = this.keepKeywords
}
this.search()
},
},

View File

@ -205,8 +205,7 @@ export default {
margin: 5px;
color: #fff;
vertical-align: top;
padding: 4px;
padding-top: 1rem;
padding: 1rem 4px 4px;
cursor: move;
border-radius: 3px;
}

View File

@ -111,6 +111,7 @@ export default {
mounted() {
if (this.keywords) {
this.$refs.search.form.root.keywords = this.keywords
this.$refs.search.keepKeywords = this.keywords
}
},
created() {