mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +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
|
||||
middleware?: Middleware | Middleware[]
|
||||
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
|
||||
watchQuery?: boolean | string[] | ((newQuery: Route['query'], oldQuery: Route['query']) => boolean)
|
||||
meta?: { [key: string]: any }
|
||||
|
@ -79,6 +79,9 @@ options.scrollToTop = true
|
||||
options.transition = 'foo'
|
||||
options.transition = { name: 'foo' }
|
||||
options.transition = () => 'foo'
|
||||
options.transition = () => {
|
||||
return { name: 'foo' }
|
||||
}
|
||||
|
||||
// validate
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user