From 205a7d134e60f9183d015ad826759bceb0722382 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Thu, 4 Jun 2026 00:41:51 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=B9=B6=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 移除configuration.ts中多余的空行 2. 调整dns-persist列表列宽至220px 3. 为icon-select新增selected-change事件并传递选中项信息 4. 优化apply-template的infoRequest逻辑,处理空id情况 5. 调整设置弹窗宽度至600px,更新绑定按钮文案 6. 为sslProvider新增mergeScript,切换时清空acme账号配置 7. 更新helper文案修正ZeroSSL翻墙说明 --- .../certd-client/src/components/icon-select.vue | 7 ++++++- .../ui/certd-client/src/store/settings/index.tsx | 6 +++--- .../src/views/certd/cert/apply-template/crud.tsx | 5 ++++- .../src/views/certd/cert/dns-persist/crud.tsx | 2 +- packages/ui/certd-server/src/configuration.ts | 1 - .../plugin-cert/plugin/cert-plugin/apply.ts | 15 +++++++++++++-- 6 files changed, 27 insertions(+), 9 deletions(-) diff --git a/packages/ui/certd-client/src/components/icon-select.vue b/packages/ui/certd-client/src/components/icon-select.vue index d7772cc28..f39eec1af 100644 --- a/packages/ui/certd-client/src/components/icon-select.vue +++ b/packages/ui/certd-client/src/components/icon-select.vue @@ -15,8 +15,13 @@ const props = defineProps<{ value: any; }>(); -const emit = defineEmits(["update:value"]); +const emit = defineEmits(["update:value", "selected-change"]); function onChange(value: any) { + const item = props.options.find(item => item.value === value); emit("update:value", value); + emit("selected-change", { + value, + ...item, + }); } diff --git a/packages/ui/certd-client/src/store/settings/index.tsx b/packages/ui/certd-client/src/store/settings/index.tsx index 8857eb518..7f97acc64 100644 --- a/packages/ui/certd-client/src/store/settings/index.tsx +++ b/packages/ui/certd-client/src/store/settings/index.tsx @@ -322,7 +322,7 @@ export const useSettingStore = defineStore({ } const modalRef: any = Modal.warning({ title: title, - width: 500, + width: 600, keyboard: false, closable, content: () => { @@ -334,7 +334,7 @@ export const useSettingStore = defineStore({ {bindUrl || "未占用"} doBindRequest("url")}> - 绑定到地址1 + 绑定当前URL到地址1
各类通知里面会以地址1作为URL显示
@@ -344,7 +344,7 @@ export const useSettingStore = defineStore({ {bindUrl2 || "未占用"} doBindRequest("url2")}> - 绑定到地址2 + 绑定当前URL到地址2 diff --git a/packages/ui/certd-client/src/views/certd/cert/apply-template/crud.tsx b/packages/ui/certd-client/src/views/certd/cert/apply-template/crud.tsx index 827a15f45..f01e2a288 100644 --- a/packages/ui/certd-client/src/views/certd/cert/apply-template/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/cert/apply-template/crud.tsx @@ -30,7 +30,10 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti return await api.DelObj(row.id); }; const infoRequest = async ({ row }: DelReq) => { - return await api.GetObj(row.id); + if (row?.id) { + return await api.GetObj(row.id); + } + return row; }; async function setDefault(row: any) { diff --git a/packages/ui/certd-client/src/views/certd/cert/dns-persist/crud.tsx b/packages/ui/certd-client/src/views/certd/cert/dns-persist/crud.tsx index a16df10f7..b05ded9c9 100644 --- a/packages/ui/certd-client/src/views/certd/cert/dns-persist/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/cert/dns-persist/crud.tsx @@ -180,7 +180,7 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti }, }, column: { - width: 180, + width: 220, }, }, caType: { diff --git a/packages/ui/certd-server/src/configuration.ts b/packages/ui/certd-server/src/configuration.ts index f24c45feb..8eaaef70c 100644 --- a/packages/ui/certd-server/src/configuration.ts +++ b/packages/ui/certd-server/src/configuration.ts @@ -134,6 +134,5 @@ export class MainConfiguration { }); logger.info("当前环境:", this.app.getEnv()); // prod - } } 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 f9c6c04dc..e6793c9a9 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,10 @@ export class CertApplyPlugin extends CertApplyBasePlugin { onSelectedChange: ctx.compute(({form})=>{ return ($event)=>{ form.dnsProviderAccessType = $event.accessType + form.dnsProviderAccess = null } }) - } + }, } `, required: true, @@ -257,7 +258,17 @@ export class CertApplyPlugin extends CertApplyBasePlugin { { value: "letsencrypt_staging", label: "Let's Encrypt测试环境(仅供测试)", icon: "simple-icons:letsencrypt" }, ], }, - helper: "Let's Encrypt:申请最简单\nGoogle:大厂光环,兼容性好,仅首次需要翻墙获取EAB授权\nZeroSSL:需要EAB授权,无需翻墙\nSSL.com:仅主域名和www免费,必须设置CAA记录", + mergeScript: `return { + component:{ + onSelectedChange: ctx.compute(({form})=>{ + return ($event)=>{ + form.acmeAccountAccessId = null + } + }) + } + } + `, + helper: "Let's Encrypt:申请最简单\nGoogle:大厂光环,兼容性好,仅首次需要翻墙获取EAB授权,无需翻墙\nSSL.com:仅主域名和www免费,必须设置CAA记录", required: true, }) sslProvider!: SSLProvider;