fix(projects): 修复页面缓存

This commit is contained in:
Soybean
2021-09-22 16:56:25 +08:00
parent 4f05095336
commit fa0a907941
21 changed files with 332 additions and 136 deletions

View File

@@ -0,0 +1,16 @@
import { ref } from 'vue';
/** 滚动行为 */
export default function useScrollBehavior() {
const scrollbar = ref<HTMLElement | null>(null);
/** 重置滚动条行为 */
function resetScrollBehavior() {
scrollbar.value?.scrollTo({ left: 0, top: 0 });
}
return {
scrollbar,
resetScrollBehavior
};
}