From 6a0cc1b1f3ad508f9e4093b3b682b163f12389eb Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 3 Jun 2025 17:40:26 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E6=B5=81=E6=B0=B4?= =?UTF-8?q?=E7=BA=BF=E5=90=8D=E7=A7=B0=E8=BF=87=E9=95=BF=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/certd/history/crud.tsx | 84 +++++++++---------- .../src/views/certd/monitor/site/ip/crud.tsx | 1 + .../src/views/certd/pipeline/crud.tsx | 12 ++- 3 files changed, 48 insertions(+), 49 deletions(-) diff --git a/packages/ui/certd-client/src/views/certd/history/crud.tsx b/packages/ui/certd-client/src/views/certd/history/crud.tsx index d1b1eb33..b03b4f7f 100644 --- a/packages/ui/certd-client/src/views/certd/history/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/history/crud.tsx @@ -44,46 +44,46 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat props: { multiple: true, crossPage: true, - selectedRowKeys - } - } - } + selectedRowKeys, + }, + }, + }, }, request: { pageRequest, addRequest, editRequest, - delRequest + delRequest, }, actionbar: { buttons: { add: { - show: false - } - } + show: false, + }, + }, }, search: { formItem: { labelCol: { style: { // width: "100px" - } + }, }, wrapperCol: { style: { - width: "50%" - } - } - } + width: "50%", + }, + }, + }, }, rowHandle: { minWidth: 200, fixed: "right", buttons: { edit: { - show: false - } - } + show: false, + }, + }, }, columns: { id: { @@ -91,11 +91,11 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat key: "id", type: "number", column: { - width: 100 + width: 100, }, form: { - show: false - } + show: false, + }, }, userId: { title: "用户Id", @@ -103,69 +103,69 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat search: { show: computed(() => { return userStore.isAdmin && settingStore.sysPublic.managerOtherUserPipeline; - }) + }), }, form: { - show: false + show: false, }, column: { show: computed(() => { return userStore.isAdmin && settingStore.sysPublic.managerOtherUserPipeline; }), - width: 100 - } + width: 100, + }, }, pipelineId: { title: "流水线Id", type: "number", search: { - show: true + show: true, }, form: { - show: false + show: false, }, column: { - width: 100 - } + width: 100, + }, }, pipelineTitle: { title: "流水线名称", type: "text", search: { - show: true + show: true, }, column: { width: 300, + tooltip: true, + ellipsis: true, cellRender: ({ row, value }) => { - return ( - {value} - ); - } - } + return {value}; + }, + }, }, createTime: { title: "创建时间", type: "datetime", form: { - show: false + show: false, }, column: { sorter: true, width: 160, - align: "center" - } + align: "center", + }, }, updateTime: { title: "更新时间", type: "datetime", form: { - show: false + show: false, }, column: { - show: true - } - } - } - } + show: true, + }, + }, + }, + }, }; } diff --git a/packages/ui/certd-client/src/views/certd/monitor/site/ip/crud.tsx b/packages/ui/certd-client/src/views/certd/monitor/site/ip/crud.tsx index b9276418..3715863e 100644 --- a/packages/ui/certd-client/src/views/certd/monitor/site/ip/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/monitor/site/ip/crud.tsx @@ -155,6 +155,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat show: true, }, type: "text", + helper: "也支持填写CNAME域名", form: { rules: [{ required: true, message: "请输入IP" }], }, diff --git a/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx b/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx index 2839a731..46e1dc4a 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx @@ -345,14 +345,12 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys }, column: { width: 350, + // tooltip: true, + ellipsis: true, sorter: true, - component: { - on: { - // 注意:必须要on前缀 - onClick({ row }) { - router.push({ path: "/certd/pipeline/detail", query: { id: row.id, editMode: "false" } }); - }, - }, + showTitle: true, + cellRender: ({ row, value }) => { + return {value}; }, }, },