Skip to content

Commit

Permalink
fix: use vue-component-type-helpers to fix the generic component type…
Browse files Browse the repository at this point in the history
… issue
  • Loading branch information
hunterliu1003 committed Oct 30, 2023
1 parent 30dc595 commit 7a9f4e9
Show file tree
Hide file tree
Showing 2 changed files with 364 additions and 315 deletions.
7 changes: 3 additions & 4 deletions packages/vue-final-modal/src/Modal.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { App, CSSProperties, Component, ComponentPublicInstance, ComputedRef, Raw, Ref, VNodeProps } from 'vue'

export type ComponentProps = ComponentPublicInstance['$props']
import type { App, CSSProperties, Component, ComputedRef, Raw, Ref, VNodeProps } from 'vue'
import type { ComponentProps } from 'vue-component-type-helpers'

export type ModalId = number | string | symbol
export type StyleValue = string | CSSProperties | (string | CSSProperties)[]
Expand All @@ -26,7 +25,7 @@ export type UseModalOptions<P> = {
defaultModelValue?: boolean
keepAlive?: boolean
component?: Constructor<P>
attrs?: (RawProps & P) | ({} extends P ? null : never)
attrs?: ComponentProps<Component<P>>
slots?: {
[key: string]: ModalSlot
}
Expand Down
Loading

0 comments on commit 7a9f4e9

Please sign in to comment.