Unverified Commit 68ddd4f9 by 言肆 Committed by GitHub

Merge pull request #115 from linziguan/master

fix: solve rowSelection affected by alert prop.
parents 9a833878 556cc7b3
...@@ -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,10 +264,11 @@ export default { ...@@ -264,10 +264,11 @@ export default {
} }
} }
return props[k] return props[k]
} else if (!this.rowSelection) {
// 如果没打算开启 rowSelection 则清空默认的选择项
props[k] = null
return props[k]
} }
// 如果没打算开启 rowSelection 则清空默认的选择项
props[k] = null
return props[k]
} }
props[k] = this[k] props[k] = this[k]
return props[k] return props[k]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment