diff --git a/core/src/types/setting/settingComponent.ts b/core/src/types/setting/settingComponent.ts index 2eae4e16f..2474f6bd4 100644 --- a/core/src/types/setting/settingComponent.ts +++ b/core/src/types/setting/settingComponent.ts @@ -12,7 +12,7 @@ export type SettingComponentProps = { export type ConfigType = 'runtime' | 'setting' -export type ControllerType = 'slider' | 'checkbox' | 'input' +export type ControllerType = 'slider' | 'checkbox' | 'input' | 'tag' export type InputType = 'password' | 'text' | 'email' | 'number' | 'tel' | 'url' @@ -22,7 +22,7 @@ export type InputAction = InputActionsTuple[number] export type InputComponentProps = { placeholder: string - value: string + value: string | string[] type?: InputType textAlign?: 'left' | 'right' inputActions?: InputAction[] diff --git a/web/containers/EngineSetting/index.tsx b/web/containers/EngineSetting/index.tsx index acbd507ce..0ae2929bf 100644 --- a/web/containers/EngineSetting/index.tsx +++ b/web/containers/EngineSetting/index.tsx @@ -4,7 +4,10 @@ import SettingComponentBuilder from '@/containers/ModelSetting/SettingComponent' type Props = { componentData: SettingComponentProps[] - onValueChanged: (key: string, value: string | number | boolean) => void + onValueChanged: ( + key: string, + value: string | number | boolean | string[] + ) => void disabled?: boolean } diff --git a/web/containers/ModelConfigInput/index.tsx b/web/containers/ModelConfigInput/index.tsx index f0e6ea1f2..e67080df2 100644 --- a/web/containers/ModelConfigInput/index.tsx +++ b/web/containers/ModelConfigInput/index.tsx @@ -19,28 +19,30 @@ const ModelConfigInput = ({ description, placeholder, onValueChanged, -}: Props) => ( -
-
-

{title}

- - } - content={description} +}: Props) => { + return ( +
+
+

{title}

+ + } + content={description} + /> +
+