mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 01:15:58 +00:00
docs: add example of inlined css for <Style>
component (#2910)
This commit is contained in:
parent
0affa39b62
commit
150caefa34
@ -42,6 +42,7 @@ For example:
|
|||||||
<Title>{{ dynamic }} title</Title>
|
<Title>{{ dynamic }} title</Title>
|
||||||
<Meta name="description" :content="`My page's ${dynamic} description`" />
|
<Meta name="description" :content="`My page's ${dynamic} description`" />
|
||||||
<Link rel="preload" href="/test.txt" as="script" />
|
<Link rel="preload" href="/test.txt" as="script" />
|
||||||
|
<Style type="text/css" :children="styleString" />
|
||||||
</Head>
|
</Head>
|
||||||
</Html>
|
</Html>
|
||||||
|
|
||||||
@ -53,7 +54,7 @@ For example:
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data: () => ({ dynamic: 49 })
|
data: () => ({ dynamic: 49, styleString: 'body { background-color: green; }' })
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user