diff --git a/packages/ui/certd-client/src/views/certd/monitor/cert/crud.tsx b/packages/ui/certd-client/src/views/certd/monitor/cert/crud.tsx index 33d3f916..3ed9e672 100644 --- a/packages/ui/certd-client/src/views/certd/monitor/cert/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/monitor/cert/crud.tsx @@ -82,7 +82,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat add: { text: "上传自定义证书", type: "primary", - show: true, + show: false, async click() { await openUploadCreateDialog(); }, @@ -116,9 +116,11 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat order: 4, title: "更新证书", type: "link", - icon: "ph:upload", + icon: "ion:upload", async click({ row }) { - await openUpdateCertDialog(row.id); + await openUpdateCertDialog({ + id: row.id, + }); }, }, remove: { diff --git a/packages/ui/certd-client/src/views/certd/monitor/cert/updater/index.vue b/packages/ui/certd-client/src/views/certd/monitor/cert/updater/index.vue index e14a3b32..8d31a35c 100644 --- a/packages/ui/certd-client/src/views/certd/monitor/cert/updater/index.vue +++ b/packages/ui/certd-client/src/views/certd/monitor/cert/updater/index.vue @@ -2,7 +2,7 @@
- +
@@ -24,7 +24,7 @@ const props = defineProps<{ size?: string; disabled?: boolean; }>(); -const emit = defineEmits(["updated"]); +const emit = defineEmits(["updated", "update:modelValue"]); const certInfoDict = dict({ value: "id", @@ -42,10 +42,19 @@ const certInfoDict = dict({ const { openUpdateCertDialog } = useCertUpload(); function onUpdated(res: any) { + if (!props.modelValue) { + emit("update:modelValue", res.id); + } emit("updated", res); } + +const pipeline: any = inject("pipeline"); function onUploadClick() { - openUpdateCertDialog(props.modelValue, onUpdated); + openUpdateCertDialog({ + id: props.modelValue, + pipelineId: pipeline.id, + onSubmit: onUpdated, + }); }