From 86a2d09d0649b655b8ce9b8611f84bfc60a64b4a Mon Sep 17 00:00:00 2001 From: pengYYY Date: Thu, 23 Dec 2021 19:34:30 +0800 Subject: [PATCH 1/4] fix(pagination): pagination use input number replace input-number --- src/_common | 2 +- src/pagination/pagination.tsx | 29 ++++++++--------------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/src/_common b/src/_common index 3073a989d6..ff668def3e 160000 --- a/src/_common +++ b/src/_common @@ -1 +1 @@ -Subproject commit 3073a989d6258d074c86d1251b9e2d01ce24d0f9 +Subproject commit ff668def3e3a64893e71cb2251076730c8591fef diff --git a/src/pagination/pagination.tsx b/src/pagination/pagination.tsx index 13f56d2662..d8218615fa 100755 --- a/src/pagination/pagination.tsx +++ b/src/pagination/pagination.tsx @@ -9,7 +9,7 @@ import { import config from '../config'; import mixins from '../utils/mixins'; import getConfigReceiverMixins, { PaginationConfig } from '../config-provider/config-receiver'; -import TInput from '../input'; +import TInputNumber from '../input-number'; import { Select, Option } from '../select'; import CLASSNAMES from '../utils/classnames'; import props from './props'; @@ -33,7 +33,7 @@ export default defineComponent({ ChevronLeftDoubleIcon, ChevronRightDoubleIcon, EllipsisIcon, - TInput, + TInputNumber, TSelect: Select, TOption: Option, }, @@ -203,30 +203,14 @@ export default defineComponent({ current(val) { this.jumpIndex = val; }, - jumpIndex(val) { - if (val < 1) { - this.$nextTick(() => { - this.jumpIndex = 1; - }); - } - if (val > this.pageCount) { - this.$nextTick(() => { - this.jumpIndex = this.pageCount; - }); - } - }, }, methods: { toPage(pageIndex: number, isTriggerChange?: boolean): void { if (this.disabled) { return; } - let current = pageIndex; - if (pageIndex < 1) { - current = 1; - } else if (pageIndex > this.pageCount) { - current = this.pageCount; - } + const current = pageIndex; + if (this.current !== current) { const prev = this.current; const pageInfo = { @@ -401,11 +385,14 @@ export default defineComponent({ {this.showJumper ? (
{this.t(this.global.jumpTo)} - {this.t(this.global.page)}
From 7539d675ee2075d878693367a97945c2fe5d5ea7 Mon Sep 17 00:00:00 2001 From: pengYYY Date: Thu, 23 Dec 2021 19:51:33 +0800 Subject: [PATCH 2/4] fix(tree-select): tree-select collapsedItem fix fix #36 --- src/tree-select/tree-select.tsx | 1 + test/ssr/__snapshots__/ssr.test.js.snap | 65 ++- .../__snapshots__/demo.test.js.snap | 17 +- .../__snapshots__/demo.test.js.snap | 17 +- .../transfer/__snapshots__/demo.test.js.snap | 426 ++++++++++++++++-- 5 files changed, 452 insertions(+), 74 deletions(-) diff --git a/src/tree-select/tree-select.tsx b/src/tree-select/tree-select.tsx index 5d5fed006f..3b969179c0 100644 --- a/src/tree-select/tree-select.tsx +++ b/src/tree-select/tree-select.tsx @@ -397,6 +397,7 @@ export default defineComponent({ ); const tagItem = this.tagList.map((label, index) => ( -
jump to
- +
jump to
+ +
@@ -21971,8 +21972,9 @@ exports[`ssr snapshot test renders ./examples/pagination/demos/jump.vue correctl
-
跳至
- +
跳至
+ +
@@ -36858,16 +36860,49 @@ exports[`ssr snapshot test renders ./examples/transfer/demos/tree.vue correctly
-
- - - - + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
@@ -38608,7 +38643,7 @@ exports[`ssr snapshot test renders ./examples/tree-select/demos/collapsed.vue co
- guangzhoushenzhen + guangzhou +1