-
想在这个位置放个图标,代码如下,实现效果是隐藏菜单那种 想问下有办法在editor title右边增加个图标吗? |
Beta Was this translation helpful? Give feedback.
Answered by
bytemain
Sep 21, 2022
Replies: 1 comment
-
首先: 第二: 用 iconService.fromIcon 可以把一个图片 url 转换成 css class |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
bytemain
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
首先:
目前没办法,需要的话可以自己修改 @opensumi/ide-editor 模块实现。如果要把菜单注册到 ... 菜单内,可以看一下菜单内的内容,翻一下源码看一下,我记得是 group 改一下就行了,改成 group: '0_internal'
第二:
可以用 iconService 来转换图标
这里的 icon 支持用 $(xxx) 来指定 codicon (https://microsoft.github.io/vscode-codicons/dist/codicon.html), 用法类似 iconService.fromString('$(diff)'),iconService 可以把 codicon 转换成 css class
用 iconService.fromIcon 可以把一个图片 url 转换成 css class