Skip to content

Commit 2200cf0

Browse files
committed
feat: add pagination disabled support
1 parent b95760b commit 2200cf0

File tree

20 files changed

+193
-90
lines changed

20 files changed

+193
-90
lines changed

build/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
22
dev: {
3-
componentName: 'notification', // dev components
3+
componentName: 'pagination', // dev components
44
},
55
};

components/pagination/Pagination.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { ConfigConsumerProps } from '../config-provider';
1111
export const PaginationProps = () => ({
1212
total: PropTypes.number,
1313
defaultCurrent: PropTypes.number,
14+
disabled: PropTypes.bool,
1415
current: PropTypes.number,
1516
defaultPageSize: PropTypes.number,
1617
pageSize: PropTypes.number,
@@ -19,7 +20,7 @@ export const PaginationProps = () => ({
1920
pageSizeOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])),
2021
buildOptionText: PropTypes.func,
2122
showSizeChange: PropTypes.func,
22-
showQuickJumper: PropTypes.bool,
23+
showQuickJumper: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
2324
showTotal: PropTypes.any,
2425
size: PropTypes.string,
2526
simple: PropTypes.bool,
@@ -28,6 +29,7 @@ export const PaginationProps = () => ({
2829
selectPrefixCls: PropTypes.string,
2930
itemRender: PropTypes.any,
3031
role: PropTypes.string,
32+
showLessItems: PropTypes.bool,
3133
});
3234

3335
export const PaginationConfig = () => ({

components/pagination/__tests__/__snapshots__/demo.test.js.snap

Lines changed: 49 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ exports[`renders ./components/pagination/demo/changer.md correctly 1`] = `
4747
</div>
4848
</li>
4949
</ul> <br>
50-
<ul unselectable="unselectable" class="ant-pagination">
50+
<ul unselectable="unselectable" class="ant-pagination ant-pagination-disabled">
5151
<li title="Previous Page" tabindex="0" class=" ant-pagination-prev"><a class="ant-pagination-item-link"><i aria-label="icon: left" class="anticon anticon-left"><svg viewBox="64 64 896 896" data-icon="left" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
5252
<path d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"></path>
5353
</svg></i></a></li>
@@ -67,7 +67,7 @@ exports[`renders ./components/pagination/demo/changer.md correctly 1`] = `
6767
<path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"></path>
6868
</svg></i></a></li>
6969
<li class="ant-pagination-options">
70-
<div tabindex="0" class="ant-select ant-select-enabled ant-pagination-options-size-changer">
70+
<div tabindex="-1" class="ant-select ant-select-disabled ant-pagination-options-size-changer">
7171
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-controls="test-uuid" class="ant-select-selection ant-select-selection--single">
7272
<div class="ant-select-selection__rendered">
7373
<div title="20 / page" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">20 / page</div>
@@ -143,28 +143,52 @@ exports[`renders ./components/pagination/demo/itemRender.md correctly 1`] = `
143143
`;
144144
145145
exports[`renders ./components/pagination/demo/jump.md correctly 1`] = `
146-
<ul unselectable="unselectable" class="ant-pagination">
147-
<li title="Previous Page" tabindex="0" class=" ant-pagination-prev"><a class="ant-pagination-item-link"><i aria-label="icon: left" class="anticon anticon-left"><svg viewBox="64 64 896 896" data-icon="left" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
148-
<path d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"></path>
149-
</svg></i></a></li>
150-
<li title="1" tabindex="0" class="ant-pagination-item ant-pagination-item-1"><a>1</a></li>
151-
<li title="2" tabindex="0" class="ant-pagination-item ant-pagination-item-2 ant-pagination-item-active"><a>2</a></li>
152-
<li title="3" tabindex="0" class="ant-pagination-item ant-pagination-item-3"><a>3</a></li>
153-
<li title="4" tabindex="0" class="ant-pagination-item ant-pagination-item-4"><a>4</a></li>
154-
<li title="5" tabindex="0" class="ant-pagination-item ant-pagination-item-5 ant-pagination-item-before-jump-next"><a>5</a></li>
155-
<li title="Next 5 Pages" tabindex="0" class="ant-pagination-jump-next ant-pagination-jump-next-custom-icon"><a class="ant-pagination-item-link">
156-
<div class="ant-pagination-item-container"><i aria-label="icon: double-right" class="ant-pagination-item-link-icon anticon anticon-double-right"><svg viewBox="64 64 896 896" data-icon="double-right" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
157-
<path d="M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 0 0 188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 0 0 492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"></path>
158-
</svg></i><span class="ant-pagination-item-ellipsis">•••</span></div>
159-
</a></li>
160-
<li title="50" tabindex="0" class="ant-pagination-item ant-pagination-item-50"><a>50</a></li>
161-
<li title="Next Page" tabindex="0" class=" ant-pagination-next"><a class="ant-pagination-item-link"><i aria-label="icon: right" class="anticon anticon-right"><svg viewBox="64 64 896 896" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
162-
<path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"></path>
163-
</svg></i></a></li>
164-
<li class="ant-pagination-options">
165-
<div class="ant-pagination-options-quick-jumper">Goto<input type="text"></div>
166-
</li>
167-
</ul>
146+
<div>
147+
<ul unselectable="unselectable" class="ant-pagination">
148+
<li title="Previous Page" tabindex="0" class=" ant-pagination-prev"><a class="ant-pagination-item-link"><i aria-label="icon: left" class="anticon anticon-left"><svg viewBox="64 64 896 896" data-icon="left" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
149+
<path d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"></path>
150+
</svg></i></a></li>
151+
<li title="1" tabindex="0" class="ant-pagination-item ant-pagination-item-1"><a>1</a></li>
152+
<li title="2" tabindex="0" class="ant-pagination-item ant-pagination-item-2 ant-pagination-item-active"><a>2</a></li>
153+
<li title="3" tabindex="0" class="ant-pagination-item ant-pagination-item-3"><a>3</a></li>
154+
<li title="4" tabindex="0" class="ant-pagination-item ant-pagination-item-4"><a>4</a></li>
155+
<li title="5" tabindex="0" class="ant-pagination-item ant-pagination-item-5 ant-pagination-item-before-jump-next"><a>5</a></li>
156+
<li title="Next 5 Pages" tabindex="0" class="ant-pagination-jump-next ant-pagination-jump-next-custom-icon"><a class="ant-pagination-item-link">
157+
<div class="ant-pagination-item-container"><i aria-label="icon: double-right" class="ant-pagination-item-link-icon anticon anticon-double-right"><svg viewBox="64 64 896 896" data-icon="double-right" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
158+
<path d="M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 0 0 188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 0 0 492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"></path>
159+
</svg></i><span class="ant-pagination-item-ellipsis">•••</span></div>
160+
</a></li>
161+
<li title="50" tabindex="0" class="ant-pagination-item ant-pagination-item-50"><a>50</a></li>
162+
<li title="Next Page" tabindex="0" class=" ant-pagination-next"><a class="ant-pagination-item-link"><i aria-label="icon: right" class="anticon anticon-right"><svg viewBox="64 64 896 896" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
163+
<path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"></path>
164+
</svg></i></a></li>
165+
<li class="ant-pagination-options">
166+
<div class="ant-pagination-options-quick-jumper">Go to<input type="text"></div>
167+
</li>
168+
</ul> <br>
169+
<ul unselectable="unselectable" class="ant-pagination ant-pagination-disabled">
170+
<li title="Previous Page" tabindex="0" class=" ant-pagination-prev"><a class="ant-pagination-item-link"><i aria-label="icon: left" class="anticon anticon-left"><svg viewBox="64 64 896 896" data-icon="left" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
171+
<path d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"></path>
172+
</svg></i></a></li>
173+
<li title="1" tabindex="0" class="ant-pagination-item ant-pagination-item-1"><a>1</a></li>
174+
<li title="2" tabindex="0" class="ant-pagination-item ant-pagination-item-2 ant-pagination-item-active"><a>2</a></li>
175+
<li title="3" tabindex="0" class="ant-pagination-item ant-pagination-item-3"><a>3</a></li>
176+
<li title="4" tabindex="0" class="ant-pagination-item ant-pagination-item-4"><a>4</a></li>
177+
<li title="5" tabindex="0" class="ant-pagination-item ant-pagination-item-5 ant-pagination-item-before-jump-next"><a>5</a></li>
178+
<li title="Next 5 Pages" tabindex="0" class="ant-pagination-jump-next ant-pagination-jump-next-custom-icon"><a class="ant-pagination-item-link">
179+
<div class="ant-pagination-item-container"><i aria-label="icon: double-right" class="ant-pagination-item-link-icon anticon anticon-double-right"><svg viewBox="64 64 896 896" data-icon="double-right" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
180+
<path d="M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 0 0 188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 0 0 492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"></path>
181+
</svg></i><span class="ant-pagination-item-ellipsis">•••</span></div>
182+
</a></li>
183+
<li title="50" tabindex="0" class="ant-pagination-item ant-pagination-item-50"><a>50</a></li>
184+
<li title="Next Page" tabindex="0" class=" ant-pagination-next"><a class="ant-pagination-item-link"><i aria-label="icon: right" class="anticon anticon-right"><svg viewBox="64 64 896 896" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
185+
<path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"></path>
186+
</svg></i></a></li>
187+
<li class="ant-pagination-options">
188+
<div class="ant-pagination-options-quick-jumper">Go to<input disabled="disabled" type="text"></div>
189+
</li>
190+
</ul>
191+
</div>
168192
`;
169193
170194
exports[`renders ./components/pagination/demo/mini.md correctly 1`] = `
@@ -203,7 +227,7 @@ exports[`renders ./components/pagination/demo/mini.md correctly 1`] = `
203227
</div><span unselectable="on" class="ant-select-arrow" style="user-select: none;"><i aria-label="icon: down" class="ant-select-arrow-icon anticon anticon-down"><svg viewBox="64 64 896 896" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></i></span>
204228
</div>
205229
</div>
206-
<div class="ant-pagination-options-quick-jumper">Goto<input type="text"></div>
230+
<div class="ant-pagination-options-quick-jumper">Go to<input type="text"></div>
207231
</li>
208232
</ul>
209233
<ul unselectable="unselectable" class="ant-pagination mini">
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import Pagination from '..';
2+
import mountTest from '../../../tests/shared/mountTest';
3+
4+
describe('Pagination', () => {
5+
mountTest(Pagination);
6+
});

components/pagination/demo/basic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Basic pagination.
1010

1111
```tpl
1212
<template>
13-
<a-pagination v-model="current" :total="50" />
13+
<a-pagination v-model="current" :total="50" showLessItems />
1414
</template>
1515
<script>
1616
export default {

components/pagination/demo/changer.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Change `pageSize`.
2424
@showSizeChange="onShowSizeChange"
2525
:total="500"
2626
v-model="current"
27+
disabled
2728
/>
2829
</div>
2930
</template>

components/pagination/demo/jump.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ Jump to a page directly.
1010

1111
```tpl
1212
<template>
13+
<div>
1314
<a-pagination showQuickJumper :defaultCurrent="2" :total="500" @change="onChange" />
15+
<br/>
16+
<a-pagination showQuickJumper :defaultCurrent="2" :total="500" @change="onChange" disabled showLessItems />
17+
</div>
1418
</template>
1519
<script>
1620
export default {

components/pagination/index.en-US.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,24 @@
44
<a-pagination @change="onChange" :total="50" />
55
```
66

7-
| Property | Description | Type | Default |
8-
| --- | --- | --- | --- |
9-
| current(v-model) | current page number | number | - |
10-
| defaultCurrent | default initial page number | number | 1 |
11-
| defaultPageSize | default number of data items per page | number | 10 |
12-
| hideOnSinglePage | Whether to hide pager on single page | boolean | false |
13-
| itemRender | to customize item innerHTML | (page, type: 'page' \| 'prev' \| 'next', originalElement) => vNode | - |
14-
| pageSize(.sync) | number of data items per page | number | - |
15-
| pageSizeOptions | specify the sizeChanger options | string\[] | \['10', '20', '30', '40'] |
16-
| showQuickJumper | determine whether you can jump to pages directly | boolean | false |
17-
| showSizeChanger | determine whether `pageSize` can be changed | boolean | false |
18-
| showTotal | to display the total number and range | Function(total, range) | - |
19-
| simple | whether to use simple mode | boolean | - |
20-
| size | specify the size of `Pagination`, can be set to `small` | string | "" |
21-
| total | total number of data items | number | 0 |
7+
| Property | Description | Type | Default | Version |
8+
| --- | --- | --- | --- | --- |
9+
| current(v-model) | current page number | number | - | |
10+
| defaultCurrent | default initial page number | number | 1 | |
11+
| defaultPageSize | default number of data items per page | number | 10 | |
12+
| disabled | Disable pagination | boolean | - | 1.5.0 |
13+
| hideOnSinglePage | Whether to hide pager on single page | boolean | false | |
14+
| itemRender | to customize item innerHTML | (page, type: 'page' \| 'prev' \| 'next', originalElement) => vNode | - | |
15+
| pageSize(.sync) | number of data items per page | number | - | |
16+
| pageSizeOptions | specify the sizeChanger options | string\[] | \['10', '20', '30', '40'] | |
17+
| showLessItems | Show less page items | boolean | false | 1.5.0 |
18+
| showQuickJumper | determine whether you can jump to pages directly | boolean | false | |
19+
| showSizeChanger | determine whether `pageSize` can be changed | boolean | false | |
20+
| showTitle | Show page item's title | boolean | true | 1.5.0 |
21+
| showTotal | to display the total number and range | Function(total, range) | - | |
22+
| simple | whether to use simple mode | boolean | - | |
23+
| size | specify the size of `Pagination`, can be set to `small` | string | "" | |
24+
| total | total number of data items | number | 0 | |
2225

2326
### events
2427

components/pagination/index.zh-CN.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@
44
<a-pagination @change="onChange" :total="50" />
55
```
66

7-
| 参数 | 说明 | 类型 | 默认值 |
8-
| --- | --- | --- | --- |
9-
| current(v-model) | 当前页数 | number | - |
10-
| defaultCurrent | 默认的当前页数 | number | 1 |
11-
| defaultPageSize | 默认的每页条数 | number | 10 |
12-
| hideOnSinglePage | 只有一页时是否隐藏分页器 | boolean | false |
13-
| itemRender | 用于自定义页码的结构,可用于优化 SEO | (page, type: 'page' \| 'prev' \| 'next', originalElement) => vNode | - |
14-
| pageSize(.sync) | 每页条数 | number | - |
15-
| pageSizeOptions | 指定每页可以显示多少条 | string\[] | \['10', '20', '30', '40'] |
16-
| showQuickJumper | 是否可以快速跳转至某页 | boolean | false |
17-
| showSizeChanger | 是否可以改变 pageSize | boolean | false |
18-
| showTotal | 用于显示数据总量和当前数据顺序 | Function(total, range) | - |
19-
| simple | 当添加该属性时,显示为简单分页 | boolean | - |
20-
| size | 当为「small」时,是小尺寸分页 | string | "" |
21-
| total | 数据总数 | number | 0 |
7+
| 参数 | 说明 | 类型 | 默认值 | 版本 |
8+
| --- | --- | --- | --- | --- |
9+
| current(v-model) | 当前页数 | number | - | |
10+
| defaultCurrent | 默认的当前页数 | number | 1 | |
11+
| defaultPageSize | 默认的每页条数 | number | 10 | |
12+
| disabled | 禁用分页 | boolean | - | 1.5.0 |
13+
| hideOnSinglePage | 只有一页时是否隐藏分页器 | boolean | false | |
14+
| itemRender | 用于自定义页码的结构,可用于优化 SEO | (page, type: 'page' \| 'prev' \| 'next', originalElement) => vNode | - | |
15+
| pageSize(.sync) | 每页条数 | number | - | |
16+
| pageSizeOptions | 指定每页可以显示多少条 | string\[] | \['10', '20', '30', '40'] | |
17+
| showLessItems | show less page items | boolean | false | 1.5.0 |
18+
| showQuickJumper | 是否可以快速跳转至某页 | boolean | false | |
19+
| showSizeChanger | 是否可以改变 pageSize | boolean | false | |
20+
| showTotal | 用于显示数据总量和当前数据顺序 | Function(total, range) | - | |
21+
| simple | 当添加该属性时,显示为简单分页 | boolean | - | |
22+
| size | 当为「small」时,是小尺寸分页 | string | "" | |
23+
| total | 数据总数 | number | 0 | |
2224

2325
### 事件
2426

components/vc-pagination/Options.jsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default {
2626
methods: {
2727
getValidValue() {
2828
const { goInputText, current } = this;
29-
return isNaN(goInputText) ? current : Number(goInputText);
29+
return !goInputText || isNaN(goInputText) ? current : Number(goInputText);
3030
},
3131
defaultBuildOptionText(opt) {
3232
return `${opt.value} ${this.locale.items_per_page}`;
@@ -39,10 +39,17 @@ export default {
3939
});
4040
},
4141
handleBlur() {
42-
const { goButton, quickGo } = this;
42+
const { goButton, quickGo, rootPrefixCls } = this.$props;
4343
if (goButton) {
4444
return;
4545
}
46+
if (
47+
e.relatedTarget &&
48+
(e.relatedTarget.className.indexOf(`${rootPrefixCls}-prev`) >= 0 ||
49+
e.relatedTarget.className.indexOf(`${rootPrefixCls}-next`) >= 0)
50+
) {
51+
return;
52+
}
4653
quickGo(this.getValidValue());
4754
},
4855
go(e) {

0 commit comments

Comments
 (0)