Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ant-design-pro-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianzhuanghu
ant-design-pro-vue
Commits
c32c8d4c
Commit
c32c8d4c
authored
Mar 26, 2019
by
saraka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: showSizeChanger无效 #148
parent
2f939dcb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
index.js
src/components/Table/index.js
+5
-4
No files found.
src/components/Table/index.js
View file @
c32c8d4c
...
@@ -59,7 +59,7 @@ export default {
...
@@ -59,7 +59,7 @@ export default {
default
:
false
default
:
false
},
},
showPagination
:
{
showPagination
:
{
type
:
String
,
type
:
String
|
Boolean
,
default
:
'auto'
default
:
'auto'
}
}
}),
}),
...
@@ -119,9 +119,9 @@ export default {
...
@@ -119,9 +119,9 @@ export default {
this
.
localLoading
=
true
this
.
localLoading
=
true
const
parameter
=
Object
.
assign
({
const
parameter
=
Object
.
assign
({
pageNo
:
(
pagination
&&
pagination
.
current
)
||
pageNo
:
(
pagination
&&
pagination
.
current
)
||
this
.
localPagination
.
current
,
this
.
localPagination
.
current
||
this
.
pageNum
,
pageSize
:
(
pagination
&&
pagination
.
pageSize
)
||
pageSize
:
(
pagination
&&
pagination
.
pageSize
)
||
this
.
localPagination
.
pageSize
this
.
localPagination
.
pageSize
||
this
.
pageSize
},
},
(
sorter
&&
sorter
.
field
&&
{
(
sorter
&&
sorter
.
field
&&
{
sortField
:
sorter
.
field
sortField
:
sorter
.
field
...
@@ -153,7 +153,8 @@ export default {
...
@@ -153,7 +153,8 @@ export default {
// 这里用于判断接口是否有返回 r.totalCount 或 this.showPagination = false
// 这里用于判断接口是否有返回 r.totalCount 或 this.showPagination = false
// 当情况满足时,表示数据不满足分页大小,关闭 table 分页功能
// 当情况满足时,表示数据不满足分页大小,关闭 table 分页功能
!
r
.
totalCount
&&
[
'auto'
,
false
].
includes
(
this
.
showPagination
)
&&
(
this
.
localPagination
=
false
)
(
!
this
.
showPagination
||
!
r
.
totalCount
&&
this
.
showPagination
===
'auto'
)
&&
(
this
.
localPagination
=
false
)
this
.
localDataSource
=
r
.
data
// 返回结果中的数组数据
this
.
localDataSource
=
r
.
data
// 返回结果中的数组数据
this
.
localLoading
=
false
this
.
localLoading
=
false
})
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment