feat: 手机端标准化动态-页面缓存
This commit is contained in:
@@ -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
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user