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
| <template>
| <uni-view
| v-if="hoverClass && hoverClass !== 'none'"
| :class="[hovering?hoverClass:'']"
| @touchstart="_hoverTouchStart"
| @touchend="_hoverTouchEnd"
| @touchcancel="_hoverTouchCancel"
| @mousedown="_hoverMousedown"
| @mouseup="_hoverMouseup"
| v-on="$listeners"
| >
| <slot />
| </uni-view>
| <uni-view
| v-else
| v-on="$listeners"
| >
| <slot />
| </uni-view>
| </template>
|
| <style>
| uni-view {
| display: block;
| }
| uni-view[hidden] {
| display: none;
| }
| </style>
|
| <script>
| import hover from 'uni-mixins/hover'
| export default {
| name: 'View',
| mixins: [hover],
| listeners: {
| 'label-click': 'clickHandler'
| }
| }
| </script>
|
|