<template>
  <el-config-provider :size="size">
    <router-view />
  </el-config-provider>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import { ElConfigProvider } from 'element-plus'
import { getData } from 'lz-utils-lib'

import useStore from '@/stores'

const { app, user } = useStore()
const query = getData.getUrlParams(location.href) as {
  token: string
}
query.token &&
  user.onLogin({
    tokenName: 'dctoken',
    tokenValue: query.token
  })

const size: any = computed(() => app.size)
</script>
