The Wayback Machine - https://web.archive.org/web/20200619222621/https://github.com/xuliangzhan/vxe-table/issues/741
Skip to content
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

表格内按钮状态/样式修改 #741

Open
china-live opened this issue Mar 26, 2020 · 0 comments
Open

表格内按钮状态/样式修改 #741

china-live opened this issue Mar 26, 2020 · 0 comments

Comments

@china-live
Copy link

@china-live china-live commented Mar 26, 2020

(必填)这个需求解决了什么问题 What problem does this feature solve

?表格内有一个或多个操作按钮,我希望在点击这些按钮后显示loading,并在稍后处理完毕后恢复。

(必填)请填写问题链接来描述为什么无法实现该功能,例如(jsfiddlecodesandboxjsrun) Reproduction link

?如果要实现这样的功能,就需要使用 $event 把原生DOM 事件传入处理方法,但目前vxe-button好像无法这样传入(表格内用原生非vxe-按钮要单独调样式)。

(必填)建议的 API 是什么样的 What does the proposed API look like

?希望实现可以用$event将DOM 事件传入处理方法,虽然这有悖 vue 尽量不直接操作原生 DOM 的理念,但实现这种效果确实是最直观最简洁的方式。

是否已有其他不错的替代方案 Describe alternatives you've considered

?有其他解决方案,比如给数据源 row 添加一个 btnSendLoading 这样的属性并绑定到按钮 loading,但不觉得这样有点小题大作了吗?如果表格内有N操作按钮,就得添加N个 loading 属性

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.