fix edit subtree path
This commit is contained in:
1 parent
258a006383
commit
8e43285089
1 file changed
+9
@@ -47,6 +47,7 @@ export default class NodePanel extends React.Component<NodePanelProps> {
|
|||||||
name: model.name,
|
name: model.name,
|
||||||
desc: model.desc,
|
desc: model.desc,
|
||||||
debug: model.debug,
|
debug: model.debug,
|
||||||
|
path: model.path,
|
||||||
customArgs: model.args ? JSON.stringify(model.args, null, " ") : "",
|
customArgs: model.args ? JSON.stringify(model.args, null, " ") : "",
|
||||||
};
|
};
|
||||||
if (model.args) {
|
if (model.args) {
|
||||||
@@ -95,6 +96,11 @@ export default class NodePanel extends React.Component<NodePanelProps> {
|
|||||||
model.desc = values.desc;
|
model.desc = values.desc;
|
||||||
model.debug = values.debug;
|
model.debug = values.debug;
|
||||||
|
|
||||||
|
if (model.path !== values.path) {
|
||||||
|
model.path = values.path;
|
||||||
|
forceUpdate = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (conf.args) {
|
if (conf.args) {
|
||||||
conf.args.forEach((e) => {
|
conf.args.forEach((e) => {
|
||||||
const k = "args." + e.name;
|
const k = "args." + e.name;
|
||||||
@@ -188,6 +194,9 @@ export default class NodePanel extends React.Component<NodePanelProps> {
|
|||||||
<Item label="调试开关" name="debug" valuePropName="checked">
|
<Item label="调试开关" name="debug" valuePropName="checked">
|
||||||
<Switch onChange={this.handleSubmit} />
|
<Switch onChange={this.handleSubmit} />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item label="子树" name="path">
|
||||||
|
<Input onBlur={this.handleSubmit} />
|
||||||
|
</Item>
|
||||||
<Markdown source={conf.doc} />
|
<Markdown source={conf.doc} />
|
||||||
{this.renderInputs(conf)}
|
{this.renderInputs(conf)}
|
||||||
{this.renderArgs(conf)}
|
{this.renderArgs(conf)}
|
||||||
|
|||||||
Reference in new issue
Block a user