We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa6d7de commit 6bf89b0Copy full SHA for 6bf89b0
1 file changed
examples/with-vue-3/src/App.vue
@@ -1,6 +1,19 @@
1
<script setup lang="ts">
2
import HelloWorld from './components/HelloWorld.vue'
3
import TheWelcome from './components/TheWelcome.vue'
4
+import { ref } from 'vue'
5
+
6
+const inputValue = ref('')
7
8
+function submit() {
9
+ console.log('Input Value:', inputValue.value)
10
+ if (inputValue.value === 'wrong') {
11
+ throw new Error(`Input value "${inputValue.value}" is wrong!`)
12
+ }
13
+ alert(`Submitted inputValue "${inputValue.value}"`)
14
+}
15
16
17
</script>
18
19
<template>
@@ -9,6 +22,8 @@ import TheWelcome from './components/TheWelcome.vue'
22
23
<div class="wrapper">
24
<HelloWorld msg="You did it!" />
25
+ <input v-model="inputValue" placeholder="Don't input wrong" />
26
+ <button @click="submit">Submit</button>
27
</div>
28
</header>
29
0 commit comments