[Feature] 希望右键菜单 contextMenuItems 中的 MenuListItem 增加 disabled 参数用于控制某一菜单是否可用
Open
@fangsmile is already working on this.
Since Apr 14, 2025.
feature
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 486
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 16
Description
What problem does this feature solve?
右键菜单 contextMenuItems 可以进行自定义,但有些情况下,我们需要显示全部菜单,达到告知用户有此菜单项,但触发条件不满足点击菜单。所以希望通过 disabled 禁用某一菜单。
What does the proposed API look like?
type MenuListItem =
| string
| {
text?: string;
type?: 'title' | 'item' | 'split';
menuKey?: string;
icon?: Icon;
selectedIcon?: Icon;
stateIcon?: Icon;
children?: MenuListItem[];
disabled?: Boolean; // 增加参数
};
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.