document.head.append(styleEl)
}
-const Parent: RouteComponent = {
+const Parent = defineComponent({
data() {
return {
transitionName: 'slide-right',
const toDepth = to.path.split('/').length
const fromDepth = from.path.split('/').length
- // @ts-ignore: move to composition api, cannot type `this` yet
this.transitionName = toDepth < fromDepth ? 'slide-right' : 'slide-left'
await nextTick()
next()
</router-view>
</div>
`,
-}
+})
const NestedTransition = defineComponent({
template: `
__DEV__ &&
'params' in rawLocation &&
!('name' in rawLocation) &&
- Object.keys((rawLocation as any).params).length
+ // @ts-expect-error: the type is never
+ Object.keys(rawLocation.params).length
) {
warn(
`Path "${
- (rawLocation as any).path
+ // @ts-expect-error: the type is never
+ rawLocation.path
}" was passed with params but they will be ignored. Use a named route alongside params instead.`
)
}