diff --git a/src/components/Share/index.vue b/src/components/Share/index.vue index fcee10d..6b0aa7f 100644 --- a/src/components/Share/index.vue +++ b/src/components/Share/index.vue @@ -1,8 +1,8 @@ @@ -11,6 +11,12 @@ export default { name: 'SvgIcon', + data() { + return { + time: null, + flag:false + } + }, props: { show: { type: Boolean, @@ -19,7 +25,27 @@ export default { }, 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) + }, }