From 7b59aeb73dffe60be55c26596a01b8f78d00aba4 Mon Sep 17 00:00:00 2001 From: wjh Date: Thu, 10 Oct 2024 18:43:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=AE=A1=E6=89=B9):=20=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E6=91=98=E8=A6=81,=20=E6=96=87=E6=A1=88=E8=BF=87=E9=95=BF?= =?UTF-8?q?=E6=97=B6=E5=80=99=E8=A6=81=E6=8D=A2=E8=A1=8C=20(#1587)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachybase/pulls/1587 Co-authored-by: wjh Co-committed-by: wjh --- .../approvalCarbonCopy.collection.ts | 4 ++-- .../initiations/component/ApprovalItem.tsx | 7 +++++- .../src/client/approval/style/style.css | 22 +++++++++++++++++++ .../todos/component/TabApprovalItem.tsx | 7 +++++- .../launch/Sm.ApprovalBlockLaunch.tsx | 1 + .../todos/Sm.ApprovalBlockTodos.tsx | 1 + .../approval/usage/approval-common/style.ts | 6 ++++- 7 files changed, 43 insertions(+), 5 deletions(-) diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/collection/approvalCarbonCopy.collection.ts b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/collection/approvalCarbonCopy.collection.ts index 706bc900d..0424acb24 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/collection/approvalCarbonCopy.collection.ts +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/collection/approvalCarbonCopy.collection.ts @@ -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'; export const CollectionApprovalCarbonCopy = { @@ -114,7 +114,7 @@ export const CollectionApprovalCarbonCopy = { type: 'number', title: '{{t("Status", { ns: "workflow" })}}', 'x-component': 'Select', - enum: approvalNoticeStatusOptions, + enum: ApprovalNoticeStatusOptions, }, }, { diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/ApprovalItem.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/ApprovalItem.tsx index 37e984d53..10b466c1f 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/ApprovalItem.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/ApprovalItem.tsx @@ -65,7 +65,12 @@ export const ApprovalItem = observer((props) => { {/* */} {item.reason?.map((reasonItem, index) => { - return {`${reasonItem.label}:${reasonItem.value}`}; + return ( +
+
{`${reasonItem.label}:`}  
+
{`${reasonItem.value}`}
+
+ ); })} ); diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/style/style.css b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/style/style.css index 6b2548167..8dab1d714 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/style/style.css +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/style/style.css @@ -52,3 +52,25 @@ overflow: hidden; 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; +} diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/todos/component/TabApprovalItem.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/todos/component/TabApprovalItem.tsx index 8d956d806..1fd1a07b5 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/todos/component/TabApprovalItem.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/todos/component/TabApprovalItem.tsx @@ -67,7 +67,12 @@ export const TabApprovalItem = observer((props) => { {/* */} {item.reason?.map((reasonItem, index) => { - return {`${reasonItem.label}:${reasonItem.value}`}; + return ( +
+
{`${reasonItem.label}:`}  
+
{`${reasonItem.value}`}
+
+ ); })} ); diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/Sm.ApprovalBlockLaunch.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/Sm.ApprovalBlockLaunch.tsx index 41673d6f5..610e86993 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/Sm.ApprovalBlockLaunch.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/Sm.ApprovalBlockLaunch.tsx @@ -102,6 +102,7 @@ export const SchemaApprovalBlockLaunch = { type: 'void', 'x-decorator': 'TableV2.Column.Decorator', 'x-component': 'TableV2.Column', + 'x-component-props': { width: 350 }, title: tval('Approval Summary'), properties: { summary: { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/todos/Sm.ApprovalBlockTodos.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/todos/Sm.ApprovalBlockTodos.tsx index 7612ef3f2..1c66d2ec3 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/todos/Sm.ApprovalBlockTodos.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/todos/Sm.ApprovalBlockTodos.tsx @@ -92,6 +92,7 @@ export const SchemaApprovalBlockTodos = { type: 'void', 'x-decorator': 'TableV2.Column.Decorator', 'x-component': 'TableV2.Column', + 'x-component-props': { width: 350 }, title: tval('Approval Summary'), properties: { summary: { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-common/style.ts b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-common/style.ts index d327cedcf..8a8046051 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-common/style.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-common/style.ts @@ -16,8 +16,12 @@ const useStyles = createStyles(({ css }) => { color: #aaa; } &-value { + white-space: pre-wrap; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; text-overflow: ellipsis; - white-space: nowrap; } } `,