mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 06:15:11 +00:00
fix(plugin-workflow-request): fix value fields overflowing (#4354)
This commit is contained in:
parent
5fa77df58a
commit
6e9ca10644
@ -389,6 +389,7 @@ export function TextArea(props) {
|
||||
.ant-input {
|
||||
flex-grow: 1;
|
||||
min-width: 200px;
|
||||
word-break: break-all;
|
||||
}
|
||||
.ant-input-disabled {
|
||||
.ant-tag {
|
||||
@ -412,6 +413,7 @@ export function TextArea(props) {
|
||||
onPaste={onPaste}
|
||||
onCompositionStart={onCompositionStart}
|
||||
onCompositionEnd={onCompositionEnd}
|
||||
placeholder={props.placeholder}
|
||||
className={cx(
|
||||
hashId,
|
||||
'ant-input',
|
||||
@ -420,6 +422,11 @@ export function TextArea(props) {
|
||||
overflow: auto;
|
||||
white-space: ${multiline ? 'normal' : 'nowrap'};
|
||||
|
||||
&[placeholder]:empty::before {
|
||||
content: attr(placeholder);
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.ant-tag {
|
||||
display: inline;
|
||||
line-height: 19px;
|
||||
|
@ -20,7 +20,7 @@ import {
|
||||
} from '@nocobase/plugin-workflow/client';
|
||||
|
||||
import { NAMESPACE } from '../locale';
|
||||
import { SchemaComponent } from '@nocobase/client';
|
||||
import { SchemaComponent, css } from '@nocobase/client';
|
||||
|
||||
const BodySchema = {
|
||||
'application/json': {
|
||||
@ -173,6 +173,18 @@ export default class extends Instruction {
|
||||
space: {
|
||||
type: 'void',
|
||||
'x-component': 'Space',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
flexWrap: 'nowrap',
|
||||
maxWidth: '100%',
|
||||
},
|
||||
className: css`
|
||||
& > .ant-space-item:first-child,
|
||||
& > .ant-space-item:last-child {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
`,
|
||||
},
|
||||
properties: {
|
||||
name: {
|
||||
type: 'string',
|
||||
@ -188,6 +200,7 @@ export default class extends Instruction {
|
||||
'x-component': 'WorkflowVariableTextArea',
|
||||
'x-component-props': {
|
||||
useTypedConstant: true,
|
||||
placeholder: `{{t("Value")}}`,
|
||||
},
|
||||
},
|
||||
remove: {
|
||||
@ -218,6 +231,18 @@ export default class extends Instruction {
|
||||
space: {
|
||||
type: 'void',
|
||||
'x-component': 'Space',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
flexWrap: 'nowrap',
|
||||
maxWidth: '100%',
|
||||
},
|
||||
className: css`
|
||||
& > .ant-space-item:first-child,
|
||||
& > .ant-space-item:last-child {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
`,
|
||||
},
|
||||
properties: {
|
||||
name: {
|
||||
type: 'string',
|
||||
@ -233,6 +258,7 @@ export default class extends Instruction {
|
||||
'x-component': 'WorkflowVariableTextArea',
|
||||
'x-component-props': {
|
||||
useTypedConstant: true,
|
||||
placeholder: `{{t("Value")}}`,
|
||||
},
|
||||
},
|
||||
remove: {
|
||||
|
@ -82,8 +82,8 @@ export default class extends Instruction {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
[fieldNames.value]: key,
|
||||
[fieldNames.label]: title,
|
||||
value: key,
|
||||
label: title,
|
||||
};
|
||||
}
|
||||
useInitializers(node): SchemaInitializerItemType {
|
||||
|
Loading…
Reference in New Issue
Block a user