docs: fix code highlighting (#8057)

This commit is contained in:
Israel Ortuño 2022-10-09 01:07:58 +02:00 committed by GitHub
parent c404cb1be4
commit edc44aa064
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ This composable behaves identically to `useFetch` with the `lazy: true` option s
```vue ```vue
<template> <template>
<!-- you'll need to handle a loading state --> <!-- you will need to handle a loading state -->
<div v-if="pending"> <div v-if="pending">
Loading ... Loading ...
</div> </div>
@ -59,7 +59,7 @@ This composable behaves identically to `useFetch` with the `lazy: true` option s
<script setup> <script setup>
const { pending, data: posts } = useLazyFetch('/api/posts') const { pending, data: posts } = useLazyFetch('/api/posts')
watch(posts, (newPosts) => { watch(posts, (newPosts) => {
// Because posts starts out null, you won't have access // Because posts starts out null, you will not have access
// to its contents immediately, but you can watch it. // to its contents immediately, but you can watch it.
}) })
</script> </script>