mirror of
https://github.com/un-pany/v3-admin-vite.git
synced 2025-04-20 19:09:21 +08:00
refactor: 更改 "欢迎 star 标语" 代码位置
This commit is contained in:
parent
3dadc9c50f
commit
ebfa35d92f
13
src/App.vue
13
src/App.vue
@ -1,5 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { h } from "vue"
|
||||
import { useTheme } from "@/hooks/useTheme"
|
||||
import { ElNotification } from "element-plus"
|
||||
import zhCn from "element-plus/lib/locale/lang/zh-cn"
|
||||
|
||||
const { initTheme } = useTheme()
|
||||
@ -8,6 +10,17 @@ const { initTheme } = useTheme()
|
||||
initTheme()
|
||||
/** 将 Element Plus 的语言设置为中文 */
|
||||
const locale = zhCn
|
||||
|
||||
ElNotification({
|
||||
title: "Hello",
|
||||
message: h(
|
||||
"a",
|
||||
{ style: "color: teal", target: "_blank", href: "https://github.com/un-pany/v3-admin-vite" },
|
||||
"小项目获取 star 不易,如果你喜欢这个项目的话,欢迎点击这里支持一个 star !这是作者持续维护的唯一动力(小声:毕竟是免费的)"
|
||||
),
|
||||
duration: 0,
|
||||
position: "bottom-right"
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -1,9 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { h, ref } from "vue"
|
||||
import { ref } from "vue"
|
||||
import { useUserStore } from "@/store/modules/user"
|
||||
import AdminDashboard from "./admin/index.vue"
|
||||
import EditorDashboard from "./editor/index.vue"
|
||||
import { ElNotification } from "element-plus"
|
||||
|
||||
type CurrentRoleType = "admin" | "editor"
|
||||
|
||||
@ -12,17 +11,6 @@ const currentRole = ref<CurrentRoleType>("admin")
|
||||
if (!userStore.roles.includes("admin")) {
|
||||
currentRole.value = "editor"
|
||||
}
|
||||
|
||||
ElNotification({
|
||||
title: "Hello",
|
||||
message: h(
|
||||
"a",
|
||||
{ style: "color: teal", target: "_blank", href: "https://github.com/un-pany/v3-admin-vite" },
|
||||
"小项目获取 star 不易,如果你喜欢这个项目的话,欢迎点击这里支持一个 star !这是作者持续维护的唯一动力(小声:毕竟是免费的)"
|
||||
),
|
||||
duration: 0,
|
||||
position: "bottom-right"
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
Loading…
x
Reference in New Issue
Block a user