自定义按钮的权限控制 #3721
Unanswered
13701138894
asked this question in
Q&A | 常见问题
自定义按钮的权限控制
#3721
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
您好,我自定义了一个按钮,id是 'report',我想根据需要,随时进行权限切换控制,该怎么做,请问有自定义按钮的权限控制示例吗?
在注册UniverSheetsUIPlugin时候可以进行隐藏控制,但是不能重复调用,会提示已注册 ,谢谢toRaw(univerRef.value).registerPlugin(UniverSheetsUi.UniverSheetsUIPlugin, {
menu: {
'report': {
hidden: true
}
}
})
export const reportButtonOperation = {
id: 'report',
type: CommandType.OPERATION,
handler: async (accessor) => {
}
}
Beta Was this translation helpful? Give feedback.
All reactions