!1880 新增:右侧模板参数列表增加色块

pull/1884/MERGE
林三 2 years ago committed by ChenX
parent ef06abb7ee
commit e54508f576

@ -646,6 +646,7 @@ export class TemplateParamDetail extends React.Component<{}> {
min={-360}
max={360}
stepSize={90}
majorStepSize={90}
onKeyDown={(e) => { this.onKeydown(e, par); }}
className={Classes.INPUT}
value={inputValue}

@ -1,8 +1,10 @@
import { Intent, ITreeNode } from "@blueprintjs/core";
import { Icon, Intent, ITreeNode, MaybeElement } from "@blueprintjs/core";
import { action, IObservableArray, observable } from "mobx";
import React from "react";
import { end } from "xaop";
import { app } from "../../../ApplicationServices/Application";
import { arrayLast } from "../../../Common/ArrayExt";
import { ColorMaterial } from "../../../Common/ColorPalette";
import { CommandNames } from "../../../Common/CommandNames";
import { FixedNotZero } from "../../../Common/Utils";
import { CommandHistoryRecord } from "../../../DatabaseServices/CommandHistoryRecord";
@ -261,7 +263,6 @@ export class TemplateParamPanelStore
children.push(t);
}
}
let node: ITreeNode = {
id: template.Id.Index,
label: template.Name === "" ? "[ 空名称 ]" : template.Name,
@ -270,6 +271,12 @@ export class TemplateParamPanelStore
isExpanded: template.isExpanded,
nodeData: template,
};
if (template.NodeDepth !== 0)
{
//树节点色块
let icon = React.createElement(Icon, { icon: "symbol-square", color: "#" + ColorMaterial.GetColor(template.NodeDepth + 1).getHexString() });
(((node.icon as MaybeElement)) as JSX.Element) = icon;
}
return node;
};

Loading…
Cancel
Save