From 5e16a06fc90a67907ba1afdf648a13ebb2ae1d59 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 31 一月 2023 08:28:10 +0800
Subject: [PATCH] 1.新增页面刷新功能

---
 src/layout/components/Navbar.vue |   39 ++++++++++++++++++++++++---------------
 1 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 3f7e36f..7d7320f 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -12,22 +12,26 @@
         @toggleClick="toggleSideBar"
       />
       <!--      :style="{marginLeft:$store.state.settings.menuIsHorizontal?'50px':'40px'}"-->
+      <!--      :style="{marginLeft:$store.state.settings.menuIsHorizontal?'20px':''}"-->
+
       <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">-->
-      <!--                <PageRefresh-->
-      <!--                  :style="{-->
-      <!--                    color:$store.state.settings.headBackgroundColorValue?'#fff':'#000',-->
-      <!--                    marginLeft:$store.state.settings.menuIsHorizontal?'20px':'50px'-->
-      <!--                  }"-->
-      <!--                  style="position: absolute;"-->
-      <!--                  @click="pageRefreshClick"-->
-      <!--                />-->
-      <!--      </el-tooltip>-->
+      <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"
@@ -147,7 +151,6 @@
 import Search from '@/components/HeaderSearch'
 import Screenfull from '@/components/Screenfull'
 import variables from '@/styles/variables.scss'
-import PageRefresh from '@/components/PageRefresh/PageRefresh'
 
 export default {
   components: {
@@ -155,8 +158,7 @@
     Breadcrumb,
     Hamburger,
     Search,
-    Screenfull,
-    PageRefresh
+    Screenfull
   },
   directives: { elDragDialog },
   data() {
@@ -200,6 +202,9 @@
       }
     }
   },
+  inject: [
+    'reload'
+  ],
   created() {
     this.usercode = getCookie('navTabId')
     this.username = getCookie('username')
@@ -234,6 +239,10 @@
     }
   },
   methods: {
+    pageRefreshClick() {
+      console.log('鐐瑰嚮浜嗭紒')
+      this.reload()
+    },
     handleSelect(key, keyPath) {
       // console.log(key, keyPath)
     },

--
Gitblit v1.9.3