<script setup lang="ts">
import { micro, plugins } from '@/utils/micro'
import { useUserStore } from '@/stores/user'

const microName = '{{name}}'

const { getMicroByName, mainRouteWatch } = micro
const microConfig = getMicroByName(microName)
mainRouteWatch(microName)

const route = useRoute()
const userStore = useUserStore()
</script>

<template>
  <WujieVue
    width="100%"
    height="100%"
    :name="microName"
    :url="micro.url + route.path"
    :sync="true"
    :plugins="plugins"
    :props="{ token: userStore.token }"
  ></WujieVue>
</template>

<style lang="scss" scoped></style>