浏览代码

refactor & perf: declare const object outside component `ConstantField` (#17495)

tags/1.2.0
yusheng chen 6 个月前
父节点
当前提交
bf69b97639
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      web/app/components/workflow/nodes/_base/components/variable/constant-field.tsx

+ 3
- 1
web/app/components/workflow/nodes/_base/components/variable/constant-field.tsx 查看文件

@@ -15,8 +15,10 @@ type Props = {
onChange: (value: string | number, varKindType: VarKindType, varInfo?: Var) => void
}

const DEFAULT_SCHEMA = {} as CredentialFormSchema

const ConstantField: FC<Props> = ({
schema = {} as CredentialFormSchema,
schema = DEFAULT_SCHEMA,
readonly,
value,
onChange,

正在加载...
取消
保存