<template>
  <el-watermark :font="{
    color: `rgba(0, 0, 0, .65)`
  }"
    :content="content"
    class="wm-class">
    <router-view />
  </el-watermark>

  <back-to-up />
</template>

<script setup>
import useSettingsStore from '@/store/modules/settings'
import { handleThemeStyle } from '@/utils/theme'
import useUserStore from '@/store/modules/user'
const content = computed(() => {
  return useUserStore().userInfo.nickName + ' ' + useUserStore().userInfo.phone
})

onMounted(() => {
  nextTick(() => {
    // 初始化主题样式
    handleThemeStyle(useSettingsStore().theme)
  })
})
</script>

<style scoped
  lang="scss">
  .wm-class {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    pointer-events: none;
  }
</style>
