Skip to content

Commit

Permalink
docs(useVModel): add <script setup> example (vitest-dev#1282)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zenthae committed Feb 22, 2022
1 parent 497383c commit 52826a5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/core/useVModel/index.md
Expand Up @@ -20,3 +20,18 @@ export default {
},
}
```

### `<script setup>`

```ts
<script lang="ts" setup>
import { useVModel } from '@vueuse/core'

const props = defineProps<{
modelValue: string
}>()
const emit = defineEmits(['update:modelValue'])

const data = useVModel(props, 'modelValue', emit)
</script>
```

0 comments on commit 52826a5

Please sign in to comment.