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
{{ message }}
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,24 @@ export default {
64
64
65
65
Example: [`examples/nuxt`](./examples/nuxt)
66
66
67
+
###### Component Meta
68
+
69
+
Note that `<script setup>` could co-exist with `<script>`, if you want to define component metadata like `layout` or `head` for Nuxt, you can do it this way:
70
+
71
+
```html
72
+
<scriptsetuplang="ts">
73
+
// your script setup
74
+
</script>
75
+
76
+
<scriptlang="ts">
77
+
// the normal script
78
+
exportdefault {
79
+
layout:'user',
80
+
// ...other meta
81
+
}
82
+
</script>
83
+
```
84
+
67
85
###### TypeScript
68
86
69
87
To use TypeScript with Nuxt, install the [`@nuxtjs/typescript-module`](https://typescript.nuxtjs.org/) but disable the type check:
0 commit comments