mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
perf: 优化左侧菜单最左下角的展开、折叠按钮在亮白主题配色下的样式
This commit is contained in:
parent
7e588519ee
commit
9968787228
@ -1,5 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
|
import { useGlobal } from "@pureadmin/utils";
|
||||||
import { useNav } from "@/layout/hooks/useNav";
|
import { useNav } from "@/layout/hooks/useNav";
|
||||||
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
|
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
|
||||||
|
|
||||||
@ -22,14 +23,14 @@ const iconClass = computed(() => {
|
|||||||
"h-[16px]",
|
"h-[16px]",
|
||||||
"inline-block",
|
"inline-block",
|
||||||
"align-middle",
|
"align-middle",
|
||||||
"text-primary",
|
|
||||||
"cursor-pointer",
|
"cursor-pointer",
|
||||||
"duration-[100ms]",
|
"duration-[100ms]"
|
||||||
"hover:text-primary",
|
|
||||||
"dark:hover:!text-white"
|
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
||||||
|
const themeColor = computed(() => $storage.layout?.themeColor);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: "toggleClick"): void;
|
(e: "toggleClick"): void;
|
||||||
}>();
|
}>();
|
||||||
@ -40,7 +41,7 @@ const toggleClick = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="collapse-container">
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
placement="right"
|
placement="right"
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
@ -49,7 +50,7 @@ const toggleClick = () => {
|
|||||||
>
|
>
|
||||||
<IconifyIconOffline
|
<IconifyIconOffline
|
||||||
:icon="MenuFold"
|
:icon="MenuFold"
|
||||||
:class="iconClass"
|
:class="[iconClass, themeColor === 'light' ? '' : 'text-primary']"
|
||||||
:style="{ transform: props.isActive ? 'none' : 'rotateY(180deg)' }"
|
:style="{ transform: props.isActive ? 'none' : 'rotateY(180deg)' }"
|
||||||
@click="toggleClick"
|
@click="toggleClick"
|
||||||
@mouseenter="visible = true"
|
@mouseenter="visible = true"
|
||||||
@ -60,7 +61,7 @@ const toggleClick = () => {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container {
|
.collapse-container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user