import { useSystemStore } from 'stores/systemStore' import { ref } from 'vue' export const useActivateDebug = () => { const systemStore = useSystemStore() const logoClickCount = ref(0) let clickTimeout: NodeJS.Timeout | null = null const handleLogoClick = () => { if (clickTimeout) { clearTimeout(clickTimeout) } logoClickCount.value++ if (logoClickCount.value === 10) { systemStore.updateDebug() logoClickCount.value = 0 // 重置计数器 } clickTimeout = setTimeout(() => { logoClickCount.value = 0 // 重置计数器 }, 1000) } return { handleLogoClick, } }