feat: 手机端标准化动态-页面缓存

This commit is contained in:
zyn
2023-11-27 17:41:53 +08:00
parent 7e6ec986fc
commit 4614e5adc5
2 changed files with 18 additions and 2 deletions
+14 -1
View File
@@ -1,7 +1,7 @@
<!--全库检索-->
<template>
<div id="standDynamics">
<div class="search-head">
<div class="search-head" v-if="isShow">
<div class="head-title">
<span class="left-title" @click="back"> < </span>
<span class="right-title">标准化动态</span>
@@ -36,8 +36,21 @@ export default {
data() {
return {
active: "ZYBZFG",
isShow: true
};
},
beforeRouteEnter (to, from, next) {
next(vm => {
if (from.name === 'phoneHome') {
// 首页进入 重新加载
vm.active = "ZYBZFG";
vm.isShow = false
vm.$nextTick(() => {
vm.isShow = true
})
}
})
},
methods: {
//返回上一个页面
back() {
+4 -1
View File
@@ -105,7 +105,10 @@ const routes = [
{
path: '/standDynamics',
name: 'standDynamics',
component: () => import('@/pages/phone/standDynamics/index')
component: () => import('@/pages/phone/standDynamics/index'),
meta: {
keepAlive: true
}
/*
component: () =>
import('@/pages/phone/standDynamics')