From 016ae865b1d914fe5792e77a08e3ab5358df5f89 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 9 Jun 2026 23:08:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(cert-plugin):=20=E4=BF=AE=E5=A4=8DDNS?= =?UTF-8?q?=E6=8F=90=E4=BE=9B=E5=95=86=E6=8E=88=E6=9D=83=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=9B=9E=E6=98=BE=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.ts | 0 .../plugins/cert/dns-provider-selector/index.vue | 10 +++++++--- .../pipeline/pipeline/component/step-form/index.vue | 4 ++-- .../plugins/plugin-cert/plugin/cert-plugin/apply.ts | 8 ++++++-- 4 files changed, 15 insertions(+), 7 deletions(-) delete mode 100644 index.ts diff --git a/index.ts b/index.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/ui/certd-client/src/components/plugins/cert/dns-provider-selector/index.vue b/packages/ui/certd-client/src/components/plugins/cert/dns-provider-selector/index.vue index 86d7cebb6..df38f02ef 100644 --- a/packages/ui/certd-client/src/components/plugins/cert/dns-provider-selector/index.vue +++ b/packages/ui/certd-client/src/components/plugins/cert/dns-provider-selector/index.vue @@ -14,7 +14,7 @@ export default { default: undefined, }, }, - emits: ["update:modelValue", "selected-change"], + emits: ["update:modelValue", "selected-change", "change"], setup(props: any, ctx: any) { const options = ref([]); @@ -33,7 +33,8 @@ export default { // if (props.modelValue == null && options.value.length > 0) { // ctx.emit("update:modelValue", options.value[0].value); // } - onSelectedChange(props.modelValue); + //这里需要一个第一次的selected-change事件,外部表单字段有情况会用到选中的option + onSelectedChange(props.modelValue, true); } onCreate(); @@ -41,9 +42,12 @@ export default { ctx.emit("update:modelValue", value); onSelectedChange(value); } - function onSelectedChange(value: any) { + function onSelectedChange(value: any, isFirst: boolean = false) { if (value) { const option = options.value.find(item => item.value == value); + if (!isFirst) { + ctx.emit("change", value); + } if (option) { ctx.emit("selected-change", option); return; diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/step-form/index.vue b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/step-form/index.vue index 93cd727dc..e053a2b8b 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/step-form/index.vue +++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/step-form/index.vue @@ -172,9 +172,9 @@ function useStepForm() { const stepTypeSelected = (item: any) => { if (item.needPlus && !settingStore.isPlus) { - message.warn("此插件需要开通专业版才能使用"); + message.warn("此插件需要开通Certd专业版才能使用"); mitter.emit("openVipModal"); - throw new Error("此插件需要开通专业版才能使用"); + throw new Error("此插件需要开通Certd专业版才能使用"); } currentStep.value.type = item.name; currentStep.value.title = item.title; diff --git a/packages/ui/certd-server/src/plugins/plugin-cert/plugin/cert-plugin/apply.ts b/packages/ui/certd-server/src/plugins/plugin-cert/plugin/cert-plugin/apply.ts index e6793c9a9..affd84cfc 100644 --- a/packages/ui/certd-server/src/plugins/plugin-cert/plugin/cert-plugin/apply.ts +++ b/packages/ui/certd-server/src/plugins/plugin-cert/plugin/cert-plugin/apply.ts @@ -160,9 +160,13 @@ export class CertApplyPlugin extends CertApplyBasePlugin { onSelectedChange: ctx.compute(({form})=>{ return ($event)=>{ form.dnsProviderAccessType = $event.accessType - form.dnsProviderAccess = null } - }) + }), + onChange: ctx.compute(({form})=>{ + return ($event)=>{ + form.dnsProviderAccess = null + } + }), }, } `,