-
Notifications
You must be signed in to change notification settings - Fork 1.2k
添加footerMethod回调第二个参数 #998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
updateFooter () {
const { showFooter, visibleColumn, footerMethod } = this
if (showFooter && footerMethod) {
this.footerData = visibleColumn.length ? footerMethod({ columns: visibleColumn, data: this.afterFullData },{$table: this, $grid: this.$xegrid}) : []
}
return this.$nextTick()
},
|
footerMethod需要第二个参数Context来联系上下文进行其他操作 |
|
The footerMethod requires a second argument, Context({$table: this, $grid: this.$xegrid}), to contact the Context for other operations |
|
所有事件及参数方法不允许存在多个参数,只允许接收一个参数 params |
|
但是params里面没有可以作为联系上下文的this实例,比如$grid参数
发自我的iPhone
…------------------ 原始邮件 ------------------
发件人: xuliangzhan <notifications@github.com>
发送时间: 2020年8月16日 12:21
收件人: x-extends/vxe-table <vxe-table@noreply.github.com>
抄送: roninTitans <2396757591@qq.com>, Author <author@noreply.github.com>
主题: 回复:[x-extends/vxe-table] 添加footerMethod回调第二个参数 (#998)
所有事件及参数方法不允许存在多个参数,只允许接收一个参数 params
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
|
请修改为:footerMethod({ columns: visibleColumn, data: this.afterFullData, $table: this, $grid: this.$xegrid }) |
|
比如editrRender就有第二个参数,因为这个参数有用,我要用它取父组件的this实例
发自我的iPhone
…------------------ 原始邮件 ------------------
发件人: xuliangzhan <notifications@github.com>
发送时间: 2020年8月16日 12:21
收件人: x-extends/vxe-table <vxe-table@noreply.github.com>
抄送: roninTitans <2396757591@qq.com>, Author <author@noreply.github.com>
主题: 回复:[x-extends/vxe-table] 添加footerMethod回调第二个参数 (#998)
所有事件及参数方法不允许存在多个参数,只允许接收一个参数 params
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
看得出来你也是个很喜欢折腾的人👍 |
已修改提交 |
updateFooter () {
const { showFooter, visibleColumn, footerMethod } = this
if (showFooter && footerMethod) {
this.footerData = visibleColumn.length ? footerMethod({ columns: visibleColumn, data: this.afterFullData },{$table: this, $grid: this.$xegrid}) : []
}
return this.$nextTick()
},