From 7e4531321cc8b07bdc99d6131ff39c67c9c5c5c1 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Wed, 18 Sep 2024 17:53:33 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9bug89967?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/selection/StandardSelectionModal.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/selection/StandardSelectionModal.vue b/src/components/selection/StandardSelectionModal.vue index b5c9d53..4a59040 100644 --- a/src/components/selection/StandardSelectionModal.vue +++ b/src/components/selection/StandardSelectionModal.vue @@ -250,7 +250,13 @@ export default { this.initDict() this.$nextTick(() => { this.source ? this.queryParam.source = this.source : this.queryParam = {} - this.replacePage() + this.replacePage(1, () => { + if (this.value) { + this.selectedRowKeys = this.value.split(',') + } else { + this.selectedRowKeys = [] + } + }) }) }, initDict () { @@ -290,7 +296,7 @@ export default { return values }, // 获取表格数据 - replacePage (arg) { + replacePage (arg, callback) { if (arg === 1) { this.ipagination.current = 1 } @@ -315,7 +321,7 @@ export default { if (res.success) { this.dataList = res.result.records this.ipagination.total = res.result.total - this.selectedRowKeys = this.value ? this.value.split(',') : (this.selectedRowKeys || []) + callback && callback() } else { this.dataList = [] }