mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
types: improve definitions for component transition property (#7902)
This commit is contained in:
parent
9f4d420b1f
commit
ec9a78a3d2
2
packages/types/app/vue.d.ts
vendored
2
packages/types/app/vue.d.ts
vendored
@ -20,7 +20,7 @@ declare module 'vue/types/options' {
|
|||||||
loading?: boolean
|
loading?: boolean
|
||||||
middleware?: Middleware | Middleware[]
|
middleware?: Middleware | Middleware[]
|
||||||
scrollToTop?: boolean
|
scrollToTop?: boolean
|
||||||
transition?: string | Transition | ((to: Route, from: Route) => string)
|
transition?: string | Transition | ((to: Route, from: Route | undefined) => string | Transition)
|
||||||
validate?(ctx: Context): Promise<boolean> | boolean
|
validate?(ctx: Context): Promise<boolean> | boolean
|
||||||
watchQuery?: boolean | string[] | ((newQuery: Route['query'], oldQuery: Route['query']) => boolean)
|
watchQuery?: boolean | string[] | ((newQuery: Route['query'], oldQuery: Route['query']) => boolean)
|
||||||
meta?: { [key: string]: any }
|
meta?: { [key: string]: any }
|
||||||
|
@ -79,6 +79,9 @@ options.scrollToTop = true
|
|||||||
options.transition = 'foo'
|
options.transition = 'foo'
|
||||||
options.transition = { name: 'foo' }
|
options.transition = { name: 'foo' }
|
||||||
options.transition = () => 'foo'
|
options.transition = () => 'foo'
|
||||||
|
options.transition = () => {
|
||||||
|
return { name: 'foo' }
|
||||||
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user