build(projects): update tsconfig、eslintrc

This commit is contained in:
Soybean
2022-03-12 16:21:40 +08:00
parent 4093dcd6dc
commit 75de2b0604
131 changed files with 1174 additions and 1140 deletions

View File

@@ -2,20 +2,20 @@ import type { RouterScrollBehavior } from 'vue-router';
import { useTabStore } from '@/store';
export const scrollBehavior: RouterScrollBehavior = (to, from) => {
return new Promise(resolve => {
return new Promise((resolve) => {
const tab = useTabStore();
if (to.hash) {
resolve({
el: to.hash,
behavior: 'smooth'
behavior: 'smooth',
});
}
const { left, top } = tab.getTabScrollPosition(to.path);
const scrollPosition = {
left,
top
top,
};
const { scrollLeft, scrollTop } = document.documentElement;