Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

这个错误是什么问题啊 #37

Open
sdorein opened this issue Jul 29, 2024 · 1 comment
Open

这个错误是什么问题啊 #37

sdorein opened this issue Jul 29, 2024 · 1 comment

Comments

@sdorein
Copy link

sdorein commented Jul 29, 2024

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.

@liaozhihao666
Copy link

liaozhihao666 commented Jul 29, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants