xiaoxian521 преди 2 години
родител
ревизия
4d91d2017c

+ 2 - 2
mock/asyncRoutes.ts

@@ -68,8 +68,8 @@ const permissionRouter = {
       path: "/permission/page/index",
       name: "PermissionPage",
       meta: {
-        roles: ["admin", "common"],
-        title: "menus.permissionPage"
+        title: "menus.permissionPage",
+        roles: ["admin", "common"]
       }
     },
     {

BIN
src/assets/avatars.jpg


+ 0 - 0
src/assets/svg/mdi_keyboard_esc.svg → src/assets/svg/keyboard_esc.svg


+ 4 - 2
src/layout/components/navbar.vue

@@ -2,7 +2,6 @@
 import Search from "./search/index.vue";
 import Notice from "./notice/index.vue";
 import mixNav from "./sidebar/mixNav.vue";
-import avatars from "@/assets/avatars.jpg";
 import { useNav } from "@/layout/hooks/useNav";
 import Breadcrumb from "./sidebar/breadCrumb.vue";
 import topCollapse from "./sidebar/topCollapse.vue";
@@ -83,7 +82,10 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
       <!-- 退出登录 -->
       <el-dropdown trigger="click">
         <span class="el-dropdown-link navbar-bg-hover select-none">
-          <img v-if="avatars" :src="avatars" :style="avatarsStyle" />
+          <img
+            src="https://avatars.githubusercontent.com/u/44761321?v=4"
+            :style="avatarsStyle"
+          />
           <p v-if="username" class="dark:text-white">{{ username }}</p>
         </span>
         <template #dropdown>

+ 2 - 1
src/layout/components/search/components/SearchFooter.vue

@@ -17,9 +17,10 @@
 </template>
 
 <script lang="ts" setup>
+import mdiKeyboardEsc from "@/assets/svg/keyboard_esc.svg?component";
 import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
-import mdiKeyboardEsc from "@/assets/svg/mdi_keyboard_esc.svg?component";
 </script>
+
 <style lang="scss" scoped>
 .search-footer {
   display: flex;

+ 4 - 2
src/layout/components/sidebar/horizontal.vue

@@ -3,7 +3,6 @@ import Search from "../search/index.vue";
 import Notice from "../notice/index.vue";
 import { ref, watch, nextTick } from "vue";
 import SidebarItem from "./sidebarItem.vue";
-import avatars from "@/assets/avatars.jpg";
 import { useNav } from "@/layout/hooks/useNav";
 import { useTranslationLang } from "../../hooks/useTranslationLang";
 import { usePermissionStoreHook } from "@/store/modules/permission";
@@ -97,7 +96,10 @@ watch(
       <!-- 退出登录 -->
       <el-dropdown trigger="click">
         <span class="el-dropdown-link navbar-bg-hover">
-          <img v-if="avatars" :src="avatars" :style="avatarsStyle" />
+          <img
+            src="https://avatars.githubusercontent.com/u/44761321?v=4"
+            :style="avatarsStyle"
+          />
           <p v-if="username" class="dark:text-white">{{ username }}</p>
         </span>
         <template #dropdown>

+ 4 - 2
src/layout/components/sidebar/mixNav.vue

@@ -1,7 +1,6 @@
 <script setup lang="ts">
 import Search from "../search/index.vue";
 import Notice from "../notice/index.vue";
-import avatars from "@/assets/avatars.jpg";
 import { useNav } from "@/layout/hooks/useNav";
 import { transformI18n } from "@/plugins/i18n";
 import { ref, toRaw, watch, onMounted, nextTick } from "vue";
@@ -129,7 +128,10 @@ watch(
       <!-- 退出登录 -->
       <el-dropdown trigger="click">
         <span class="el-dropdown-link navbar-bg-hover select-none">
-          <img v-if="avatars" :src="avatars" :style="avatarsStyle" />
+          <img
+            src="https://avatars.githubusercontent.com/u/44761321?v=4"
+            :style="avatarsStyle"
+          />
           <p v-if="username" class="dark:text-white">{{ username }}</p>
         </span>
         <template #dropdown>

+ 1 - 0
src/store/modules/user.ts

@@ -12,6 +12,7 @@ import { type DataInfo, setToken, removeToken, sessionKey } from "@/utils/auth";
 export const useUserStore = defineStore({
   id: "pure-user",
   state: (): userType => ({
+    // 用户名
     username:
       storageSession.getItem<DataInfo<number>>(sessionKey)?.username ?? "",
     // 页面级别权限

+ 4 - 4
src/views/able/print.vue

@@ -165,9 +165,9 @@ const tableData: User[] = [
               :value="item.value"
             />
           </el-select>
-          <el-button size="small" type="primary" @click="onPrint"
-            >打印</el-button
-          >
+          <el-button size="small" type="primary" @click="onPrint">
+            打印
+          </el-button>
         </div>
       </div>
     </template>
@@ -300,7 +300,7 @@ const tableData: User[] = [
       >
         <p class="font-medium pt-1">Image</p>
         <img
-          src="../../assets/avatars.jpg"
+          src="https://avatars.githubusercontent.com/u/44761321?v=4"
           alt="avatars"
           class="img"
           style="width: 200px; height: 200px; margin: 50px auto"

+ 5 - 3
src/views/able/qrcode.vue

@@ -1,7 +1,6 @@
 <script setup lang="ts">
 import { ref, unref } from "vue";
 import { ElMessage } from "element-plus";
-import avatars from "@/assets/avatars.jpg";
 import ReQrcode from "@/components/ReQrcode";
 
 defineOptions({
@@ -90,7 +89,10 @@ const disabledClick = () => {
         <el-col :xl="6" :lg="6" :md="12" :sm="24" :xs="24">
           <el-card shadow="hover" class="mb-[10px] text-center">
             <div class="font-bold">logo配置</div>
-            <ReQrcode :text="qrcodeText" :logo="avatars" />
+            <ReQrcode
+              :text="qrcodeText"
+              logo="https://avatars.githubusercontent.com/u/44761321?v=4"
+            />
           </el-card>
         </el-col>
         <el-col :xl="6" :lg="6" :md="12" :sm="24" :xs="24">
@@ -99,7 +101,7 @@ const disabledClick = () => {
             <ReQrcode
               :text="qrcodeText"
               :logo="{
-                src: avatars,
+                src: 'https://avatars.githubusercontent.com/u/44761321?v=4',
                 logoSize: 0.2,
                 borderSize: 0.05,
                 borderRadius: 50,

+ 6 - 6
src/views/welcome/index.vue

@@ -3,7 +3,7 @@ import { ref, computed } from "vue";
 import Bar from "./components/Bar.vue";
 import Pie from "./components/Pie.vue";
 import Line from "./components/Line.vue";
-import avatars from "@/assets/avatars.jpg";
+import { openLink } from "@pureadmin/utils";
 import Github from "./components/Github.vue";
 import Infinite from "./components/Infinite.vue";
 
@@ -27,17 +27,17 @@ let greetings = computed(() => {
     return "折一根天使羽毛,愿拂去您的疲惫烦恼忧伤🌛!";
   }
 });
-
-const openDepot = (): void => {
-  window.open("https://github.com/xiaoxian521/vue-pure-admin");
-};
 </script>
 
 <template>
   <div class="welcome">
     <el-card class="top-content dark:border-none">
       <div class="left-mark select-none">
-        <img :src="avatars" title="直达仓库地址" @click="openDepot" />
+        <img
+          src="https://avatars.githubusercontent.com/u/44761321?v=4"
+          title="直达仓库地址"
+          @click="openLink('https://github.com/xiaoxian521/vue-pure-admin')"
+        />
         <span>{{ greetings }}</span>
       </div>
     </el-card>