VisActor / VisActor/VTable

[Feature] 希望右键菜单 contextMenuItems 中的 MenuListItem 增加 disabled 参数用于控制某一菜单是否可用

Open
#3,657 1 comment 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.