F refresh

This commit is contained in:
zhenorzz 2021-11-25 14:19:47 +08:00
parent 8b4b2b546e
commit 1812a4c7d2
2 changed files with 10 additions and 7 deletions

View File

@ -18,7 +18,7 @@ export default defineComponent({
cachedViews() {
return import.meta.env.PROD === true
? this.$store.state.tagsView.cachedViews.join(',')
: ''
: []
},
key() {
return this.$route.path

View File

@ -1,13 +1,16 @@
<script lang="ts">
import { defineComponent } from 'vue'
import { defineComponent, h } from 'vue'
import { useRoute, useRouter } from 'vue-router'
export default defineComponent({
created() {
const { params, query } = this.$route
setup() {
const route = useRoute()
const router = useRouter()
const { params, query } = route
const { path } = params
this.$router.replace({ path: '/' + path, query })
router.push({ path: '/' + path, query })
},
render: (h: CallableFunction) => {
return h() // avoid warning message
render() {
return h('div')
},
})
</script>