forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRemovable.vue
More file actions
51 lines (45 loc) · 1.29 KB
/
Removable.vue
File metadata and controls
51 lines (45 loc) · 1.29 KB
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
44
45
46
47
48
49
50
51
<template>
<div class="q-pa-md">
<div class="q-gutter-xs">
<q-chip removable v-model="icecream" @remove="log('Icecream')" color="primary" text-color="white" icon="cake">
Ice cream
</q-chip>
<q-chip removable v-model="eclair" @remove="log('Icecream')" color="teal" text-color="white" icon="cake">
Eclair
</q-chip>
<q-chip removable v-model="cupcake" @remove="log('Icecream')" color="orange" text-color="white" icon="cake">
Cupcake
</q-chip>
<q-chip disable removable v-model="gingerbread" @remove="log('Icecream')" color="red" text-color="white" icon="cake">
Gingerbread (disable)
</q-chip>
</div>
<q-btn color="primary" label="Reset" @click="onResetClick" class="q-mt-sm" />
</div>
</template>
<script>
import { ref } from 'vue'
export default {
setup () {
const icecream = ref(true)
const eclair = ref(true)
const cupcake = ref(true)
const gingerbread = ref(true)
return {
icecream,
eclair,
cupcake,
gingerbread,
onResetClick () {
icecream.value = true
eclair.value = true
cupcake.value = true
gingerbread.value = true
},
log (desert) {
// console.log(`${desert} has been removed`)
}
}
}
}
</script>