From f64d7adb22952cfdd5bf642343335fd78460d745 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Sun, 10 Oct 2021 10:37:59 +0800 Subject: [PATCH] fix: table sort tooltip npt work --- components/table/Table.tsx | 2 +- .../__snapshots__/Table.sorter.test.js.snap | 1 + .../__tests__/__snapshots__/demo.test.js.snap | 14 ++++++++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/components/table/Table.tsx b/components/table/Table.tsx index 96091eca38..014ed236ed 100644 --- a/components/table/Table.tsx +++ b/components/table/Table.tsx @@ -209,7 +209,7 @@ export const tableProps = () => { sortDirections: { type: Array as PropType, default: undefined }, showSorterTooltip: { type: [Boolean, Object] as PropType, - default: undefined, + default: true, }, contextSlots: { type: Object as PropType, diff --git a/components/table/__tests__/__snapshots__/Table.sorter.test.js.snap b/components/table/__tests__/__snapshots__/Table.sorter.test.js.snap index 944649f859..6d5b8e17dd 100644 --- a/components/table/__tests__/__snapshots__/Table.sorter.test.js.snap +++ b/components/table/__tests__/__snapshots__/Table.sorter.test.js.snap @@ -4,6 +4,7 @@ exports[`Table.sorter renders sorter icon correctly 1`] = ` +
Name
diff --git a/components/table/__tests__/__snapshots__/demo.test.js.snap b/components/table/__tests__/__snapshots__/demo.test.js.snap index 1a5a8eadea..b32694c9c9 100644 --- a/components/table/__tests__/__snapshots__/demo.test.js.snap +++ b/components/table/__tests__/__snapshots__/demo.test.js.snap @@ -2508,6 +2508,7 @@ exports[`renders ./components/table/demo/grouping-columns.vue correctly 1`] = ` +
Age
@@ -2904,17 +2905,18 @@ exports[`renders ./components/table/demo/head.vue correctly 1`] = ` -
Name
+
Name
+
Age
-
Address
+
Address
@@ -3006,14 +3008,17 @@ exports[`renders ./components/table/demo/multiple-sorter.vue correctly 1`] = ` Name +
Chinese Score
+
Math Score
+
English Score
@@ -3266,17 +3271,18 @@ exports[`renders ./components/table/demo/reset-filter.vue correctly 1`] = ` -
Name
+
Name
+
Age
-
Address
+
Address