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>
|
<script lang="ts" setup>
|
||||||
|
import { h } from "vue"
|
||||||
import { useTheme } from "@/hooks/useTheme"
|
import { useTheme } from "@/hooks/useTheme"
|
||||||
|
import { ElNotification } from "element-plus"
|
||||||
import zhCn from "element-plus/lib/locale/lang/zh-cn"
|
import zhCn from "element-plus/lib/locale/lang/zh-cn"
|
||||||
|
|
||||||
const { initTheme } = useTheme()
|
const { initTheme } = useTheme()
|
||||||
@ -8,6 +10,17 @@ const { initTheme } = useTheme()
|
|||||||
initTheme()
|
initTheme()
|
||||||
/** 将 Element Plus 的语言设置为中文 */
|
/** 将 Element Plus 的语言设置为中文 */
|
||||||
const locale = zhCn
|
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>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { h, ref } from "vue"
|
import { ref } from "vue"
|
||||||
import { useUserStore } from "@/store/modules/user"
|
import { useUserStore } from "@/store/modules/user"
|
||||||
import AdminDashboard from "./admin/index.vue"
|
import AdminDashboard from "./admin/index.vue"
|
||||||
import EditorDashboard from "./editor/index.vue"
|
import EditorDashboard from "./editor/index.vue"
|
||||||
import { ElNotification } from "element-plus"
|
|
||||||
|
|
||||||
type CurrentRoleType = "admin" | "editor"
|
type CurrentRoleType = "admin" | "editor"
|
||||||
|
|
||||||
@ -12,17 +11,6 @@ const currentRole = ref<CurrentRoleType>("admin")
|
|||||||
if (!userStore.roles.includes("admin")) {
|
if (!userStore.roles.includes("admin")) {
|
||||||
currentRole.value = "editor"
|
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>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user