mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-05-31 05:14:02 +00:00
优化子菜单的图标
This commit is contained in:
parent
cdb676c582
commit
9bde8998e5
@ -488,10 +488,24 @@ export default defineComponent({
|
||||
menus.push({ type: ccui.menu.MenuType.Separator });
|
||||
if (data) {
|
||||
const breakMenus: IUiMenuItem[] = [];
|
||||
const iconMap = {};
|
||||
iconMap[BreakOnType.ActiveChanged] = "view_on";
|
||||
iconMap[BreakOnType.ChildRemoved] = "node";
|
||||
iconMap[BreakOnType.ChildAdded] = "node";
|
||||
iconMap[BreakOnType.CompAdded] = "component";
|
||||
iconMap[BreakOnType.CompRemoved] = "component";
|
||||
iconMap[BreakOnType.ColorChanged] = "color";
|
||||
iconMap[BreakOnType.Destroyed] = "trash";
|
||||
iconMap[BreakOnType.LayerChanged] = "layer";
|
||||
iconMap[BreakOnType.ParentChanged] = "parent";
|
||||
iconMap[BreakOnType.SiblingOrderChanged] = "order";
|
||||
iconMap[BreakOnType.SizeChanged] = "size";
|
||||
iconMap[BreakOnType.TransformChanged] = "widget";
|
||||
for (let key in BreakOnType) {
|
||||
const v = BreakOnType[key];
|
||||
breakMenus.push({
|
||||
name: `${v}`,
|
||||
icon: iconMap[v] || "",
|
||||
enabled: true,
|
||||
callback: (item) => {
|
||||
ga.fireEventWithParam(GA_EventName.MouseMenu, item.name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user