show json data when node is undefined
This commit is contained in:
1 parent
6ae27c50a0
commit
dae8f81d25
6 files changed
+12
-5
No files matched your search
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "behavior3editor",
|
||||
"version": "1.8.9",
|
||||
"version": "1.8.10",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "behavior3editor",
|
||||
"version": "1.8.9",
|
||||
"version": "1.8.10",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "behavior3editor",
|
||||
"version": "1.8.9",
|
||||
"version": "1.8.10",
|
||||
"main": "dist-electron/main/index.js",
|
||||
"description": "行为树编辑器",
|
||||
"author": "zhandouxiaojiji & codetypes",
|
||||
|
||||
@@ -131,6 +131,6 @@
|
||||
"node.subtreeSaveRootError": "Root node cann't be save as subtree",
|
||||
"node.type": "Node type",
|
||||
"node.undefinedVariable": "Variable '{{variable}}' is not defined",
|
||||
|
||||
"node.jsonData": "JSON Data",
|
||||
"node.unknown.desc": "New node"
|
||||
}
|
||||
@@ -131,5 +131,6 @@
|
||||
"node.subtreeSaveRootError": "根节点不能保存为子树",
|
||||
"node.type": "节点类型",
|
||||
"node.undefinedVariable": "变量 “{{variable}}” 未定义",
|
||||
"node.jsonData": "JSON 数据",
|
||||
"node.unknown.desc": "新建节点"
|
||||
}
|
||||
@@ -616,6 +616,7 @@ const NodeInspector: FC = () => {
|
||||
} else {
|
||||
form.setFieldValue("children", def.children);
|
||||
}
|
||||
form.setFieldValue("json-data", JSON.stringify(data, null, 2));
|
||||
def.args?.forEach((arg) => {
|
||||
const type = getNodeArgRawType(arg);
|
||||
const value = data.args?.[arg.name];
|
||||
@@ -1495,6 +1496,11 @@ const NodeInspector: FC = () => {
|
||||
})}
|
||||
</>
|
||||
)}
|
||||
{def.name === "unknown" && (
|
||||
<Form.Item name="json-data" label={t("node.jsonData")}>
|
||||
<TextArea autoSize />
|
||||
</Form.Item>
|
||||
)}
|
||||
</Form>
|
||||
{disabled && (
|
||||
<Flex style={{ paddingTop: "30px" }}>
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { NodeDef } from "../behavior3/src/behavior3";
|
||||
|
||||
export const VERSION = "1.8.8";
|
||||
export const VERSION = "1.8.10";
|
||||
|
||||
export const keyWords = ["true", "false", "null", "undefined", "NaN", "Infinity"];
|
||||
|
||||
|
||||
Reference in new issue
Block a user