Template
1
0
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:
pany 2023-02-28 14:11:39 +08:00
parent 3dadc9c50f
commit ebfa35d92f
2 changed files with 14 additions and 13 deletions

View File

@ -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>

View File

@ -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>