mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-11-13 04:03:42 +08:00
style(projects): update prettier config
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user