forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBasic.vue
More file actions
46 lines (41 loc) · 827 Bytes
/
Basic.vue
File metadata and controls
46 lines (41 loc) · 827 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
44
45
46
<template>
<div class="q-pa-md row justify-center">
<q-card
v-touch-repeat.mouse="handleRepeat"
class="custom-area cursor-pointer bg-primary text-white shadow-2 relative-position row flex-center"
>
<div v-if="info" class="custom-info">
<pre>{{ info }}</pre>
</div>
<div v-else class="text-center">
Click/touch and hold.
</div>
</q-card>
</div>
</template>
<script>
export default {
data () {
return {
info: null
}
},
methods: {
handleRepeat ({ evt, ...info }) {
this.info = info
// native Javascript event
// console.log(evt)
}
}
}
</script>
<style lang="sass" scoped>
.custom-area
width: 96%
height: 250px
border-radius: 3px
padding: 8px
.custom-info pre
width: 190px
font-size: 12px
</style>