2022-04-21 18:20:39 +08:00
|
|
|
<script lang="ts" setup>
|
2023-02-28 14:11:39 +08:00
|
|
|
import { h } from "vue"
|
2022-10-17 15:04:27 +08:00
|
|
|
import { useTheme } from "@/hooks/useTheme"
|
2023-07-06 14:10:14 +08:00
|
|
|
import { resetConfigLayout } from "@/utils"
|
2023-02-28 14:11:39 +08:00
|
|
|
import { ElNotification } from "element-plus"
|
2023-06-16 18:11:41 +08:00
|
|
|
// 将 Element Plus 的语言设置为中文
|
2023-07-14 14:49:05 +08:00
|
|
|
import zhCn from "element-plus/es/locale/lang/zh-cn"
|
2022-04-21 18:20:39 +08:00
|
|
|
|
2023-03-28 17:48:39 +08:00
|
|
|
const { initTheme } = useTheme()
|
|
|
|
|
2022-08-19 17:03:38 +08:00
|
|
|
/** 初始化主题 */
|
2023-03-28 17:48:39 +08:00
|
|
|
initTheme()
|
2023-02-28 14:11:39 +08:00
|
|
|
|
2023-06-16 18:11:41 +08:00
|
|
|
/** 作者小心思 */
|
2023-02-28 14:11:39 +08:00
|
|
|
ElNotification({
|
|
|
|
title: "Hello",
|
2023-07-06 14:10:14 +08:00
|
|
|
type: "success",
|
2023-02-28 14:11:39 +08:00
|
|
|
message: h(
|
|
|
|
"a",
|
|
|
|
{ style: "color: teal", target: "_blank", href: "https://github.com/un-pany/v3-admin-vite" },
|
|
|
|
"小项目获取 star 不易,如果你喜欢这个项目的话,欢迎点击这里支持一个 star !这是作者持续维护的唯一动力(小声:毕竟是免费的)"
|
|
|
|
),
|
|
|
|
duration: 0,
|
|
|
|
position: "bottom-right"
|
|
|
|
})
|
2023-07-06 14:10:14 +08:00
|
|
|
ElNotification({
|
2023-07-19 18:15:37 +08:00
|
|
|
title: "破坏性更新",
|
2023-07-06 14:10:14 +08:00
|
|
|
type: "warning",
|
|
|
|
message: h(
|
|
|
|
"span",
|
|
|
|
{
|
|
|
|
style: "color: teal; cursor: pointer;",
|
|
|
|
onClick: resetConfigLayout
|
|
|
|
},
|
2023-07-19 18:15:37 +08:00
|
|
|
"由于平台 4.1.0 版本新增了多种布局模式,如果第一次出现白屏情况,点击这里或手动前往控制台清理 LocalStorage 缓存数据后刷新页面即可!"
|
2023-07-06 14:10:14 +08:00
|
|
|
),
|
|
|
|
duration: 0,
|
|
|
|
position: "bottom-right",
|
|
|
|
offset: 150
|
|
|
|
})
|
2022-04-21 18:20:39 +08:00
|
|
|
</script>
|
2022-04-22 12:47:04 +08:00
|
|
|
|
|
|
|
<template>
|
2023-06-16 18:11:41 +08:00
|
|
|
<ElConfigProvider :locale="zhCn">
|
2022-04-22 12:47:04 +08:00
|
|
|
<router-view />
|
|
|
|
</ElConfigProvider>
|
|
|
|
</template>
|