mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
fix(projects): 修复页面缓存,添加多页签删除
This commit is contained in:
@ -3,6 +3,5 @@ import useCreateContext from './useCreateContext';
|
||||
import useRouterChange from './useRouterChange';
|
||||
import useRouteParam from './useRouteParam';
|
||||
import useRouteQuery from './useRouteQuery';
|
||||
import useScrollBehavior from './useScrollBehavior';
|
||||
|
||||
export { useAppTitle, useCreateContext, useRouterChange, useRouteParam, useRouteQuery, useScrollBehavior };
|
||||
export { useAppTitle, useCreateContext, useRouterChange, useRouteParam, useRouteQuery };
|
||||
|
@ -1,25 +0,0 @@
|
||||
import { ref, watch } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
export default function useScrollBehavior() {
|
||||
const scrollbar = ref<HTMLElement | null>(null);
|
||||
const route = useRoute();
|
||||
|
||||
function resetScrollBehavior() {
|
||||
scrollbar.value?.scrollTo({ left: 0, top: 0 });
|
||||
}
|
||||
|
||||
function resetScrollWatcher() {
|
||||
watch(
|
||||
() => route.name,
|
||||
() => {
|
||||
resetScrollBehavior();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
scrollbar,
|
||||
resetScrollWatcher
|
||||
};
|
||||
}
|
@ -1,9 +1,2 @@
|
||||
export {
|
||||
useAppTitle,
|
||||
useCreateContext,
|
||||
useRouterChange,
|
||||
useRouteParam,
|
||||
useRouteQuery,
|
||||
useScrollBehavior
|
||||
} from './common';
|
||||
export { useAppTitle, useCreateContext, useRouterChange, useRouteParam, useRouteQuery } from './common';
|
||||
export { useCountDown, useSmsCode } from './business';
|
||||
|
Reference in New Issue
Block a user