perf: 优化流水线名称过长时的显示

pull/411/head
xiaojunnuo 2025-06-03 17:40:26 +08:00
parent 0e8339c701
commit 6a0cc1b1f3
3 changed files with 48 additions and 49 deletions

View File

@ -44,46 +44,46 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
props: { props: {
multiple: true, multiple: true,
crossPage: true, crossPage: true,
selectedRowKeys selectedRowKeys,
} },
} },
} },
}, },
request: { request: {
pageRequest, pageRequest,
addRequest, addRequest,
editRequest, editRequest,
delRequest delRequest,
}, },
actionbar: { actionbar: {
buttons: { buttons: {
add: { add: {
show: false show: false,
} },
} },
}, },
search: { search: {
formItem: { formItem: {
labelCol: { labelCol: {
style: { style: {
// width: "100px" // width: "100px"
} },
}, },
wrapperCol: { wrapperCol: {
style: { style: {
width: "50%" width: "50%",
} },
} },
} },
}, },
rowHandle: { rowHandle: {
minWidth: 200, minWidth: 200,
fixed: "right", fixed: "right",
buttons: { buttons: {
edit: { edit: {
show: false show: false,
} },
} },
}, },
columns: { columns: {
id: { id: {
@ -91,11 +91,11 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
key: "id", key: "id",
type: "number", type: "number",
column: { column: {
width: 100 width: 100,
}, },
form: { form: {
show: false show: false,
} },
}, },
userId: { userId: {
title: "用户Id", title: "用户Id",
@ -103,69 +103,69 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
search: { search: {
show: computed(() => { show: computed(() => {
return userStore.isAdmin && settingStore.sysPublic.managerOtherUserPipeline; return userStore.isAdmin && settingStore.sysPublic.managerOtherUserPipeline;
}) }),
}, },
form: { form: {
show: false show: false,
}, },
column: { column: {
show: computed(() => { show: computed(() => {
return userStore.isAdmin && settingStore.sysPublic.managerOtherUserPipeline; return userStore.isAdmin && settingStore.sysPublic.managerOtherUserPipeline;
}), }),
width: 100 width: 100,
} },
}, },
pipelineId: { pipelineId: {
title: "流水线Id", title: "流水线Id",
type: "number", type: "number",
search: { search: {
show: true show: true,
}, },
form: { form: {
show: false show: false,
}, },
column: { column: {
width: 100 width: 100,
} },
}, },
pipelineTitle: { pipelineTitle: {
title: "流水线名称", title: "流水线名称",
type: "text", type: "text",
search: { search: {
show: true show: true,
}, },
column: { column: {
width: 300, width: 300,
tooltip: true,
ellipsis: true,
cellRender: ({ row, value }) => { cellRender: ({ row, value }) => {
return ( return <router-link to={{ path: "/certd/pipeline/detail", query: { id: row.pipelineId, editMode: false, historyId: row.id } }}>{value}</router-link>;
<router-link to={{ path: "/certd/pipeline/detail", query: { id: row.pipelineId, editMode: false, historyId: row.id } }}>{value}</router-link> },
); },
}
}
}, },
createTime: { createTime: {
title: "创建时间", title: "创建时间",
type: "datetime", type: "datetime",
form: { form: {
show: false show: false,
}, },
column: { column: {
sorter: true, sorter: true,
width: 160, width: 160,
align: "center" align: "center",
} },
}, },
updateTime: { updateTime: {
title: "更新时间", title: "更新时间",
type: "datetime", type: "datetime",
form: { form: {
show: false show: false,
}, },
column: { column: {
show: true show: true,
} },
} },
} },
} },
}; };
} }

View File

@ -155,6 +155,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
show: true, show: true,
}, },
type: "text", type: "text",
helper: "也支持填写CNAME域名",
form: { form: {
rules: [{ required: true, message: "请输入IP" }], rules: [{ required: true, message: "请输入IP" }],
}, },

View File

@ -345,14 +345,12 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
}, },
column: { column: {
width: 350, width: 350,
// tooltip: true,
ellipsis: true,
sorter: true, sorter: true,
component: { showTitle: true,
on: { cellRender: ({ row, value }) => {
// 注意必须要on前缀 return <router-link to={{ path: "/certd/pipeline/detail", query: { id: row.id, editMode: false } }}>{value}</router-link>;
onClick({ row }) {
router.push({ path: "/certd/pipeline/detail", query: { id: row.id, editMode: "false" } });
},
},
}, },
}, },
}, },