上下限优化
This commit is contained in:
@@ -278,7 +278,6 @@ const emit = defineEmits(['close', 'save'])
|
||||
const { controlCheckTask } = usePythonBridge()
|
||||
|
||||
const HOST_LIST_MIN_COUNT_KEY = 'host_list_dialog_min_count'
|
||||
const HOST_LIST_GATE_ENABLED_KEY = 'host_list_dialog_gate_enabled'
|
||||
const HOST_LIST_GATE_STATE_KEY = 'host_list_dialog_gate_state'
|
||||
const HOST_LIST_MONITOR_INTERVAL_MS = 30000
|
||||
|
||||
@@ -401,7 +400,6 @@ const parsedIds = computed(() => {
|
||||
watch(() => props.visible, (newVal) => {
|
||||
if (newVal) {
|
||||
document.body.style.overflow = 'hidden'
|
||||
loadLocalGateConfig()
|
||||
loadHosts()
|
||||
loadConfig()
|
||||
} else {
|
||||
@@ -510,8 +508,8 @@ const stopHostListMonitor = () => {
|
||||
|
||||
const loadLocalGateConfig = () => {
|
||||
try {
|
||||
const savedGateEnabled = localStorage.getItem(HOST_LIST_GATE_ENABLED_KEY)
|
||||
gateEnabled.value = savedGateEnabled === 'true'
|
||||
gateEnabled.value = false
|
||||
localStorage.removeItem(HOST_LIST_GATE_ENABLED_KEY)
|
||||
|
||||
const savedMinCount = localStorage.getItem(HOST_LIST_MIN_COUNT_KEY)
|
||||
if (savedMinCount !== null && savedMinCount !== '') {
|
||||
@@ -521,12 +519,8 @@ const loadLocalGateConfig = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const savedGateState = localStorage.getItem(HOST_LIST_GATE_STATE_KEY)
|
||||
if (savedGateState === 'true') {
|
||||
checkTaskGateState.value = true
|
||||
} else if (savedGateState === 'false') {
|
||||
checkTaskGateState.value = false
|
||||
}
|
||||
checkTaskGateState.value = null
|
||||
localStorage.removeItem(HOST_LIST_GATE_STATE_KEY)
|
||||
} catch (e) {
|
||||
console.error('[HostListDialog] 读取本地门控配置失败:', e)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user