Merge branch 'next' into develop

This commit is contained in:
nocobase[bot] 2025-02-21 23:11:20 +00:00
commit 65cde80fcd
3 changed files with 14 additions and 6 deletions

View File

@ -2,9 +2,7 @@
"version": "1.6.0-alpha.28", "version": "1.6.0-alpha.28",
"npmClient": "yarn", "npmClient": "yarn",
"useWorkspaces": true, "useWorkspaces": true,
"npmClientArgs": [ "npmClientArgs": ["--ignore-engines"],
"--ignore-engines"
],
"command": { "command": {
"version": { "version": {
"forcePublish": true, "forcePublish": true,

View File

@ -35,13 +35,14 @@ interface TextAreaWithGlobalScopeProps {
password?: boolean; password?: boolean;
number?: boolean; number?: boolean;
boolean?: boolean; boolean?: boolean;
expression?: boolean;
value?: any; value?: any;
scope?: string | object; scope?: string | object;
[key: string]: any; [key: string]: any;
} }
export const TextAreaWithGlobalScope = connect((props: TextAreaWithGlobalScopeProps) => { export const TextAreaWithGlobalScope = connect((props: TextAreaWithGlobalScopeProps) => {
const { supportsLineBreak, password, number, boolean, ...others } = props; const { supportsLineBreak, password, number, boolean, input, expression = true, ...others } = props;
const scope = useEnvironmentVariableOptions(props.scope); const scope = useEnvironmentVariableOptions(props.scope);
const fieldNames = { value: 'name', label: 'title' }; const fieldNames = { value: 'name', label: 'title' };
@ -57,5 +58,13 @@ export const TextAreaWithGlobalScope = connect((props: TextAreaWithGlobalScopePr
if (boolean) { if (boolean) {
return <Variable.Input {...props} scope={scope} fieldNames={fieldNames} />; return <Variable.Input {...props} scope={scope} fieldNames={fieldNames} />;
} }
return <TextArea {...others} scope={scope} fieldNames={fieldNames} />;
if (input) {
return <Variable.Input {...others} scope={scope} fieldNames={fieldNames} />;
}
if (expression) {
return <TextArea {...others} scope={scope} fieldNames={fieldNames} />;
}
return <Variable.Input {...others} scope={scope} fieldNames={fieldNames} />;
}, mapReadPretty(Input.ReadPretty)); }, mapReadPretty(Input.ReadPretty));

View File

@ -174,8 +174,9 @@ export const ChannelConfigForm = () => {
'x-decorator': 'FormItem', 'x-decorator': 'FormItem',
'x-component': 'TextAreaWithGlobalScope', 'x-component': 'TextAreaWithGlobalScope',
'x-component-props': { 'x-component-props': {
// useTypedConstant: ['string'], useTypedConstant: ['string'],
placeholder: `noreply <example@domain.com>`, placeholder: `noreply <example@domain.com>`,
expression: false,
}, },
}, },
}, },