File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export default {
51
51
} ,
52
52
rowSelection : {
53
53
type : Object ,
54
- default : ( ) => ( { } )
54
+ default : null
55
55
} ,
56
56
/** @Deprecated */
57
57
showAlertInfo : {
@@ -254,7 +254,7 @@ export default {
254
254
}
255
255
if ( k === 'rowSelection' ) {
256
256
if ( showAlert && this . rowSelection ) {
257
- // 重新绑定 rowSelection 事件
257
+ // 如果需要使用alert,则重新绑定 rowSelection 事件
258
258
props [ k ] = {
259
259
selectedRows : this . selectedRows ,
260
260
selectedRowKeys : this . selectedRowKeys ,
@@ -264,10 +264,11 @@ export default {
264
264
}
265
265
}
266
266
return props [ k ]
267
+ } else if ( ! this . rowSelection ) {
268
+ // 如果没打算开启 rowSelection 则清空默认的选择项
269
+ props [ k ] = null
270
+ return props [ k ]
267
271
}
268
- // 如果没打算开启 rowSelection 则清空默认的选择项
269
- props [ k ] = null
270
- return props [ k ]
271
272
}
272
273
props [ k ] = this [ k ]
273
274
return props [ k ]
You can’t perform that action at this time.
0 commit comments