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
ae4edae3
Commit
ae4edae3
authored
Mar 07, 2019
by
linziguan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复:在不使用alert的情况下,自定义rowSelection失效问题
parent
b052d5ee
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
index.js
src/components/table/index.js
+4
-3
No files found.
src/components/table/index.js
View file @
ae4edae3
...
@@ -51,7 +51,7 @@ export default {
...
@@ -51,7 +51,7 @@ export default {
},
},
rowSelection
:
{
rowSelection
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
({})
default
:
null
},
},
/** @Deprecated */
/** @Deprecated */
showAlertInfo
:
{
showAlertInfo
:
{
...
@@ -254,7 +254,7 @@ export default {
...
@@ -254,7 +254,7 @@ export default {
}
}
if
(
k
===
'rowSelection'
)
{
if
(
k
===
'rowSelection'
)
{
if
(
showAlert
&&
this
.
rowSelection
)
{
if
(
showAlert
&&
this
.
rowSelection
)
{
// 重新绑定 rowSelection 事件
//
如果需要使用alert,则
重新绑定 rowSelection 事件
props
[
k
]
=
{
props
[
k
]
=
{
selectedRows
:
this
.
selectedRows
,
selectedRows
:
this
.
selectedRows
,
selectedRowKeys
:
this
.
selectedRowKeys
,
selectedRowKeys
:
this
.
selectedRowKeys
,
...
@@ -264,11 +264,12 @@ export default {
...
@@ -264,11 +264,12 @@ export default {
}
}
}
}
return
props
[
k
]
return
props
[
k
]
}
}
else
if
(
!
this
.
rowSelection
){
// 如果没打算开启 rowSelection 则清空默认的选择项
// 如果没打算开启 rowSelection 则清空默认的选择项
props
[
k
]
=
null
props
[
k
]
=
null
return
props
[
k
]
return
props
[
k
]
}
}
}
props
[
k
]
=
this
[
k
]
props
[
k
]
=
this
[
k
]
return
props
[
k
]
return
props
[
k
]
})
})
...
...
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