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
62f8f10a
Commit
62f8f10a
authored
Oct 25, 2018
by
Sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: onChange loadDada #1
parent
46c5d7fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
index.js
src/components/table/index.js
+18
-1
No files found.
src/components/table/index.js
View file @
62f8f10a
...
...
@@ -15,7 +15,7 @@ export default {
},
props
:
Object
.
assign
({},
T
.
props
,
{
rowKey
:
{
type
:
String
,
type
:
[
String
,
Function
]
,
default
:
'id'
},
data
:
{
...
...
@@ -83,6 +83,23 @@ export default {
this
.
loadData
();
},
loadData
(
pagination
,
filters
,
sorter
)
{
/* region
* 由于 Pagination 修改分页下拉选项触发了 showSizeChange 和 change 事件 ,
* 而 a-table 中将 showSizeChange 转为 change 事件 , 导致 change 事件重复触发了 2 次 ,
* 此处临时处理 , 待作者修复后移除 */
let
_paramStr
=
JSON
.
stringify
({
pagination
,
filters
,
sorter
})
if
(
this
.
_lastChangeParamStr
===
_paramStr
&&
(
Date
.
now
()
-
this
.
_lastChangeTimestamp
)
<
10
)
{
return
}
this
.
_lastChangeParamStr
=
_paramStr
;
this
.
_lastChangeTimestamp
=
Date
.
now
();
/* regionend */
this
.
localLoading
=
true
var
result
=
this
.
data
(
Object
.
assign
({
...
...
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