RouterViewにScrollPositiionManagerを埋め込む

This commit is contained in:
tamaina
2023-07-17 08:46:32 +00:00
parent 4bef4953b8
commit e7251220d5
5 changed files with 69 additions and 61 deletions

View File

@@ -8,7 +8,7 @@
</template>
<div ref="contents">
<RouterView @contextmenu.stop="onContextmenu"/>
<RouterView :scrollContainer="contents" @contextmenu.stop="onContextmenu"/>
</div>
</XColumn>
</template>
@@ -21,8 +21,6 @@ import * as os from '@/os';
import { i18n } from '@/i18n';
import { mainRouter } from '@/router';
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata';
import { useScrollPositionManager } from '@/nirax';
import { getScrollContainer } from '@/scripts/scroll';
defineProps<{
column: Column;
@@ -66,6 +64,4 @@ function onContextmenu(ev: MouseEvent) {
},
}], ev);
}
useScrollPositionManager(() => getScrollContainer(contents.value), mainRouter);
</script>