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",
"npmClient": "yarn",
"useWorkspaces": true,
"npmClientArgs": [
"--ignore-engines"
],
"npmClientArgs": ["--ignore-engines"],
"command": {
"version": {
"forcePublish": true,

View File

@ -35,13 +35,14 @@ interface TextAreaWithGlobalScopeProps {
password?: boolean;
number?: boolean;
boolean?: boolean;
expression?: boolean;
value?: any;
scope?: string | object;
[key: string]: any;
}
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 fieldNames = { value: 'name', label: 'title' };
@ -57,5 +58,13 @@ export const TextAreaWithGlobalScope = connect((props: TextAreaWithGlobalScopePr
if (boolean) {
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));

View File

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