Skip to content

Commit 00efa5e

Browse files
zhsongasendya
authored andcommitted
expand以事件形式发布
1 parent 53192b9 commit 00efa5e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/components/Table/index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ export default {
2323
type: Function,
2424
required: true
2525
},
26-
onExpand: {
27-
type: Function,
28-
required: false
29-
},
3026
pageNum: {
3127
type: Number,
3228
default: 1
@@ -305,7 +301,7 @@ export default {
305301
return props[k]
306302
})
307303
const table = (
308-
<a-table {...{ props, scopedSlots: { ...this.$scopedSlots } }} onChange={this.loadData} onExpand={ (expanded, record) => { this.onExpand && this.onExpand(expanded, record) } }>
304+
<a-table {...{ props, scopedSlots: { ...this.$scopedSlots } }} onChange={this.loadData} onExpand={ (expanded, record) => { this.$emit('expand', expanded, record) } }>
309305
{ Object.keys(this.$slots).map(name => (<template slot={name}>{this.$slots[name]}</template>)) }
310306
</a-table>
311307
)

0 commit comments

Comments
 (0)