1 line
3.9 KiB
JSON
1 line
3.9 KiB
JSON
{"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\nexport const myMixins = {\n data() {\n return {\n touchStart: [],\n touchEnd: [],\n slideShow: true\n };\n },\n methods: {\n goPage(page, query) {\n this.$router.push({\n name: page,\n query: query\n });\n },\n touchstartHandle(e) {\n let sx = e.touches[0].pageX;\n let sy = e.touches[0].pageY;\n this.touchStart = [sx, sy];\n // console.log('e', e)\n // console.log(this.touchStart)\n },\n\n touchendHandle() {\n if (this.touchStart && this.touchEnd) {\n if (this.touchStart[1] < this.touchEnd[1] - 50) {\n this.slideShow = false;\n } else if (this.touchStart[1] > this.touchEnd[1] + 50) {\n this.slideShow = true;\n } else {\n console.log('静止');\n }\n console.log('this.slideShow', this.slideShow);\n }\n },\n touchmoveHandle(e) {\n let sx = e.touches[0].pageX;\n let sy = e.touches[0].pageY;\n this.touchEnd = [sx, sy];\n // console.log('move', e)\n // console.log(this.touchEnd)\n }\n }\n};","map":{"version":3,"names":["myMixins","data","touchStart","touchEnd","slideShow","methods","goPage","page","query","$router","push","name","touchstartHandle","e","sx","touches","pageX","sy","pageY","touchendHandle","console","log","touchmoveHandle"],"sources":["E:/work/sino/sino-h5/src/utils/myMixins.js"],"sourcesContent":["export const myMixins = {\r\n data() {\r\n return {\r\n touchStart: [],\r\n touchEnd: [],\r\n slideShow: true\r\n }\r\n },\r\n methods: {\r\n goPage(page, query) {\r\n this.$router.push({\r\n name: page,\r\n query: query\r\n })\r\n },\r\n touchstartHandle(e) {\r\n let sx = e.touches[0].pageX\r\n let sy = e.touches[0].pageY\r\n this.touchStart = [sx, sy]\r\n // console.log('e', e)\r\n // console.log(this.touchStart)\r\n },\r\n touchendHandle() {\r\n if( this.touchStart && this.touchEnd ) {\r\n if (this.touchStart[1] < this.touchEnd[1] - 50) {\r\n this.slideShow = false;\r\n } else if (this.touchStart[1] > this.touchEnd[1] + 50) {\r\n this.slideShow = true;\r\n } else {\r\n console.log('静止')\r\n }\r\n console.log('this.slideShow', this.slideShow)\r\n }\r\n },\r\n touchmoveHandle(e) {\r\n let sx = e.touches[0].pageX;\r\n let sy = e.touches[0].pageY;\r\n this.touchEnd = [sx, sy]\r\n // console.log('move', e)\r\n // console.log(this.touchEnd)\r\n }\r\n }\r\n}\r\n"],"mappings":";AAAA,OAAO,MAAMA,QAAQ,GAAG;EACtBC,IAAIA,CAAA,EAAG;IACL,OAAO;MACLC,UAAU,EAAE,EAAE;MACdC,QAAQ,EAAE,EAAE;MACZC,SAAS,EAAE;IACb,CAAC;EACH,CAAC;EACDC,OAAO,EAAE;IACPC,MAAMA,CAACC,IAAI,EAAEC,KAAK,EAAE;MAClB,IAAI,CAACC,OAAO,CAACC,IAAI,CAAC;QAChBC,IAAI,EAAEJ,IAAI;QACVC,KAAK,EAAEA;MACT,CAAC,CAAC;IACJ,CAAC;IACDI,gBAAgBA,CAACC,CAAC,EAAE;MAClB,IAAIC,EAAE,GAAGD,CAAC,CAACE,OAAO,CAAC,CAAC,CAAC,CAACC,KAAK;MAC3B,IAAIC,EAAE,GAAGJ,CAAC,CAACE,OAAO,CAAC,CAAC,CAAC,CAACG,KAAK;MAC3B,IAAI,CAAChB,UAAU,GAAG,CAACY,EAAE,EAAEG,EAAE,CAAC;MAC1B;MACA;IACF,CAAC;;IACDE,cAAcA,CAAA,EAAG;MACf,IAAI,IAAI,CAACjB,UAAU,IAAI,IAAI,CAACC,QAAQ,EAAG;QACrC,IAAI,IAAI,CAACD,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAACC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE;UAC/C,IAAI,CAACC,SAAS,GAAG,KAAK;QACvB,CAAC,MAAM,IAAI,IAAI,CAACF,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAACC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE;UACrD,IAAI,CAACC,SAAS,GAAG,IAAI;QACvB,CAAC,MAAM;UACLgB,OAAO,CAACC,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