|
@ -1,8 +1,8 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class=""> |
|
|
<div class=""> |
|
|
<van-overlay :show="show" @click="$emit('closeShare')" /> |
|
|
<van-overlay :show="show" @touchstart="handelTouchstart" @touchmove="handelTouchmove" @touchend="handelTouchend"/> |
|
|
<img src="@/assets/images/share/tip.png" alt="" class="tip" v-if="show" @click="$emit('closeShare')"> |
|
|
<img src="@/assets/images/share/tip.png" alt="" class="tip" v-if="show" @click="$emit('closeShare')"> |
|
|
<img src="@/assets/images/share/ai.gif" alt="" class="ai" v-if="show" > |
|
|
<img src="@/assets/images/share/ai.gif" alt="" class="ai" v-if="show"> |
|
|
<img src="@/assets/images/share/shadow.png" alt="" class="shadow"> |
|
|
<img src="@/assets/images/share/shadow.png" alt="" class="shadow"> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
@ -11,6 +11,12 @@ |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'SvgIcon', |
|
|
name: 'SvgIcon', |
|
|
|
|
|
data() { |
|
|
|
|
|
return { |
|
|
|
|
|
time: null, |
|
|
|
|
|
flag:false |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
props: { |
|
|
props: { |
|
|
show: { |
|
|
show: { |
|
|
type: Boolean, |
|
|
type: Boolean, |
|
@ -19,7 +25,27 @@ export default { |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
methods: { |
|
|
|
|
|
handelTouchstart() { |
|
|
|
|
|
this.flag = true; |
|
|
|
|
|
clearTimeout(this.time) |
|
|
|
|
|
this.time = setTimeout(()=>{ |
|
|
|
|
|
if(this.flag){ |
|
|
|
|
|
this.$emit('closeShare') |
|
|
|
|
|
} |
|
|
|
|
|
},1500) |
|
|
|
|
|
}, |
|
|
|
|
|
handelTouchmove(){ |
|
|
|
|
|
this.flag = false; |
|
|
|
|
|
}, |
|
|
|
|
|
handelTouchend(){ |
|
|
|
|
|
this.flag = false; |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
destroyed(){ |
|
|
|
|
|
clearInterval(this.time) |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|