Skip to content

Commit

Permalink
perf: refactor tools nav
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoYang943 committed Aug 13, 2024
1 parent 854bc68 commit f80b9b2
Show file tree
Hide file tree
Showing 10 changed files with 436 additions and 157 deletions.
91 changes: 91 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"dependencies": {
"@vuepress/client": "^2.0.0-rc.8",
"@vueuse/core": "^10.11.1",
"axios": "^1.7.3",
"element-plus": "^2.8.0",
"glob": "^10.3.10",
"markmap-lib": "^0.16.1",
Expand Down
4 changes: 2 additions & 2 deletions src/.vuepress/components/CustomLayout/ToolsNav/AsideMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<template v-for="menuItem in props.menuList">
<component
:is="menuItem.children ? 'el-sub-menu' : 'el-menu-item'"
:index="menuItem.children ? menuItem.id : ''"
:index="menuItem.children ? menuItem.name : ''"
@click="open(menuItem)"
>
<template #title>
Expand All @@ -25,7 +25,7 @@ function open(menuItem: any) {
} else {
$bus.emit('clearInput')
setTimeout(() => {
let div = document.getElementById(menuItem.id)
let div = document.getElementById(menuItem.name)
if (div) {
div.scrollIntoView({ behavior: 'smooth', block: 'start' })
}
Expand Down
33 changes: 17 additions & 16 deletions src/.vuepress/components/CustomLayout/ToolsNav/MainCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<el-card
v-if="item.children"
class="card-parent"
:id="item.name"
>
<template #header>
<div class="card-header-parent">
Expand All @@ -51,26 +52,24 @@
<el-card
class="card-children"
shadow="hover"
@click="open(childItem)"
>
<template #header>
<div class="card-header-children">
<span
:title="childItem.name"
v-html="filterTitle(childItem.name)"
></span>
</div>
</template>
<el-image
:src="childItem.imgPath"
fit="fill"
lazy
style="width: 100%; height: 100%; cursor: pointer"
@click="open(childItem)"
:src="childItem.imgPath"
fit="contain"
lazy
style="height: 40px;width: 40px"
></el-image>

<div class="bottom">
<span>{{ childItem.description }}</span>
<div style="display: flex;flex-direction: column;margin-left: 10px">
<span
:title="childItem.name"
v-html="filterTitle(childItem.name)"
style="font-size: 16px"
></span>
<span style="font-size: 12px">{{ childItem.description }}</span>
</div>

</el-card>
</div>
</el-card>
Expand Down Expand Up @@ -218,6 +217,7 @@ function open(childItem: any) {
display: flex;
flex-flow: row wrap;
padding: 0;
margin: 10px 15px;
}
}
Expand All @@ -228,9 +228,10 @@ function open(childItem: any) {
.card-children {
margin: 10px;
width: 235px;
display: flex;
flex-direction: column;
cursor: pointer;
max-height: 60px;
}
.card-children ::v-deep(.el-card__header) {
Expand Down
Binary file added src/.vuepress/public/assets/icon/GitHub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/.vuepress/public/assets/icon/github.ico
Binary file not shown.
91 changes: 0 additions & 91 deletions src/.vuepress/public/markmap/Awesome-GIS.md

This file was deleted.

10 changes: 0 additions & 10 deletions src/.vuepress/public/markmap/多源数据融合-首页.md

This file was deleted.

Loading

0 comments on commit f80b9b2

Please sign in to comment.