touch.vue
<template>
<transition>
<div
ref="breathing_lamp"
class="breathing_lamp"
@click="onclick()"
@touchstart.stop="handleTouchStart"
@touchmove.prevent.stop="handleTouchMove($event)"
@touchend.stop="handleTouchEnd"
:style="{
left: left + 'px',
top: top + 'px',
width: itemWidth + 'px',
height: itemHeight + 'px',
}"
v-text="text"
v-if="isShow"
>
{
{
text }}
</div>
</transition>
</template>
<script>
export default {
props: {
// 球名字默认:“球”
text: {
type: String,
default: "ball",