Description
Type 'ModalOptions' is not assignable to type '{ title?: string | undefined; footer?: (() => Element) | null | undefined; content: (() => Element) | { uid: number; type: FunctionalComponent<{}, any, any> | { ...; }; ... 20 more ...; isDeactivated: boolean; }; onConfirm?: (() => void) | undefined; onCancel?: (() => void) | undefined; props?: { ...; } | undefined; }'.
Types of property 'content' are incompatible.
Type 'ComponentInternalInstance | (() => Element)' is not assignable to type '(() => Element) | { uid: number; type: FunctionalComponent<{}, any, any> | { [x: string]: any; setup?: ((this: void, props: LooseRequired<{}>, ctx: { ...; }) => any) | undefined; ... 48 more ...; beforeRouteLeave?: NavigationGuard | undefined; }; ... 20 more ...; isDeactivated: boolean; }'.
Type 'ComponentInternalInstance' is not assignable to type '(() => Element) | { uid: number; type: FunctionalComponent<{}, any, any> | { [x: string]: any; setup?: ((this: void, props: LooseRequired<{}>, ctx: { ...; }) => any) | undefined; ... 48 more ...; beforeRouteLeave?: NavigationGuard | undefined; }; ... 20 more ...; isDeactivated: boolean; }'.
Type 'ComponentInternalInstance' is not assignable to type '{ uid: number; type: FunctionalComponent<{}, any, any> | { [x: string]: any; setup?: ((this: void, props: LooseRequired<{}>, ctx: { attrs: Data;
slots: Readonly; emit: ((event: unknown, ...args: any[]) => void) | ((event: string, ...args: any[]) => void); expose: (exposed?: Record<...> | undefined) =>...'.
The types of 'appContext.app.config.globalProperties.$router.currentRoute' are incompatible between these types.
Type 'Ref' is missing the following properties from type 'RouteLocationNormalizedLoadedGeneric': matched, name, params, fullPath, and 5 more.
FILE E:/GitProject/My-vue-project/vite-vue3-lowcode/src/visual-editor/hooks/useModal.tsx:48:9
46 | const methods = {
47 | service: (options: ModalOptions) => {
48 | state.options = options;
| ^^^^^^^^^^^^^
49 | methods.show();
50 | },
51 | show: () => (state.visible = true),
[TypeScript] Found 1 error. Watching for file changes.