Skip to content

Commit 53192b9

Browse files
zhsongasendya
authored andcommitted
完善s-table expand事件
1 parent 0b7e4ae commit 53192b9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/Table/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ export default {
2323
type: Function,
2424
required: true
2525
},
26+
onExpand: {
27+
type: Function,
28+
required: false
29+
},
2630
pageNum: {
2731
type: Number,
2832
default: 1
@@ -301,7 +305,7 @@ export default {
301305
return props[k]
302306
})
303307
const table = (
304-
<a-table {...{ props, scopedSlots: { ...this.$scopedSlots } }} onChange={this.loadData}>
308+
<a-table {...{ props, scopedSlots: { ...this.$scopedSlots } }} onChange={this.loadData} onExpand={ (expanded, record) => { this.onExpand && this.onExpand(expanded, record) } }>
305309
{ Object.keys(this.$slots).map(name => (<template slot={name}>{this.$slots[name]}</template>)) }
306310
</a-table>
307311
)

0 commit comments

Comments
 (0)