refactor: add function resetScrollBar
This commit is contained in:
parent
18059db8a0
commit
47d775ca58
4 changed files with 27 additions and 10 deletions
|
|
@ -226,4 +226,12 @@ export function isRoleInclude(role2check: string[]): boolean {
|
|||
return isIncluded;
|
||||
}
|
||||
|
||||
export function resetScrollBar(elementId: string) {
|
||||
const element = document.getElementById(elementId);
|
||||
|
||||
if (element) {
|
||||
element.scrollTop = 0;
|
||||
}
|
||||
}
|
||||
|
||||
export default useUtilsStore;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue