提交 510a9ccf 编写于 作者: zhujiamin's avatar zhujiamin

多数据列表里阻止touchstart冒泡

上级 5283fffc
......@@ -15,7 +15,7 @@
</template>
</ion-list>
<ion-list class="items" ref="ionlist">
<ion-item-sliding :ref="item.srfkey" v-for="item in items" @click="item_click(item)" :key="item.srfkey" class="app-mob-mdctrl-item" :disabled="item.sliding_disabled" @ionDrag="ionDrag">
<ion-item-sliding :ref="item.srfkey" v-for="item in items" @click="item_click(item)" :key="item.srfkey" class="app-mob-mdctrl-item" :disabled="item.sliding_disabled" @ionDrag="ionDrag" @touchstart.stop.prevent="handleTouchStart">
<#-- BENGIN:输出界面行为组 -->
<@outPutActionGroup ctrl />
<ion-item>
......@@ -57,7 +57,7 @@
<ion-checkbox :checked="selectAllIschecked" v-show="showCheack" @ionChange="checkboxAll"></ion-checkbox>
<ion-label class="selectal-label" v-show="showCheack">全选</ion-label>
</div>
<ion-item-sliding ref="sliding" v-for="item in items" @click="item_click(item)" :key="item.srfkey" class="app-mob-mdctrl-item" :disabled="item.sliding_disabled" @ionDrag="ionDrag">
<ion-item-sliding ref="sliding" v-for="item in items" @click="item_click(item)" :key="item.srfkey" class="app-mob-mdctrl-item" :disabled="item.sliding_disabled" @ionDrag="ionDrag" @touchstart.stop.prevent="handleTouchStart">
<#-- BENGIN:输出界面行为组 -->
<@outPutActionGroup ctrl />
<#-- END:输出界面行为组 -->
......@@ -97,7 +97,7 @@
<template #title>
<div>{{obj.text}}(<label v-if="obj.items && obj.items.length > 0">{{obj.items.length}}</label>)</div>
</template>
<ion-item-sliding :ref="item.srfkey" v-for="item in obj.items" @click="item_click(item)" :key="item.srfkey" class="app-mob-mdctrl-item" :disabled="item.sliding_disabled" @ionDrag="ionDrag">
<ion-item-sliding :ref="item.srfkey" v-for="item in obj.items" @click="item_click(item)" :key="item.srfkey" class="app-mob-mdctrl-item" :disabled="item.sliding_disabled" @ionDrag="ionDrag" @touchstart.stop.prevent="handleTouchStart">
<#-- BENGIN:输出界面行为组 -->
<@outPutActionGroup ctrl />
<#-- END:输出界面行为组 -->
......@@ -125,7 +125,7 @@
</div>
<#else>
<ion-item-sliding :ref="item.srfkey" v-for="item in items" @click="item_click(item)" :key="item.srfkey" class="app-mob-mdctrl-item" :disabled="item.sliding_disabled" @ionDrag="ionDrag">
<ion-item-sliding :ref="item.srfkey" v-for="item in items" @click="item_click(item)" :key="item.srfkey" class="app-mob-mdctrl-item" :disabled="item.sliding_disabled" @ionDrag="ionDrag" @touchstart.stop.prevent="handleTouchStart">
<#-- BENGIN:输出界面行为组 -->
<@outPutActionGroup ctrl />
<#-- END:输出界面行为组 -->
......
......@@ -871,6 +871,16 @@
this.$store.commit('setPopupStatus',false)
}
/**
* 阻止touchstart冒泡、默认点击
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public handleTouchStart (e:any) {
e.stopPropagation();
e.preventDefault();
}
/**
* vue 生命周期
*
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册