vue中使用路由跳转时,如果跳转的页面是当前页面,如何实现刷新当前页
<keep-alive><router-view :key="key"></router-view></keep-alive>import { getUuid } from 'src/common/js/getUuid'computed: {key () {let num = this.$rout...
·
<keep-alive>
<router-view :key="key"></router-view>
</keep-alive>
import { getUuid } from 'src/common/js/getUuid'
computed: {
key () {
let num = this.$route.name !== undefined ? this.$route.name + getUuid() : this.$route + getUuid()
console.log(num)
return num
}
}
更多推荐
已为社区贡献13条内容
所有评论(0)