We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
当单击某行切换单选选中更新选中值前,我需要弹出弹窗提示用户是否要切换行选中,我需要做异步,当异步返回true,则更改单选值切换行,否则不更改,如下:
// 类型定义 type canCheckRadioAsync = (params: { row: Row }) => Promise<boolean>
// 方法定义 const canCheckRadioAsync: async ({ row }) => { return new Promise((resolve, reject) => { // 弹出弹窗 AModal.confirm({ title: '表单数据未保存,是否切换选中行?', onOk: async () => { await save(); // 保存数据 resolve(true) // 允许切换行选中 }, onCancel: () => { resolve(false); // 不切换行选中 } }); }); } // vxe-table内部更改单选值前调用该方法 const can = await canCheckRadioAsync(); if (can) // vxe-table内部更改单选选中的值 else // vxe-table内部不更改单选选中值
暂无
The text was updated successfully, but these errors were encountered:
文档有 beforeSelectMethod 可以实现,也可以异步自定义实现
Sorry, something went wrong.
但是beforeSelectMethod是同步的,我需要异步的实现方式
No branches or pull requests
这个需求解决了什么问题:
当单击某行切换单选选中更新选中值前,我需要弹出弹窗提示用户是否要切换行选中,我需要做异步,当异步返回true,则更改单选值切换行,否则不更改,如下:
建议的 API 是什么样的:
是否已有其他不错的替代方案:
暂无
是否使用当前最新版本?
The text was updated successfully, but these errors were encountered: