Commit 963ff024 authored by chenqikuai's avatar chenqikuai

fix

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