feat(plugin): add custom styles, icons, and class names for context-menu plugin#5107
Open
mealcomes wants to merge 1 commit intoVisActor:developfrom
Open
feat(plugin): add custom styles, icons, and class names for context-menu plugin#5107mealcomes wants to merge 1 commit intoVisActor:developfrom
mealcomes wants to merge 1 commit intoVisActor:developfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
related: #2032 #4151
💡 Background and solution
基于右键菜单插件 (context-menu) 无法自定义类名和样式的问题,进行配置的更新,具体如下:
CustomMenuAttributions统一配置iconName: 'copy'— 内置 emoji 图标(兼容原版本)customIcon: { svg: '...', width: 16, height: 16 }— SVG 图标customIcon: (menuItem) => HTMLElement— 渲染函数CustomMenuAttributions.class— 统一追加类名MenuItem.customClassName— 单项精细化类名具体使用示例见 context-menu.ts
📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
copilot:summary
🔍 Walkthrough
copilot:walkthrough