事件修飾符stop的使用會阻止冒泡,可是同時綁定了一個非冒泡的事件,會致使該元素上的catchEventName失效!app
prevent能夠直接幹掉,由於uni-app裏沒有什麼默認事件,好比submit並不會跳轉頁面。spa
self沒有能夠判斷的標識3d
once也不能作,由於uni-app沒有removeEventListener,雖然能夠直接在handleProxy中處理,但很是的不優雅,違背了願意,暫不考慮按鍵修飾符:uni-app運行在手機端,沒有鍵盤事件,因此不支持按鍵修飾符。code
view視圖容器cdn
hover-class類型爲string,默認值none指定按下去的樣式類,類hover-class="none"時,沒有點擊態效果blog
hover-stop-propagation類型boolean,默認值false指定是否阻止本節點的祖先節點出現點擊態事件
hover-start-time類型number,默認值50按住後多久出現點擊態ip
hover-stay-time類型number,默認值400手指鬆開後點擊態保留時間rem
<picker :range="years" @change="yearChange" mode="multiSelector">
<view>
{{years[0] [yearIndex1]}} {{years[1][yearIndex2]}}
</view>
</picker>複製代碼
<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
</swiper>複製代碼
<view class="demo" @click="clickTest" @longtap="longtap"></view>
methods:{
clickTest: function(e){
console.log(e);
console.log('click');
},
longtap: function(e){
console.log(e);
console.log('longtap');
}
}複製代碼
<view v-for="(item, index) in students" class="persons" @click="menuClick" v-bind:id="index">{{index}} - {{item.name}}</view>複製代碼
methods:{
menuClick : function(e){
console.log(e);
console.log(e.target.id);
}
},複製代碼
stop 的使用會阻止冒泡get
若本號內容有作得不到位的地方(好比:涉及版權或其餘問題),請及時聯繫咱們進行整改便可,會在第一時間進行處理。
這是一個有質量,有態度的博客