refactor(frontend): use Symbol for vue provide/inject
This commit is contained in:
parent
9998cb84e8
commit
9e91f85370
10 changed files with 39 additions and 18 deletions
|
|
@ -31,6 +31,7 @@ import { provideMetadataReceiver, provideReactiveMetadata } from '@/page.js';
|
|||
import { useScrollPositionManager } from '@/nirax.js';
|
||||
import { mainRouter } from '@/router/main.js';
|
||||
import { prefer } from '@/preferences.js';
|
||||
import { DI } from '@/di.js';
|
||||
|
||||
defineProps<{
|
||||
column: Column;
|
||||
|
|
@ -40,7 +41,7 @@ defineProps<{
|
|||
const contents = shallowRef<HTMLElement>();
|
||||
const pageMetadata = ref<null | PageMetadata>(null);
|
||||
|
||||
provide('router', mainRouter);
|
||||
provide(DI.router, mainRouter);
|
||||
provideMetadataReceiver((metadataGetter) => {
|
||||
const info = metadataGetter();
|
||||
pageMetadata.value = info;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue