Commit 963ff024 authored by chenqikuai's avatar chenqikuai

fix

parent 4c60a4be
This diff is collapsed.
......@@ -24,7 +24,7 @@
"pdfjs-dist": "^2.5.207",
"simple-components01": "^0.1.15",
"unplugin-element-plus": "^0.3.2",
"vue": "^3.2.33",
"vue": "^3.2.37",
"vue-cropper": "^1.0.2",
"vue-router": "^4.0.13"
},
......
......@@ -20,7 +20,7 @@ onMounted(async () => {
<template>
<ElConfigProvider :locale="zhCn">
<router-view></router-view>
<router-view :key="$route.name"></router-view>
<globalMount />
</ElConfigProvider>
</template>
......@@ -86,19 +86,23 @@ watch(finalHover, () => {
top.value = rect?.top!;
if (!box.value) return;
emit("over");
box.value.style.transition = "none";
box.value.style.transition = t;
box.value.style.display = "block";
box.value.style.opacity = "0";
setTimeout(() => {
box.value!.style.opacity = "1";
});
if (box.value) {
box.value.style.transition = "none";
box.value.style.transition = t;
box.value.style.display = "block";
box.value.style.opacity = "0";
setTimeout(() => {
box.value!.style.opacity = "1";
});
}
} else {
if (!box.value) return;
emit("out");
box.value.style.opacity = "0";
if (box.value) {
box.value.style.opacity = "0";
}
box.value.ontransitionend = () => {
if (box.value!.style.opacity === "0") box.value!.style.display = "none";
if (box.value?.style.opacity === "0") box.value!.style.display = "none";
};
}
});
......
......@@ -11,29 +11,29 @@
/>
</div>
<div
v-for="(obj, index) in menuList"
v-for="(menu, index) in menuList"
:key="index"
style="width: 100%; display: flex; justify-content: center"
>
<MenuItem
v-if="obj.type === 'menuItem'"
:name="obj.name!"
@click="handleClickMenu(obj)"
:active="isMenuActive(obj)"
v-if="menu.type === 'menuItem'"
:name="menu.name!"
@click="handleClickMenu(menu)"
:active="isMenuActive(menu)"
>
<template #icon>
<Icon
:icon-name="isMenuActive(obj) ? obj.icon?.active.iconName! : obj.icon?.notActive.iconName!"
v-bind="isMenuActive(obj) ? obj.icon?.active.props! : obj.icon?.notActive.props!"
:icon-name="isMenuActive(menu) ? menu.icon?.active.iconName! : menu.icon?.notActive.iconName!"
v-bind="isMenuActive(menu) ? menu.icon?.active.props! : menu.icon?.notActive.props!"
></Icon>
</template>
</MenuItem>
<div
class="menuDivideLine"
v-else-if="obj.type === 'menuDivideLine'"
v-else-if="menu.type === 'menuDivideLine'"
></div>
<div class="menuGroupName" v-else-if="obj.type === 'menuGroupName'">
{{ obj.name }}
<div class="menuGroupName" v-else-if="menu.type === 'menuGroupName'">
{{ menu.name }}
</div>
</div>
<ChainBrowser
......@@ -52,7 +52,7 @@ import { globalState } from "@/store/state";
const route = useRoute();
const isMenuActive = (obj: typeof menuList[0]) => {
const isMenuActive = (obj: any) => {
return (
obj.path === route.path ||
obj.otherActivePath?.includes(route.path) ||
......@@ -110,6 +110,7 @@ const menuList = [
type: "menuItem",
name: "模板管理",
path: "/templateManagement",
otherActivePath: [],
icon: {
active: { iconName: "iconmoban2", props: {} },
notActive: { iconName: "iconmoban1", props: {} },
......@@ -122,6 +123,7 @@ const menuList = [
type: "menuItem",
name: "回收站",
path: "/recycleBin",
otherActivePath: [],
icon: {
active: { iconName: "iconhuishouzhan2", props: {} },
notActive: { iconName: "iconhuishouzhan1", props: {} },
......
......@@ -37,8 +37,7 @@ export default defineConfig({
rollupOptions: {
output: {
manualChunks: {
// __SignIn: ["./src/views/SignIn.vue"],
// __category: ["./src/views/category/Index.vue"],
__SignIn: ["./src/views/SignIn.vue"],
__recycleBin: ["./src/views/category/recycleBin.vue"],
__templateManagement: ["./src/views/category/templateManagement.vue"],
__tracingManagement: ["./src/views/category/tracingManagement.vue"],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment