mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-09 08:11:10 +08:00
【调整】初始化阶段周期选择时间,随机值
This commit is contained in:
@@ -126,7 +126,7 @@ export default defineComponent({
|
||||
// 错误处理
|
||||
const { handleError } = useError()
|
||||
// 获取DNS提供商
|
||||
const { fetchDnsProvider, dnsProvider } = useStore()
|
||||
const { fetchDnsProvider, resetDnsProvider, dnsProvider } = useStore()
|
||||
// 表单的值
|
||||
const param = ref<DnsProviderOption>({
|
||||
label: '',
|
||||
@@ -258,7 +258,6 @@ export default defineComponent({
|
||||
watch(
|
||||
() => props.value,
|
||||
() => {
|
||||
// loadDnsProviders(props.type)
|
||||
handleUpdateValue(props.value)
|
||||
},
|
||||
{ immediate: true },
|
||||
@@ -268,6 +267,10 @@ export default defineComponent({
|
||||
loadDnsProviders(props.type)
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
resetDnsProvider()
|
||||
})
|
||||
|
||||
return () => (
|
||||
<NSpin show={isLoading.value}>
|
||||
<NGrid cols={24} class={props.customClass}>
|
||||
|
||||
@@ -77,8 +77,8 @@ export default defineComponent({
|
||||
{ label: $t('t_15_1745735768976'), value: 'tencentcloud-cos', category: 'tencentcloud', icon: 'tencentcloud' },
|
||||
{ label: $t('t_16_1745735766712'), value: 'aliyun-cdn', category: 'aliyun', icon: 'aliyun' },
|
||||
{ label: $t('t_2_1746697487164'), value: 'aliyun-oss', category: 'aliyun', icon: 'aliyun' },
|
||||
{ label: $t('雷池WAF站点'), value: 'safeline-site', category: 'safeline', icon: 'safeline' },
|
||||
{ label: $t('雷池WAF'), value: 'safeline-panel', category: 'safeline', icon: 'safeline' },
|
||||
{ label: $t('t_0_1747298114839'), value: 'safeline-site', category: 'safeline', icon: 'safeline' },
|
||||
{ label: $t('t_1_1747298114192'), value: 'safeline-panel', category: 'safeline', icon: 'safeline' },
|
||||
]
|
||||
const certOptions = ref<{ label: string; value: string }[]>([]) // 证书选项
|
||||
const current = ref(1) // 当前步骤
|
||||
@@ -358,7 +358,7 @@ export default defineComponent({
|
||||
<NTabPane name="1panel" tab={$t('t_9_1747271284765')} />
|
||||
<NTabPane name="tencentcloud" tab={$t('t_3_1747019616129')} />
|
||||
<NTabPane name="aliyun" tab={$t('t_2_1747019616224')} />
|
||||
<NTabPane name="safeline" tab={$t('雷池WAF')} />
|
||||
<NTabPane name="safeline" tab={$t('t_1_1747298114192')} />
|
||||
</NTabs>
|
||||
</div>
|
||||
<div class={styles.rightPanel}>
|
||||
|
||||
@@ -161,7 +161,19 @@ export default defineComponent({
|
||||
|
||||
// 更新参数的函数
|
||||
const updateParamValue = (updates: StartNodeConfig) => {
|
||||
param.value = { ...updates }
|
||||
let newParams = { ...updates }
|
||||
if (newParams.exec_type === 'manual') {
|
||||
// 小时随机 1-6
|
||||
const randomHour = Math.floor(Math.random() * 6) + 1
|
||||
// 分钟每5分钟随机,0-55
|
||||
const randomMinute = Math.floor(Math.random() * 12) * 5
|
||||
newParams = {
|
||||
...newParams,
|
||||
hour: randomHour,
|
||||
minute: randomMinute,
|
||||
}
|
||||
param.value = newParams
|
||||
}
|
||||
}
|
||||
|
||||
// 监听执行类型变化
|
||||
|
||||
Reference in New Issue
Block a user