<template>
  <RouterView />
</template>

<script setup>
import { RouterView } from 'vue-router'
import { watch } from 'vue'
import useAppStore from '@/stores/app.js'
import { useWindowSize } from '@vant/use';

const appStore = useAppStore()
const { width } = useWindowSize();
watch(width, (value) => {
  const device = value < 768 ? 'phone' : 'pc';
  if (appStore.device === device) return
  appStore.setDevice(device)
});
</script>

<style scoped>
@import url('./assets/fonts/fonts.css');
</style>
