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 @@ - +