keepAliveFixed 调整
This commit is contained in:
parent
fe4becce91
commit
772a2abd16
@ -1,9 +1,8 @@
|
||||
import {ref, watch} from "vue";
|
||||
import {ref, onActivated} from "vue";
|
||||
import {useRoute} from "vue-router";
|
||||
|
||||
export function keepAliveFixed(tableRef){
|
||||
const route = useRoute()
|
||||
watch(route,()=>{
|
||||
onActivated(()=>{
|
||||
// 虚拟表格 keepAlive 切换后渲染空白 需要手动重新滚回顶部 以正常显示
|
||||
tableRef.value?.scrollToTop(0)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user