Skip to content

请问左侧tabbar底部怎么添加新的图标并绑定功能 #1741

Answered by yantze
lovelytan asked this question in Q&A
Discussion options

You must be logged in to vote

给 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',
});

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@lovelytan
Comment options

@erha19
Comment options

@lovelytan
Comment options

Answer selected by bytemain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants