统一VarInput变量的管理

This commit is contained in:
fofolee
2025-01-08 14:39:08 +08:00
parent b528cfa97d
commit 7a43695e2d
24 changed files with 190 additions and 516 deletions

View File

@@ -15,6 +15,7 @@ import { defineComponent } from "vue";
import OperationCard from "components/composer/common/OperationCard.vue";
import ParamInput from "components/composer/common/ParamInput.vue";
import { stringifyArgv, parseFunction } from "js/composer/formatString";
import { newVarInputVal } from "js/composer/varInputValManager";
export default defineComponent({
name: "MultiParams",
@@ -52,11 +53,7 @@ export default defineComponent({
return [...this.commonConfig, ...this.functionConfig].map((item) => {
const value =
item.type === "varInput"
? item.defaultValue || {
value: "",
isString: true,
__varInputVal__: true,
}
? item.defaultValue || newVarInputVal("str")
: // 其他类型情况复杂不做判断没有默认值返回undefined
item.defaultValue;
return {