From acc2df29def017fb8165f931b41ef95414966afc Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Sun, 22 Mar 2026 23:31:24 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=94=AF=E6=8C=81=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E7=B2=98=E8=B4=B4=E4=BB=BB=E5=8A=A1=E6=AD=A5=E9=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/certd-client/src/style/certd.less | 13 ++++ .../pipeline/component/task-form/copy.ts | 39 ++++++++++++ .../pipeline/component/task-form/index.vue | 63 ++++++++++++++++--- 3 files changed, 106 insertions(+), 9 deletions(-) create mode 100644 packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-form/copy.ts diff --git a/packages/ui/certd-client/src/style/certd.less b/packages/ui/certd-client/src/style/certd.less index eeb601bce..05393d6c5 100644 --- a/packages/ui/certd-client/src/style/certd.less +++ b/packages/ui/certd-client/src/style/certd.less @@ -118,3 +118,16 @@ span.fs-icon-svg { } } + +button.ant-btn.ant-btn-default.isPlus{ + color: #c5913f; + border: 1px solid #c5913f; + + &:disabled { + cursor: not-allowed; + border-color: hsl(240 5.9% 90%); + color: rgba(50, 54, 57, 0.25); + background-color: rgba(50, 54, 57, 0.04); + box-shadow: none; + } +} \ No newline at end of file diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-form/copy.ts b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-form/copy.ts new file mode 100644 index 000000000..e3eab5346 --- /dev/null +++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-form/copy.ts @@ -0,0 +1,39 @@ +import { reactive, ref } from "vue"; + +export class CopyeStore { + type: "step" | "steps" | "task" | "tasks"; + target: any; + + getCopyedCount() { + if (this.type === "step") { + return 1; + } else if (this.type === "steps") { + return this.target.length; + } else if (this.type === "task") { + return 1; + } else if (this.type === "tasks") { + return this.target.length; + } else { + return 0; + } + } + + setStep(target: any) { + this.target = target; + this.type = "step"; + } + setSteps(target: any) { + this.target = target; + this.type = "steps"; + } + setTask(target: any) { + this.target = target; + this.type = "task"; + } + setTasks(target: any) { + this.target = target; + this.type = "tasks"; + } +} + +export const Copyed: any = reactive(new CopyeStore()); diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-form/index.vue b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-form/index.vue index e144c0097..e73268161 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-form/index.vue +++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-form/index.vue @@ -29,7 +29,17 @@ @@ -68,14 +78,15 @@