forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIndeterminateState.vue
More file actions
43 lines (36 loc) · 999 Bytes
/
IndeterminateState.vue
File metadata and controls
43 lines (36 loc) · 999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<template>
<div class="q-pa-md">
<div class="q-gutter-sm">
<q-checkbox indeterminate-value="maybe" v-model="theModel2" label="Did you eat lunch today?" />
</div>
<div class="q-px-sm">
The model data: <strong>{{ JSON.stringify(theModel2) }}</strong>
</div>
<div class="q-gutter-sm">
<q-checkbox toggle-indeterminate v-model="theModel" label="Did you eat lunch today?" />
</div>
<div class="q-px-sm row no-wrap items-center">
<div class="col">
The model data: <strong>{{ JSON.stringify(theModel) }}</strong>
</div>
<q-btn color="primary" label="Reset" @click="onResetClick" class="q-ml-md" />
</div>
</div>
</template>
<script>
import { ref } from 'vue'
export default {
setup () {
const theModel = ref(null)
const theModel2 = ref('maybe')
return {
theModel,
theModel2,
onResetClick () {
theModel.value = null
theModel2.value = 'maybe'
}
}
}
}
</script>