| | |
| | | <template> |
| | | <div class="top_text"> |
| | | <div class="top_text flex justify-between px-6 items-center"> |
| | | <div v-if="routerMeta.showTitle" class="font-bold flex items-center cursor-pointer" @click="goBack"> |
| | | <span class="flex-center"> |
| | | <SvgIcon name="ele-ArrowLeft" /> |
| | | </span> |
| | | <span class="text-sm"> |
| | | {{ routerMeta.title }} |
| | | </span> |
| | | </div> |
| | | |
| | | <div class="notice"> |
| | | <el-badge :value="3"> |
| | | <el-button link size="small" icon="ele-Message" class="set-notice" @click="handleAnnouncementClick">系统公告</el-button> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { reactive } from 'vue'; |
| | | import { computed, reactive } from 'vue'; |
| | | import router from '/@/router'; |
| | | let state = reactive({ |
| | | isShowAnnouncement: false, |
| | | announcementList: [ |
| | |
| | | }, |
| | | ], |
| | | }); |
| | | |
| | | const routerMeta = computed(() => router.currentRoute.value.meta); |
| | | const handleAnnouncementClick = () => { |
| | | state.isShowAnnouncement = !state.isShowAnnouncement; |
| | | }; |
| | | |
| | | const goBack = () => { |
| | | router.back(); |
| | | }; |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .top_text { |