-
Notifications
You must be signed in to change notification settings - Fork 58
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
您好,函数模式如何动态控制显示隐藏呢 #20
Comments
同问。好像只能设置disabled |
对,不能点的直接不用显示就行啊 |
1.1.6 更新了,在菜单项配置上新增了 你只需要将菜单数据声明为响应式数据,即可动态修改菜单: const menuData = reactive<MenuOptions>({
items: [
{
label: 'Simple item',
hidden: false, //控制是否隐藏
onClick: () => alert('Click Simple item'),
},
]
});
ContextMenu.showContextMenu(menuData);
//可以在显示菜单后随时更改属性:
menuData.items[0].hidden = true; //动态更改是否隐藏 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: