Replies: 2 comments
-
简单又看了下 , RawContextKey 时 monaco editor 的原生对象, IContextKey 对 RawContextKey 封装了一层,同时把显隐条件从 menu 移动到了 command 的位置。 不知道这样理解对不对。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
可以通过 |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
RawContextKey 和 IContextKey 有什么区别,以及在注册菜单时分别应如何使用
看代码可知 RawContextKey 就是一个 KV 并且包装了一些逻辑运算,
IContextKey 则是类似上下文对象,包装了 get set 方法。
在 菜单注册的 when 里面,我们应该如何使用这两个类 ?
ps: 我希望用一个枚举状态来判断菜单 item 是否显示
Beta Was this translation helpful? Give feedback.
All reactions