From 08a682eabaf99bb1039bdfc5f5dcf86448b40794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E5=84=80=E5=BC=8F?= <854085467@qq.com> Date: Mon, 15 Aug 2022 09:12:51 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(component):=20=E4=BC=98=E5=8C=96=20ta?= =?UTF-8?q?ble=20=E7=BB=84=E4=BB=B6=20dataSource=20=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=94=B9=E5=8F=98=E6=97=B6,=20=E6=B8=85=E7=A9=BA=20selectedKey?= =?UTF-8?q?=20=E4=B8=8E=20selectedKeys=20=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/component/src/component/table/index.vue | 7 +++++-- .../src/document/zh-CN/guide/changelog.md | 11 ++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/package/component/src/component/table/index.vue b/package/component/src/component/table/index.vue index f798f907..7fba50cb 100644 --- a/package/component/src/component/table/index.vue +++ b/package/component/src/component/table/index.vue @@ -93,6 +93,7 @@ const emit = defineEmits([ const slot = useSlots(); const slots = slot.default && slot.default(); +const s = ""; const allChecked = ref(false); const hasChecked = ref(false); const tableDataSource = ref([...props.dataSource]); @@ -257,6 +258,8 @@ watch( () => props.dataSource, () => { tableDataSource.value = [...props.dataSource]; + tableSelectedKeys.value = []; + tableSelectedKey.value = s; nextTick(() => { getScrollWidth(); }); @@ -316,11 +319,11 @@ const rowDoubleClick = function (data: any, evt: MouseEvent) { emit("row-double", data, evt); }; -const rowContextmenu = function (data: any, evt: MouseEvent) { +const rowContextmenu = (data: any, evt: MouseEvent) => { emit("row-contextmenu", data, evt); }; -const print = function () { +const print = () => { let subOutputRankPrint = document.getElementById(tableId) as HTMLElement; let newContent = subOutputRankPrint.innerHTML; let oldContent = document.body.innerHTML; diff --git a/package/document-component/src/document/zh-CN/guide/changelog.md b/package/document-component/src/document/zh-CN/guide/changelog.md index 17c69d42..39cac29d 100644 --- a/package/document-component/src/document/zh-CN/guide/changelog.md +++ b/package/document-component/src/document/zh-CN/guide/changelog.md @@ -11,7 +11,16 @@