<template>
    <hc-app-config>
        <router-view />
    </hc-app-config>
</template>

<script setup>
import { onMounted } from 'vue'
import { delStore } from '~src/utils/storage'

//渲染完成
onMounted(() => {
    //设置electron的重新登录
    window.electron.ipcRenderer.on('clear-token-cache', () => {
        console.log('electron-clear-token')
        delStore('access-token')
        setTimeout(() => {
            window.electron.ipcRenderer.invoke('token-cache-cleared')
        }, 500)
    })
})
</script>
