import type { ComputedRef, InjectionKey, Ref } from 'vue'; import { createContext, useContext } from '../index'; export interface PageContextProps { contentHeight: ComputedRef; pageHeight: Ref; setPageHeight: (height: number) => Promise; } const key: InjectionKey = Symbol(); export function createPageContext(context: PageContextProps) { return createContext(key, context, { reactiveable: false }); } export function usePageContext() { return useContext(key); }