【修复】腾讯COS的参数异常问题

【修复】部署阶段编辑重新设置来源,旧参数导致,数据显示错误。
This commit is contained in:
chudong
2025-05-28 15:19:07 +08:00
parent 67577dd730
commit b20b5fd290
40 changed files with 57 additions and 56 deletions

View File

@@ -171,7 +171,6 @@ export function useDnsProviderSelectController(props: DnsProviderSelectProps, em
onMounted(async () => {
await loadDnsProviders(props.type)
console.log(param.value)
})
onUnmounted(() => {

View File

@@ -91,7 +91,7 @@ export const ApiProjectConfig: Record<string, ApiProjectType> = {
type: ['host', 'dns'],
hostRelated: {
cdn: { name: $t('t_14_1745735766121') },
oss: { name: $t('t_15_1745735768976') },
cos: { name: $t('t_15_1745735768976') },
waf: { name: $t('t_9_1744958840634') },
teo: { name: $t('t_5_1747886301427') },
},

View File

@@ -150,6 +150,7 @@ export default defineComponent({
}),
)
console.log(param.value.provider)
// 根据不同的部署类型添加不同的表单配置
switch (param.value.provider) {
case 'localhost':
@@ -201,6 +202,15 @@ export default defineComponent({
return config
})
watch(
() => param.value.provider_id,
() => {
if (param.value.provider === 'btpanel-site') {
handleSiteSearch('')
}
},
)
/**
* 处理网站搜索
* @param query 搜索关键字
@@ -236,9 +246,10 @@ export default defineComponent({
if (!param.value.provider) return message.error($t('t_0_1746858920894'))
if (param.value.provider === 'localhost') {
delete param.value.provider_id
} else {
param.value.provider_id = props.node.config.provider_id
}
// else {
// param.value.provider_id = props.node.config.provider_id
// }
// 加载证书来源选项
certOptions.value = findApplyUploadNodesUp(props.node.id).map((item) => {
return { label: item.name, value: item.id }
@@ -257,6 +268,13 @@ export default defineComponent({
next.value = false
}
// 表单组件
const { component: Form, example } = useForm<DeployNodeConfig>({
config: nodeFormConfig,
defaultValue: param,
rules: verifyRules,
})
/**
* 上一步
*/
@@ -268,22 +286,6 @@ export default defineComponent({
param.value.provider = ''
}
// 表单组件
const { component: Form, example } = useForm<DeployNodeConfig>({
config: nodeFormConfig,
defaultValue: param,
rules: verifyRules,
})
watch(
() => param.value.provider_id,
() => {
if (param.value.provider === 'btpanel-site') {
handleSiteSearch('')
}
},
)
/**
* 提交
*/