router
router copied to clipboard
chore(playground): upgrade to `script setup` syntax and TypeScript
Upgrade the playground package to use the <script setup> syntax and TypeScript. This change makes the playground more consistent with recent Vue.js practices and improves type safety.
Keep the purpose of each example identical to the original examples as much as possible. Therefore, components using beforeRouteEnter(), which does not have a <script setup> equivalent, are not converted to <script setup> syntax but are only converted to use TypeScript for improved type safety (Home.vue and ComponentWithData.vue). Converting these to use the recommended data loaders or defineMacro() could be an option in the future.
Update RouteNamedMap in main.ts to improve type safety and better demonstrate the newer typed routes feature (introduced in [email protected]) in LongView.vue, Nested.vue, and RepeatedParams.vue.
Fix type issue in AppLink.vue where RouterLinkProps replaces RouterLink.props.
Remove the name option from the defineComponent calls that used it, because this option is only useful when the component recursively calls itself, but there are not components in this playground project that do so.
Deploy Preview for vue-router canceled.
| Name | Link |
|---|---|
| Latest commit | 04d35ebb469164987df352a8c27ce19690e6b2f2 |
| Latest deploy log | https://app.netlify.com/sites/vue-router/deploys/67fc9b9e7fcadd0008089c6a |
Thanks for this, it's a long overdue! I have quite a few other things to cover before this so it will most definitely take me a few months before merging it
Sounds good! Thank you for the update.