Skip to content

提议TableAction(actionColumn),增强操作列的灵活性 #2852

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

Open
1 task done
6LWa6ZKx opened this issue Mar 28, 2025 · 3 comments
Open
1 task done

提议TableAction(actionColumn),增强操作列的灵活性 #2852

6LWa6ZKx opened this issue Mar 28, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@6LWa6ZKx
Copy link

6LWa6ZKx commented Mar 28, 2025

这个需求解决了什么问题:

在实际业务中,右侧悬浮的操作列是必须的。灵活可控的操作列能增强表格能力。

建议的 API 是什么样的:

贴上一个vben的解决方案,对于options提供额外的参数用来描述操作列。
例如:tooltip、icon、auth、tooltip、ifShow、 disabled等等函数。

actionColumn: { width: 115, align: 'center', title: '操作', dataIndex: 'action', fixed: 'right', customRender: ({ record }) => { const actions: ActionItem[] = [ { tooltip: '提交审核', color: 'success', auth: 'parkms:owner_cut:submit', icon: IconEnum.CHECK, ifShow: record.status == 0 || record.status == -1, disabled: record.status != 2, onClick: () => { submitAudit(record); }, }, ]; return h(TableAction, { actions, outside: false }); }, },

Image

是否已有其他不错的替代方案:

未发现

是否使用当前最新版本?

  • 我已确认是使用当前的最新版本。
@6LWa6ZKx 6LWa6ZKx added the enhancement New feature or request label Mar 28, 2025
@xlz26296
Copy link
Contributor

xlz26296 commented Mar 28, 2025

官网文档不是都有吗

@zkzgs
Copy link

zkzgs commented Mar 28, 2025

官网文档不是都有吗

他想要一个封装好直接可以用的TableAction组件

@zkzgs
Copy link

zkzgs commented Mar 28, 2025

我的建议是你可以自己写,vben也是二次封装的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants