You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
603 B
39 lines
603 B
|
3 years ago
|
<template>
|
||
|
|
<uni-view
|
||
|
|
v-if="hoverClass && hoverClass !== 'none'"
|
||
|
|
:class="[hovering?hoverClass:'']"
|
||
|
|
@touchstart="_hoverTouchStart"
|
||
|
|
@touchend="_hoverTouchEnd"
|
||
|
|
@touchcancel="_hoverTouchCancel"
|
||
|
|
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>
|