You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Starting from v1.0.0, the plugin is developed based on vue-router-plugin-system (the old plugin registration method is deprecated). See its documentation for details.
@@ -395,16 +378,12 @@ When using with `<Transition>`, manually trigger scroll restoration via `router.
395
378
396
379
#### Configuration Options
397
380
398
-
````ts
381
+
```ts
399
382
interfaceScrollerOptions {
400
383
/**
401
-
* Scroll element selectors, supports special selector [window](file:///home/leihaohao/workspaces/own/vuespark/router-plugins/node_modules/.pnpm/[email protected]/node_modules/nice-fns/dist/index.d.ts#L339-L339)
402
-
* @default
403
-
* ```ts
404
-
* { window: true, body: true }
405
-
* ```
384
+
* Scroll element selectors, supports special selector `window`
406
385
*/
407
-
selectors?:Record<string, boolean|ScrollHandler>
386
+
selectors:Record<string, boolean|ScrollHandler>
408
387
/**
409
388
* Scroll behavior
410
389
*/
@@ -416,7 +395,7 @@ interface ScrollerOptions {
416
395
*/
417
396
scrollOnlyBackward?:boolean
418
397
}
419
-
````
398
+
```
420
399
421
400
#### Type Definitions
422
401
@@ -509,3 +488,12 @@ interface Router {
509
488
previousRoute:ShallowRef<PreviousRoute|undefined>
510
489
}
511
490
```
491
+
492
+
## Migration Guide
493
+
494
+
### From v0.x to v1.x
495
+
496
+
- Remove all plugin registration shorthands, only support on-demand importing required plugins.
497
+
- Plugins are developed based on vue-router-plugin-system (old plugin registration method is deprecated). See its documentation for details.
498
+
- Single plugin import path changed to `@vue-spark/router-plugins/[plugin-name]`.
499
+
-`selectors` configuration item in ScrollerPlugin has no default value and is now required.
0 commit comments