add args type float

This commit is contained in:
zhandouxiaojiji committed 2024-03-07 14:11:00 +08:00
1 parent 239e35260f
commit d3c5bf53e7
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "behavior3editor", "name": "behavior3editor",
"version": "0.1.10", "version": "0.1.11",
"description": "行为树编辑器", "description": "行为树编辑器",
"main": "./dist/main.js", "main": "./dist/main.js",
"scripts": { "scripts": {
+1 -1
View File
@@ -207,7 +207,7 @@ export default class NodePanel extends React.Component<NodePanelProps> {
const required = e.type.indexOf("?") == -1; const required = e.type.indexOf("?") == -1;
if (e.type.indexOf("string") >= 0) { if (e.type.indexOf("string") >= 0) {
return <Input onBlur={this.handleSubmit} />; return <Input onBlur={this.handleSubmit} />;
} else if (e.type.indexOf("int") >= 0) { } else if (e.type.indexOf("int") >= 0 || e.type.indexOf("float") >= 0) {
return <InputNumber style={{ width: "100%" }} onBlur={this.handleSubmit} />; return <InputNumber style={{ width: "100%" }} onBlur={this.handleSubmit} />;
} else if (e.type.indexOf("boolean") >= 0) { } else if (e.type.indexOf("boolean") >= 0) {
return <Switch onChange={this.handleSubmit} />; return <Switch onChange={this.handleSubmit} />;