mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-07 17:07:19 +08:00
perf: 优化代码
This commit is contained in:
parent
523c979488
commit
4d91d2017c
@ -68,8 +68,8 @@ const permissionRouter = {
|
|||||||
path: "/permission/page/index",
|
path: "/permission/page/index",
|
||||||
name: "PermissionPage",
|
name: "PermissionPage",
|
||||||
meta: {
|
meta: {
|
||||||
roles: ["admin", "common"],
|
title: "menus.permissionPage",
|
||||||
title: "menus.permissionPage"
|
roles: ["admin", "common"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 477 B After Width: | Height: | Size: 477 B |
@ -2,7 +2,6 @@
|
|||||||
import Search from "./search/index.vue";
|
import Search from "./search/index.vue";
|
||||||
import Notice from "./notice/index.vue";
|
import Notice from "./notice/index.vue";
|
||||||
import mixNav from "./sidebar/mixNav.vue";
|
import mixNav from "./sidebar/mixNav.vue";
|
||||||
import avatars from "@/assets/avatars.jpg";
|
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
import Breadcrumb from "./sidebar/breadCrumb.vue";
|
import Breadcrumb from "./sidebar/breadCrumb.vue";
|
||||||
import topCollapse from "./sidebar/topCollapse.vue";
|
import topCollapse from "./sidebar/topCollapse.vue";
|
||||||
@ -83,7 +82,10 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
|||||||
<!-- 退出登录 -->
|
<!-- 退出登录 -->
|
||||||
<el-dropdown trigger="click">
|
<el-dropdown trigger="click">
|
||||||
<span class="el-dropdown-link navbar-bg-hover select-none">
|
<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>
|
<p v-if="username" class="dark:text-white">{{ username }}</p>
|
||||||
</span>
|
</span>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
|
@ -17,9 +17,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import mdiKeyboardEsc from "@/assets/svg/keyboard_esc.svg?component";
|
||||||
import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
|
||||||
import mdiKeyboardEsc from "@/assets/svg/mdi_keyboard_esc.svg?component";
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.search-footer {
|
.search-footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -3,7 +3,6 @@ import Search from "../search/index.vue";
|
|||||||
import Notice from "../notice/index.vue";
|
import Notice from "../notice/index.vue";
|
||||||
import { ref, watch, nextTick } from "vue";
|
import { ref, watch, nextTick } from "vue";
|
||||||
import SidebarItem from "./sidebarItem.vue";
|
import SidebarItem from "./sidebarItem.vue";
|
||||||
import avatars from "@/assets/avatars.jpg";
|
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
import { useTranslationLang } from "../../hooks/useTranslationLang";
|
import { useTranslationLang } from "../../hooks/useTranslationLang";
|
||||||
import { usePermissionStoreHook } from "@/store/modules/permission";
|
import { usePermissionStoreHook } from "@/store/modules/permission";
|
||||||
@ -97,7 +96,10 @@ watch(
|
|||||||
<!-- 退出登录 -->
|
<!-- 退出登录 -->
|
||||||
<el-dropdown trigger="click">
|
<el-dropdown trigger="click">
|
||||||
<span class="el-dropdown-link navbar-bg-hover">
|
<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>
|
<p v-if="username" class="dark:text-white">{{ username }}</p>
|
||||||
</span>
|
</span>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Search from "../search/index.vue";
|
import Search from "../search/index.vue";
|
||||||
import Notice from "../notice/index.vue";
|
import Notice from "../notice/index.vue";
|
||||||
import avatars from "@/assets/avatars.jpg";
|
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
import { transformI18n } from "@/plugins/i18n";
|
import { transformI18n } from "@/plugins/i18n";
|
||||||
import { ref, toRaw, watch, onMounted, nextTick } from "vue";
|
import { ref, toRaw, watch, onMounted, nextTick } from "vue";
|
||||||
@ -129,7 +128,10 @@ watch(
|
|||||||
<!-- 退出登录 -->
|
<!-- 退出登录 -->
|
||||||
<el-dropdown trigger="click">
|
<el-dropdown trigger="click">
|
||||||
<span class="el-dropdown-link navbar-bg-hover select-none">
|
<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>
|
<p v-if="username" class="dark:text-white">{{ username }}</p>
|
||||||
</span>
|
</span>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
|
@ -12,6 +12,7 @@ import { type DataInfo, setToken, removeToken, sessionKey } from "@/utils/auth";
|
|||||||
export const useUserStore = defineStore({
|
export const useUserStore = defineStore({
|
||||||
id: "pure-user",
|
id: "pure-user",
|
||||||
state: (): userType => ({
|
state: (): userType => ({
|
||||||
|
// 用户名
|
||||||
username:
|
username:
|
||||||
storageSession.getItem<DataInfo<number>>(sessionKey)?.username ?? "",
|
storageSession.getItem<DataInfo<number>>(sessionKey)?.username ?? "",
|
||||||
// 页面级别权限
|
// 页面级别权限
|
||||||
|
@ -165,9 +165,9 @@ const tableData: User[] = [
|
|||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button size="small" type="primary" @click="onPrint"
|
<el-button size="small" type="primary" @click="onPrint">
|
||||||
>打印</el-button
|
打印
|
||||||
>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -300,7 +300,7 @@ const tableData: User[] = [
|
|||||||
>
|
>
|
||||||
<p class="font-medium pt-1">Image</p>
|
<p class="font-medium pt-1">Image</p>
|
||||||
<img
|
<img
|
||||||
src="../../assets/avatars.jpg"
|
src="https://avatars.githubusercontent.com/u/44761321?v=4"
|
||||||
alt="avatars"
|
alt="avatars"
|
||||||
class="img"
|
class="img"
|
||||||
style="width: 200px; height: 200px; margin: 50px auto"
|
style="width: 200px; height: 200px; margin: 50px auto"
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, unref } from "vue";
|
import { ref, unref } from "vue";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import avatars from "@/assets/avatars.jpg";
|
|
||||||
import ReQrcode from "@/components/ReQrcode";
|
import ReQrcode from "@/components/ReQrcode";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@ -90,7 +89,10 @@ const disabledClick = () => {
|
|||||||
<el-col :xl="6" :lg="6" :md="12" :sm="24" :xs="24">
|
<el-col :xl="6" :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
<el-card shadow="hover" class="mb-[10px] text-center">
|
<el-card shadow="hover" class="mb-[10px] text-center">
|
||||||
<div class="font-bold">logo配置</div>
|
<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-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xl="6" :lg="6" :md="12" :sm="24" :xs="24">
|
<el-col :xl="6" :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
@ -99,7 +101,7 @@ const disabledClick = () => {
|
|||||||
<ReQrcode
|
<ReQrcode
|
||||||
:text="qrcodeText"
|
:text="qrcodeText"
|
||||||
:logo="{
|
:logo="{
|
||||||
src: avatars,
|
src: 'https://avatars.githubusercontent.com/u/44761321?v=4',
|
||||||
logoSize: 0.2,
|
logoSize: 0.2,
|
||||||
borderSize: 0.05,
|
borderSize: 0.05,
|
||||||
borderRadius: 50,
|
borderRadius: 50,
|
||||||
|
@ -3,7 +3,7 @@ import { ref, computed } from "vue";
|
|||||||
import Bar from "./components/Bar.vue";
|
import Bar from "./components/Bar.vue";
|
||||||
import Pie from "./components/Pie.vue";
|
import Pie from "./components/Pie.vue";
|
||||||
import Line from "./components/Line.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 Github from "./components/Github.vue";
|
||||||
import Infinite from "./components/Infinite.vue";
|
import Infinite from "./components/Infinite.vue";
|
||||||
|
|
||||||
@ -27,17 +27,17 @@ let greetings = computed(() => {
|
|||||||
return "折一根天使羽毛,愿拂去您的疲惫烦恼忧伤🌛!";
|
return "折一根天使羽毛,愿拂去您的疲惫烦恼忧伤🌛!";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const openDepot = (): void => {
|
|
||||||
window.open("https://github.com/xiaoxian521/vue-pure-admin");
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="welcome">
|
<div class="welcome">
|
||||||
<el-card class="top-content dark:border-none">
|
<el-card class="top-content dark:border-none">
|
||||||
<div class="left-mark select-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>
|
<span>{{ greetings }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user