This commit is contained in:
xiaojunnuo
2024-10-25 16:51:36 +08:00
parent f876ac99b0
commit b421798a1b
6 changed files with 137 additions and 61 deletions
@@ -1,6 +1,10 @@
<template>
<a-select mode="tags" readonly :value="modelValue" />
<div>{{ errorRef }}</div>
<div class="cert-domains-getter">
<div>
<a-tag v-for="item of modelValue" :key="item" type="success" class="m-3">{{ item }}</a-tag>
</div>
<div class="helper">{{ errorRef }}</div>
</div>
</template>
<script setup lang="ts">
@@ -40,11 +44,19 @@ function getDomainFromPipeline(inputKey: string) {
return;
}
const targetStepId = inputKey.split(".")[1];
const certStep = findStepFromPipeline(targetStepId);
let certStep = findStepFromPipeline(targetStepId);
if (!certStep) {
errorRef.value = "找不到目标步骤,请先选择域名证书";
return;
}
if (certStep.type !== "CertApply" || certStep.type !== "CertApplyLego") {
certStep = findStepFromPipeline(certStep.input?.cert);
if (!certStep) {
errorRef.value = "找不到目标步骤,请先选择域名证书";
return;
}
}
const domain = certStep.input["domains"];
emit("update:modelValue", domain);
}