<view class="changWork" v-for="(item, index) in messageInfo" :key="index" @touchstart="touchS" @touchend="touchE" @touchmove="touchM" :data-index="index">
加上data-index 属性 即可
然后在元数据e下面的
e.currentTarget.dataset.index;即可拿到数据
<view class="changWork" v-for="(item, index) in messageInfo" :key="index" @touchstart="touchS" @touchend="touchE" @touchmove="touchM" :data-index="index">
加上data-index 属性 即可
然后在元数据e下面的
e.currentTarget.dataset.index;即可拿到数据