From 60ad077172bd65427f6324354143135cb4583601 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Thu, 17 Apr 2025 23:31:06 +0800 Subject: [PATCH] =?UTF-8?q?pref:=20=E4=BB=BB=E5=8A=A1=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E9=A1=B5=E9=9D=A2=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=BC=BA=E5=88=B6=E9=87=8D=E6=96=B0=E8=BF=90=E8=A1=8C=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pipeline/component/task-view/index.vue | 31 +++++++++++++------ .../views/certd/pipeline/pipeline/index.vue | 2 +- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-view/index.vue b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-view/index.vue index fd747f4a..6a58039a 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-view/index.vue +++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-view/index.vue @@ -4,10 +4,14 @@ @@ -31,13 +35,14 @@ export default { name: "PiTaskView", components: { PiStatusShow }, props: {}, + emits: ["run"], setup(props: any, ctx: any) { const taskModal = ref({ open: false, onOk() { taskViewClose(); }, - cancelText: "关闭" + cancelText: "关闭", }); const { isMobile } = usePreferences(); const tabPosition = computed(() => { @@ -65,7 +70,7 @@ export default { node: step, type: "步骤", tab: 2, - logs: [] + logs: [], }); } for (let node of nodes) { @@ -82,7 +87,7 @@ export default { list.push({ time, content, - color + color, }); } return list; @@ -111,12 +116,12 @@ export default { if (isBottom && el) { el?.scrollTo({ top: el.scrollHeight, - behavior: "smooth" + behavior: "smooth", }); } }, { - immediate: true + immediate: true, } ); } @@ -135,15 +140,21 @@ export default { taskModal.value.open = false; }; + function triggerRun(id: string) { + ctx.emit("run", id); + taskModal.value.open = false; + } + return { detail, taskModal, activeKey, taskViewOpen, taskViewClose, - tabPosition + tabPosition, + triggerRun, }; - } + }, }; @@ -154,7 +165,7 @@ export default { .tab-title-text { display: flex; - max-width: 180px; + //max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue index 54fdc21b..b0e3816b 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue +++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue @@ -249,7 +249,7 @@ - +