docs: adjust example (#31372)

This commit is contained in:
Alex Liu 2025-03-14 22:17:01 +08:00 committed by GitHub
parent bbacb5496d
commit 1f23874281
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,10 +44,11 @@ You will also need to change how you define the layout used by a page using the
``` ```
2. Use [`definePageMeta`](/docs/api/utils/define-page-meta) to select the layout used by your page. 2. Use [`definePageMeta`](/docs/api/utils/define-page-meta) to select the layout used by your page.
```diff [pages/index.vue] ```diff [pages/index.vue]
<script> + <script setup>
+ definePageMeta({ + definePageMeta({
+ layout: 'custom' + layout: 'custom'
+ }) + })
- <script>
- export default { - export default {
- layout: 'custom' - layout: 'custom'
- } - }