<script setup lang="ts">
import { ElConfigProvider } from 'element-plus';
import { useAppStore } from '@/store/modules/app';
// import { nextTick } from 'process';
import { ref, nextTick, provide } from 'vue';
const appStore = useAppStore();

const isRouterAlive = ref(true)
const reload = () => {
  isRouterAlive.value = false;
  nextTick(() => {
    isRouterAlive.value = true;
  });
}
provide('reload', reload)


</script>

<template>
  <el-config-provider :locale="appStore.locale" :size="appStore.size">
    <router-view v-if="isRouterAlive" />
  </el-config-provider>
</template>
