-
老师好,请问如下图所示的登陆avatar是如何添加并绑定点击事件/功能的? |
Beta Was this translation helpful? Give feedback.
Answered by
yantze
Sep 30, 2022
Replies: 1 comment 3 replies
-
给 MenuId.ActivityBarExtra 加一个菜单项就可以了 const icon = 'https://img.alicdn.com/imgextra/i4/1024-1024.svg';
this.commandRegistry.registerCommand({
id: CORE_COMMANDS.OPEN_DASHBOARD.id,
iconClass: classnames(this.iconService.fromIcon('', icon, IconType.Background)),
}, {
execute: () => {
// actions
},
});
this.menuRegistry.registerMenuItem(MenuId.ActivityBarExtra, {
command: { id: CORE_COMMANDS.OPEN_DASHBOARD.id, label: '打开应用管理器' },
order: 0,
group: 'navigation',
}); |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
bytemain
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
给 MenuId.ActivityBarExtra 加一个菜单项就可以了