|
|
@ -42,15 +42,15 @@ export class WineRackModal extends React.Component<{ store?: WineRackStore; }, {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
app.Editor.ModalManage.Destory();
|
|
|
|
app.Editor.ModalManage.Destory();
|
|
|
|
if (this.props.store.editorTemplate)
|
|
|
|
if (this.props.store.EditorTemplate)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
await CommandWrap(async () =>
|
|
|
|
await CommandWrap(async () =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
let temp = this.props.store.editorTemplate;
|
|
|
|
let temp = this.props.store.EditorTemplate;
|
|
|
|
temp.Option = opt;
|
|
|
|
temp.Option = opt;
|
|
|
|
await temp.UpdateTemplateTree();
|
|
|
|
await temp.UpdateTemplateTree();
|
|
|
|
app.Editor.UpdateScreen();
|
|
|
|
app.Editor.UpdateScreen();
|
|
|
|
this.props.store.editorTemplate = undefined;
|
|
|
|
this.props.store.EditorTemplate = undefined;
|
|
|
|
}, "编辑酒格");
|
|
|
|
}, "编辑酒格");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -131,7 +131,7 @@ export class WineRackModal extends React.Component<{ store?: WineRackStore; }, {
|
|
|
|
icon={IconNames.REGRESSION_CHART}
|
|
|
|
icon={IconNames.REGRESSION_CHART}
|
|
|
|
close={() =>
|
|
|
|
close={() =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.props.store.editorTemplate = undefined;
|
|
|
|
this.props.store.EditorTemplate = undefined;
|
|
|
|
app.Editor.ModalManage.Destory();
|
|
|
|
app.Editor.ModalManage.Destory();
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
bodyClass="door"
|
|
|
|
bodyClass="door"
|
|
|
@ -140,7 +140,7 @@ export class WineRackModal extends React.Component<{ store?: WineRackStore; }, {
|
|
|
|
footerChildren={
|
|
|
|
footerChildren={
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
text={this.props.store.editorTemplate === undefined ? "绘制" : "更新"}
|
|
|
|
text={this.props.store.EditorTemplate === undefined ? "绘制" : "更新"}
|
|
|
|
intent={Intent.SUCCESS}
|
|
|
|
intent={Intent.SUCCESS}
|
|
|
|
onClick={this.handleExec}
|
|
|
|
onClick={this.handleExec}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
@ -149,7 +149,7 @@ export class WineRackModal extends React.Component<{ store?: WineRackStore; }, {
|
|
|
|
intent={Intent.DANGER}
|
|
|
|
intent={Intent.DANGER}
|
|
|
|
onClick={() =>
|
|
|
|
onClick={() =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.props.store.editorTemplate = undefined;
|
|
|
|
this.props.store.EditorTemplate = undefined;
|
|
|
|
app.Editor.ModalManage.Destory();
|
|
|
|
app.Editor.ModalManage.Destory();
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|