Skip to content

Commit aceadea

Browse files
committed
sync plus
1 parent 4fabec7 commit aceadea

File tree

21 files changed

+121
-492
lines changed

21 files changed

+121
-492
lines changed

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
#npx --no-install commitlint --edit "$1"
55
#npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"'
66
#推送之前运行eslint检查
7-
yarn run lint || echo exit;
7+
npm run lint || echo exit;

.yarnrc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
registry "https://registry.npm.taobao.org"
2-
3-
sass_binary_site "https://npm.taobao.org/mirrors/node-sass/"
4-
phantomjs_cdnurl "http://cnpmjs.org/downloads"
5-
electron_mirror "https://npm.taobao.org/mirrors/electron/"
6-
sqlite3_binary_host_mirror "https://foxgis.oss-cn-shanghai.aliyuncs.com/"
7-
profiler_binary_host_mirror "https://npm.taobao.org/mirrors/node-inspector/"
8-
chromedriver_cdnurl "https://cdn.npm.taobao.org/dist/chromedriver"
1+
registry "https://registry.npm.taobao.org"
2+
3+
sass_binary_site "https://npm.taobao.org/mirrors/node-sass/"
4+
phantomjs_cdnurl "http://cnpmjs.org/downloads"
5+
electron_mirror "https://npm.taobao.org/mirrors/electron/"
6+
sqlite3_binary_host_mirror "https://foxgis.oss-cn-shanghai.aliyuncs.com/"
7+
profiler_binary_host_mirror "https://npm.taobao.org/mirrors/node-inspector/"
8+
chromedriver_cdnurl "https://cdn.npm.taobao.org/dist/chromedriver"

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"axios": "0.21.3",
8080
"echarts": "4.2.1",
8181
"electron-is-dev": "2.0.0",
82-
"element-plus": "2.0.1",
82+
"element-plus": "~2.0.2",
8383
"fs-extra": "10.0.0",
8484
"mitt": "3.0.0",
8585
"moment-mini": "^2.22.1",
@@ -121,7 +121,7 @@
121121
"scss": "0.2.4",
122122
"svg-sprite-loader": "6.0.11",
123123
"typescript": "4.3.2",
124-
"vite": "2.7.13",
124+
"vite": "~2.8.6",
125125
"vite-plugin-mock": "^2.9.6",
126126
"vite-plugin-style-import": "1.2.1",
127127
"vite-plugin-svg-icons": "1.0.5",

src/layout/components/AppMain.vue

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,28 @@ let route = useRoute()
2121
let settings = computed(() => {
2222
return store.state.app.settings
2323
})
24+
25+
const key = computed(()=>route.path)
26+
27+
const cachedViews = computed(() => {
28+
return store.state.app.cachedViews
29+
})
30+
31+
/*listen the component name changing, then to keep-alive the page*/
32+
2433
// cachePage: is true, keep-alive this Page
2534
// leaveRmCachePage: is true, keep-alive remote when page leave
2635
let oldRoute = null
2736
let deepOldRouter = null
28-
2937
const removeDeepChildren = (deepOldRouter) => {
3038
deepOldRouter.children?.forEach((fItem) => {
3139
store.commit('app/M_DEL_CACHED_VIEW_DEEP', fItem.name)
3240
})
3341
}
34-
35-
const key = computed({
36-
get() {
42+
watch(
43+
() => route.name,
44+
() => {
3745
const routerLevel = route.matched.length
38-
console.log('routerLevel', routerLevel)
3946
if (routerLevel === 2) {
4047
if (deepOldRouter?.name) {
4148
if (deepOldRouter.meta?.leaveRmCachePage && deepOldRouter.meta?.cachePage) {
@@ -57,7 +64,9 @@ const key = computed({
5764
}
5865
}
5966
deepOldRouter = null
60-
} else if (routerLevel === 3) {
67+
}
68+
69+
if (routerLevel === 3) {
6170
//如果路由等级为3级处理流程
6271
//三级时存储当前路由对象的上一级
6372
const parentRoute = route.matched[1]
@@ -78,7 +87,6 @@ const key = computed({
7887
}
7988
}
8089
81-
//缓存移除逻辑
8290
if (route.name) {
8391
if (route.meta?.cachePage) {
8492
deepOldRouter = parentRoute
@@ -89,13 +97,10 @@ const key = computed({
8997
}
9098
}
9199
oldRoute = JSON.parse(JSON.stringify({ name: route.name, meta: route.meta }))
92-
return route.path
93-
}
94-
})
100+
},
101+
{ immediate: true }
102+
)
95103
96-
const cachedViews = computed(() => {
97-
return store.state.app.cachedViews
98-
})
99104
</script>
100105
101106
<style scoped lang="scss">

src/layout/components/Breadcrumb/index.vue

Lines changed: 0 additions & 74 deletions
This file was deleted.

src/layout/components/Hamburger/Hamburger.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
</template>
1717

1818
<script setup>
19-
import { getCurrentInstance } from 'vue'
2019
defineProps({
2120
isActive: {
2221
type: Boolean,

src/layout/components/Hamburger/index.vue

Lines changed: 0 additions & 43 deletions
This file was deleted.

src/layout/components/Navbar.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="navbar rowBC">
2+
<div class="navbar rowBC reset-el-dropdown">
33
<div class="rowSC">
44
<hamburger
55
v-if="settings.showHamburger"
@@ -43,8 +43,6 @@
4343
import { CaretBottom } from '@element-plus/icons-vue'
4444
import Breadcrumb from './Breadcrumb'
4545
import Hamburger from './Hamburger'
46-
import { computed, getCurrentInstance } from 'vue'
47-
import { ElMessage } from 'element-plus'
4846
import { useStore } from 'vuex'
4947
const store = useStore()
5048
let settings = computed(() => {

src/layout/components/Settings/RightPanel/index.vue

Lines changed: 0 additions & 145 deletions
This file was deleted.

0 commit comments

Comments
 (0)