docs: fix bracket escape on definePageMeta page (#26139)

This commit is contained in:
k-karen 2024-03-08 16:24:24 +09:00 committed by GitHub
parent a9af9e0288
commit cd3cf0b41a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -200,7 +200,7 @@ The two routes "/test-category" and "/1234-post" match both `[postId]-[postSlug]
To make sure that we are only matching digits (`\d+`) for `postId` in the `[postId]-[postSlug]` route, we can add the following to the `[postId]-[postSlug].vue` page template:
```vue [pages/[postId]-[postSlug].vue]
```vue [pages/[postId\\]-[postSlug\\].vue]
<script setup lang="ts">
definePageMeta({
path: '/:postId(\\d+)-:postSlug'