From adb74c51618faf025fe1d46bf6b22db895c2608f Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期日, 12 二月 2023 11:16:14 +0800
Subject: [PATCH] 1.提交

---
 src/layout/components/Navbar.vue |   52 +++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 47 insertions(+), 5 deletions(-)

diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 47c2260..1b24596 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -5,6 +5,7 @@
       :class="{'display_btw':$store.state.settings.menuIsHorizontal}"
       :style="{background: $store.state.settings.headBackgroundColorValue? '#304156':'#fff'}"
     >
+
       <hamburger
         v-if="!$store.state.settings.menuIsHorizontal"
         :is-active="sidebar.opened"
@@ -14,8 +15,22 @@
 
       <breadcrumb
         class="breadcrumb-container"
-        :style="{marginLeft:$store.state.settings.menuIsHorizontal?'20px':''}"
+        :style="{marginLeft:$store.state.settings.menuIsHorizontal?'60px':'40px'}"
       />
+
+      <el-tooltip class="item" effect="dark" content="鍒锋柊椤甸潰" placement="bottom">
+        <div
+          :style="{
+            color:$store.state.settings.headBackgroundColorValue?'#fff':'#000',
+            marginLeft:$store.state.settings.menuIsHorizontal?'10px':'44px',
+            position:'absolute',
+          }"
+          style="padding:0 8px"
+          @click="pageRefreshClick"
+        >
+          <i class="el-icon-refresh-right" style="font-size: 20px;cursor: pointer;line-height:50px" />
+        </div>
+      </el-tooltip>
 
       <el-menu
         v-if="$store.state.settings.menuIsHorizontal"
@@ -42,15 +57,19 @@
 
         <!--      <template v-if="device!=='mobile'">-->
         <template>
-          <search id="header-search" class="right-menu-item" />
+          <el-tooltip class="item" effect="dark" content="鑿滃崟鎼滅储" placement="bottom">
+            <search id="header-search" class="right-menu-item" />
+          </el-tooltip>
           <!--        <error-log class="errLog-container right-menu-item hover-effect" />-->
-          <screenfull id="screenfull" class="right-menu-item hover-effect" />
+          <el-tooltip class="item" effect="dark" content="鍏ㄥ睆" placement="bottom">
+            <screenfull id="screenfull" class="right-menu-item hover-effect" />
+          </el-tooltip>
           <!--        <el-tooltip content="Global Size" effect="dark" placement="bottom">-->
           <!--          <size-select id="size-select" class="right-menu-item hover-effect" />-->
           <!--        </el-tooltip>-->
         </template>
 
-        <el-dropdown class="avatar-container" trigger="click">
+        <el-dropdown class="avatar-container" trigger="hover">
           <div class="avatar-wrapper">
             <!--          <img :src="avatar+'?imageView2/1/w/80/h/80'" class="user-avatar">-->
             <div style="display: flex;align-items: center;margin-top: -5px">
@@ -83,6 +102,7 @@
         </el-dropdown>
       </div>
       <el-dialog
+        v-el-drag-dialog
         title="淇敼瀵嗙爜"
         :visible.sync="dialogVisible"
         width="500px"
@@ -118,6 +138,8 @@
 </template>
 
 <script>
+import elDragDialog from '@/directive/el-drag-dialog'
+
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 import { mapGetters } from 'vuex'
 import MenuItemEx from './Sidebar/MenuItemEx'
@@ -137,6 +159,7 @@
     Search,
     Screenfull
   },
+  directives: { elDragDialog },
   data() {
     const validatePassword1 = (rule, value, callback) => {
       if (!value) {
@@ -178,6 +201,9 @@
       }
     }
   },
+  inject: [
+    'reload'
+  ],
   created() {
     this.usercode = getCookie('navTabId')
     this.username = getCookie('username')
@@ -203,7 +229,7 @@
       return path
     },
     variables() {
-      console.log(variables, 2333)
+      // console.log(variables, 2333)
       // 鍏堣緭鍑鸿繖涓獀ariables鍊�  鐒跺悗淇敼鍏跺睘鎬у��
       variables.menuActiveText = this.$store.state.settings.theme
       // background: rgb(48, 65, 86);
@@ -212,6 +238,22 @@
     }
   },
   methods: {
+    pageRefreshClick() {
+      this.reload()
+      const tabViews = this.$store.state.tagsView.visitedViews.map(item => {
+        return {
+          fullPath: item.fullPath,
+          hash: item.hash,
+          meta: { ...item.meta },
+          name: item.name,
+          params: { ...item.params },
+          path: item.path,
+          query: { ...item.query },
+          title: item.title
+        }
+      })
+      sessionStorage.setItem('tabViews', JSON.stringify(tabViews))
+    },
     handleSelect(key, keyPath) {
       // console.log(key, keyPath)
     },

--
Gitblit v1.9.3