fix(审批): 审批摘要, 文案过长时候要换行 (#1587)
Reviewed-on: daoyoucloud/tachybase#1587 Co-authored-by: wjh <wwwjh0710@163.com> Co-committed-by: wjh <wwwjh0710@163.com>
This commit is contained in:
parent
5089a78f82
commit
7b59aeb73d
@ -1,4 +1,4 @@
|
|||||||
import { approvalNoticeStatusOptions, ApprovalStatusEnums, COLLECTION_NAME_APPROVAL_CARBON_COPY } from '../constants';
|
import { ApprovalNoticeStatusOptions, ApprovalStatusEnums, COLLECTION_NAME_APPROVAL_CARBON_COPY } from '../constants';
|
||||||
import { NAMESPACE, tval } from '../locale';
|
import { NAMESPACE, tval } from '../locale';
|
||||||
|
|
||||||
export const CollectionApprovalCarbonCopy = {
|
export const CollectionApprovalCarbonCopy = {
|
||||||
@ -114,7 +114,7 @@ export const CollectionApprovalCarbonCopy = {
|
|||||||
type: 'number',
|
type: 'number',
|
||||||
title: '{{t("Status", { ns: "workflow" })}}',
|
title: '{{t("Status", { ns: "workflow" })}}',
|
||||||
'x-component': 'Select',
|
'x-component': 'Select',
|
||||||
enum: approvalNoticeStatusOptions,
|
enum: ApprovalNoticeStatusOptions,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,12 @@ export const ApprovalItem = observer((props) => {
|
|||||||
</Space>
|
</Space>
|
||||||
{/* </Badge> */}
|
{/* </Badge> */}
|
||||||
{item.reason?.map((reasonItem, index) => {
|
{item.reason?.map((reasonItem, index) => {
|
||||||
return <Space block key={index}>{`${reasonItem.label}:${reasonItem.value}`}</Space>;
|
return (
|
||||||
|
<div className="approvalsSummaryStyle-item" key={index}>
|
||||||
|
<div className="approvalsSummaryStyle-label">{`${reasonItem.label}:`} </div>
|
||||||
|
<div className="approvalsSummaryStyle-value">{`${reasonItem.value}`}</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
})}
|
})}
|
||||||
</List.Item>
|
</List.Item>
|
||||||
);
|
);
|
||||||
|
@ -52,3 +52,25 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: #f3f3f3;
|
background-color: #f3f3f3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.approvalsSummaryStyle-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: baseline;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.approvalsSummaryStyle-label {
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.approvalsSummaryStyle-value {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
@ -67,7 +67,12 @@ export const TabApprovalItem = observer((props) => {
|
|||||||
</Space>
|
</Space>
|
||||||
{/* </Badge> */}
|
{/* </Badge> */}
|
||||||
{item.reason?.map((reasonItem, index) => {
|
{item.reason?.map((reasonItem, index) => {
|
||||||
return <Space block key={index}>{`${reasonItem.label}:${reasonItem.value}`}</Space>;
|
return (
|
||||||
|
<div className="approvalsSummaryStyle-item" key={index}>
|
||||||
|
<div className="approvalsSummaryStyle-label">{`${reasonItem.label}:`} </div>
|
||||||
|
<div className="approvalsSummaryStyle-value">{`${reasonItem.value}`}</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
})}
|
})}
|
||||||
</List.Item>
|
</List.Item>
|
||||||
);
|
);
|
||||||
|
@ -102,6 +102,7 @@ export const SchemaApprovalBlockLaunch = {
|
|||||||
type: 'void',
|
type: 'void',
|
||||||
'x-decorator': 'TableV2.Column.Decorator',
|
'x-decorator': 'TableV2.Column.Decorator',
|
||||||
'x-component': 'TableV2.Column',
|
'x-component': 'TableV2.Column',
|
||||||
|
'x-component-props': { width: 350 },
|
||||||
title: tval('Approval Summary'),
|
title: tval('Approval Summary'),
|
||||||
properties: {
|
properties: {
|
||||||
summary: {
|
summary: {
|
||||||
|
@ -92,6 +92,7 @@ export const SchemaApprovalBlockTodos = {
|
|||||||
type: 'void',
|
type: 'void',
|
||||||
'x-decorator': 'TableV2.Column.Decorator',
|
'x-decorator': 'TableV2.Column.Decorator',
|
||||||
'x-component': 'TableV2.Column',
|
'x-component': 'TableV2.Column',
|
||||||
|
'x-component-props': { width: 350 },
|
||||||
title: tval('Approval Summary'),
|
title: tval('Approval Summary'),
|
||||||
properties: {
|
properties: {
|
||||||
summary: {
|
summary: {
|
||||||
|
@ -16,8 +16,12 @@ const useStyles = createStyles(({ css }) => {
|
|||||||
color: #aaa;
|
color: #aaa;
|
||||||
}
|
}
|
||||||
&-value {
|
&-value {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
|
Loading…
Reference in New Issue
Block a user