Bind create object function into command bar

This commit is contained in:
MrKBear 2022-03-04 17:15:31 +08:00
parent 070a9daf42
commit e7533fab55

View File

@ -59,8 +59,16 @@ class CommandBar extends Component<ICommandBarProps & IMixinSettingProps & IMixi
active: mouseMod === MouseMod.click, active: mouseMod === MouseMod.click,
click: () => this.props.status ? this.props.status.setMouseMod(MouseMod.click) : undefined click: () => this.props.status ? this.props.status.setMouseMod(MouseMod.click) : undefined
})} })}
{this.getRenderButton({ iconName: "WebAppBuilderFragmentCreate", i18NKey: "Command.Bar.Add.Group.Info" })} {this.getRenderButton({
{this.getRenderButton({ iconName: "CubeShape", i18NKey: "Command.Bar.Add.Range.Info" })} iconName: "WebAppBuilderFragmentCreate",
i18NKey: "Command.Bar.Add.Group.Info",
click: () => this.props.status ? this.props.status.newGroup() : undefined
})}
{this.getRenderButton({
iconName: "CubeShape",
i18NKey: "Command.Bar.Add.Range.Info",
click: () => this.props.status ? this.props.status.newRange() : undefined
})}
{this.getRenderButton({ iconName: "StepSharedAdd", i18NKey: "Command.Bar.Add.Behavior.Info" })} {this.getRenderButton({ iconName: "StepSharedAdd", i18NKey: "Command.Bar.Add.Behavior.Info" })}
{this.getRenderButton({ iconName: "Tag", i18NKey: "Command.Bar.Add.Tag.Info" })} {this.getRenderButton({ iconName: "Tag", i18NKey: "Command.Bar.Add.Tag.Info" })}
{this.getRenderButton({ iconName: "Camera", i18NKey: "Command.Bar.Camera.Info" })} {this.getRenderButton({ iconName: "Camera", i18NKey: "Command.Bar.Camera.Info" })}