修改水印细节
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
<keep-alive :include="includedComponents">
|
||||
<router-view v-if="keepAlive" />
|
||||
</keep-alive>
|
||||
<router-view v-if="!keepAlive" />
|
||||
<keep-alive :include="includedComponents">
|
||||
<router-view v-if="keepAlive"/>
|
||||
</keep-alive>
|
||||
<router-view v-if="!keepAlive"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import { CACHE_INCLUDED_ROUTES } from "@/store/mutation-types"
|
||||
import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types'
|
||||
|
||||
export default {
|
||||
name: "RouteView",
|
||||
name: 'RouteView',
|
||||
computed: {
|
||||
//update-begin--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
|
||||
includedComponents() {
|
||||
@@ -20,24 +20,24 @@
|
||||
//如果是缓存路由,则加入到 cache_included_routes
|
||||
if (this.$route.meta.keepAlive && this.$route.meta.componentName) {
|
||||
let cacheRouterArray = Vue.ls.get(CACHE_INCLUDED_ROUTES) || []
|
||||
if(!cacheRouterArray.includes(this.$route.meta.componentName)){
|
||||
if (!cacheRouterArray.includes(this.$route.meta.componentName)) {
|
||||
cacheRouterArray.push(this.$route.meta.componentName)
|
||||
// cacheRouterArray.push("OnlCgformHeadList")
|
||||
Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray)
|
||||
return cacheRouterArray;
|
||||
return cacheRouterArray
|
||||
}
|
||||
}
|
||||
return includedRouters;
|
||||
return includedRouters
|
||||
},
|
||||
//update-end--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
|
||||
keepAlive () {
|
||||
keepAlive() {
|
||||
return this.$route.meta.keepAlive
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.main{
|
||||
.main {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
@@ -100,9 +100,7 @@
|
||||
this.activePage = currentRoute.fullPath
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$watermark.set('测试水印')
|
||||
})
|
||||
|
||||
},
|
||||
watch: {
|
||||
'$route': function(newRoute) {
|
||||
@@ -131,7 +129,6 @@
|
||||
let oldPositionRoute = this.pageList[oldIndex]
|
||||
this.pageList.splice(oldIndex, 1, Object.assign({}, newRoute, { meta: oldPositionRoute.meta }))
|
||||
}
|
||||
this.$watermark.set('测试水印')
|
||||
},
|
||||
'activePage': function(key) {
|
||||
let index = this.linkList.lastIndexOf(key)
|
||||
@@ -435,12 +432,11 @@
|
||||
|
||||
.main {
|
||||
position: relative;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.ant-card {
|
||||
z-index: 999;
|
||||
background: transparent !important;
|
||||
background: #fff;
|
||||
}
|
||||
.ant-input{
|
||||
background: transparent !important;
|
||||
|
||||
Reference in New Issue
Block a user