点击分享过后如何先执行打印1,后执行打印2
<template>
<button class="share" open-type="share" @click="ceshi()">分享</button>
<
</template>
<script>
export default {
onShareAppMessage: function (ops) {
console.log('2')
},
methods:{
ceshi(){
console.log('1')
}
}
};
</script>
<style lang="scss" scoped></style>
这个是默认行为,除非你再加一个button通过冒泡的形式先执行你方法事件再onShareAppMessage
<button open-type="share"> <button bindtap="handleShare">分享</button> </button>