|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="flex justify-between">
|
|
|
|
|
|
|
+ <div class="flex justify-between mb-2">
|
|
|
<div class="ma-content-block rounded-sm flex justify-between w-full p-3">
|
|
<div class="ma-content-block rounded-sm flex justify-between w-full p-3">
|
|
|
<div class="pl-0 flex inline-block">
|
|
<div class="pl-0 flex inline-block">
|
|
|
<!-- <a-avatar :size="75" class="hidden lg:inline-block">
|
|
<!-- <a-avatar :size="75" class="hidden lg:inline-block">
|
|
@@ -12,15 +12,9 @@
|
|
|
/>
|
|
/>
|
|
|
</a-avatar> -->
|
|
</a-avatar> -->
|
|
|
<div class="pl-3 mt-2">
|
|
<div class="pl-3 mt-2">
|
|
|
- <div class="content-block-title">
|
|
|
|
|
- {{ userStore.user.nickname || userStore.user.username }},欢迎回来!
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div class="content-block-title">{{ userStore.user.nickname || userStore.user.username }},欢迎回来!</div>
|
|
|
<div class="leading-5 mt-2">
|
|
<div class="leading-5 mt-2">
|
|
|
- <a-tag
|
|
|
|
|
- class="tag-primary"
|
|
|
|
|
- v-for="item in userStore.user.roleList"
|
|
|
|
|
- :key="item.id"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <a-tag class="tag-primary" v-for="item in userStore.user.roleList" :key="item.id">
|
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
|
</a-tag>
|
|
</a-tag>
|
|
|
</div>
|
|
</div>
|
|
@@ -35,27 +29,27 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { ref, onMounted } from "vue";
|
|
|
|
|
-import { useUserStore } from "@/store";
|
|
|
|
|
-import dayjs from "dayjs";
|
|
|
|
|
|
|
+import { ref, onMounted } from 'vue'
|
|
|
|
|
+import { useUserStore } from '@/store'
|
|
|
|
|
+import dayjs from 'dayjs'
|
|
|
|
|
|
|
|
-const userStore = useUserStore();
|
|
|
|
|
-const visible = ref(false);
|
|
|
|
|
|
|
+const userStore = useUserStore()
|
|
|
|
|
+const visible = ref(false)
|
|
|
|
|
|
|
|
-const time = ref(null);
|
|
|
|
|
-const day = ref(null);
|
|
|
|
|
|
|
+const time = ref(null)
|
|
|
|
|
+const day = ref(null)
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
- showTime();
|
|
|
|
|
- setInterval(() => showTime(), 1000);
|
|
|
|
|
-});
|
|
|
|
|
|
|
+ showTime()
|
|
|
|
|
+ setInterval(() => showTime(), 1000)
|
|
|
|
|
+})
|
|
|
|
|
|
|
|
const showTime = () => {
|
|
const showTime = () => {
|
|
|
- time.value = dayjs().format("HH:mm:ss");
|
|
|
|
|
- day.value = dayjs().format("YYYY年MM月DD日");
|
|
|
|
|
-};
|
|
|
|
|
|
|
+ time.value = dayjs().format('HH:mm:ss')
|
|
|
|
|
+ day.value = dayjs().format('YYYY年MM月DD日')
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
-const donate = () => (visible.value = true);
|
|
|
|
|
|
|
+const donate = () => (visible.value = true)
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|