f3e84c5.js.map 4.5 KB

1
  1. {"version":3,"sources":["webpack:///./components/Zoom.vue?5291","webpack:///./components/Zoom.vue","webpack:///./components/Zoom.vue?a9cb","webpack:///./components/Zoom.vue?869a","webpack:///./components/Zoom.vue?0324"],"names":["module","exports","name","props","imgUrl","String","data","methods","handler","event","mask","this","$refs","left","offsetX","offsetWidth","top","offsetY","offsetHeight","style","obj","bigShow","$emit","leave","component","_vm","_c","_self","staticClass","staticStyle","attrs","_v","on","$event","ref"],"mappings":"8EACAA,EAAOC,QAAU,CAAC,C,0CCDlB,ICAiP,EDElO,CACbC,KAAM,OACNC,MAAO,CACLC,OAAQC,QAEVC,KAAI,WACF,MAAO,CACP,CACF,EACAC,QAAS,CACPC,QAAO,SAACC,GACN,IAAIC,KAAOC,KAAKC,MAAMF,KAGlBG,EAAOJ,EAAMK,QAAUJ,KAAKK,YAAc,EAC1CC,EAAMP,EAAMQ,QAAUP,KAAKQ,aAAe,EAE1CL,GAAQ,IAAGA,EAAO,GAClBA,GAAQH,KAAKK,cAAaF,EAAOH,KAAKK,aACtCC,GAAO,IAAGA,EAAM,GAChBA,GAAON,KAAKQ,eAAcF,EAAMN,KAAKQ,cAGzCR,KAAKS,MAAMN,KAAOA,EAAO,KACzBH,KAAKS,MAAMH,IAAMA,EAAM,KAGvB,IAAII,EAAM,CAAC,EACXA,EAAIP,KAAOA,EACXO,EAAIJ,IAAMA,EACVI,EAAIC,SAAU,EACdV,KAAKW,MAAM,YAAaF,EAC1B,EACAG,MAAK,WACH,IAAIH,EAAM,CACVA,KAAW,EACXA,IAAU,EACVA,SAAc,GACdT,KAAKW,MAAM,YAAaF,EAC1B,I,iBEjCAI,UAAY,YACd,GFTW,WAAkB,IAAIC,EAAI,KAAKC,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,gBAAgB,CAACF,EAAG,WAAW,CAACG,YAAY,CAAC,MAAQ,OAAO,OAAS,QAAQC,MAAM,CAAC,IAAML,EAAIrB,OAAO,IAAM,GAAG,IAAM,WAAWqB,EAAIM,GAAG,KAAKL,EAAG,MAAM,CAACE,YAAY,QAAQI,GAAG,CAAC,UAAYP,EAAIjB,QAAQ,WAAaiB,EAAIF,MAAM,MAAQ,SAASU,GAAQ,OAAOR,EAAIH,MAAM,cAAc,KAAKG,EAAIM,GAAG,KAAKL,EAAG,MAAM,CAACQ,IAAI,OAAON,YAAY,UAAU,EACza,GACsB,IEUpB,EACA,KACA,WACA,MAIa,UAAAJ,U,0CCnBf,M","file":"f3e84c5.js","sourcesContent":["// extracted by extract-css-chunks-webpack-plugin\nmodule.exports = {};","\n\nexport default {\n name: \"Zoom\",\n props: {\n imgUrl: String,\n },\n data() {\n return {\n };\n },\n methods: {\n handler(event) {\n let mask = this.$refs.mask;\n // let bigImg = this.$refs.big;\n // 遮罩层可移动的范围:鼠标的当前坐标到该元素的距离(左侧、顶部)减去 遮罩层宽、高的一半(遮罩层始终是一个以鼠标为中心的正方形)\n let left = event.offsetX - mask.offsetWidth / 2;\n let top = event.offsetY - mask.offsetHeight / 2;\n // 约束遮罩层可移动的范围\n if (left <= 0) left = 0;\n if (left >= mask.offsetWidth) left = mask.offsetWidth;\n if (top <= 0) top = 0;\n if (top >= mask.offsetHeight) top = mask.offsetHeight;\n\n // 修改元素的left|top属性值\n mask.style.left = left + \"px\";\n mask.style.top = top + \"px\";\n // bigImg.style.left = -2 * left + \"px\";\n // bigImg.style.top = -2 * top + \"px\";\n let obj = {};\n obj.left = left;\n obj.top = top;\n obj.bigShow = true;\n this.$emit(\"sendStyle\", obj);\n },\n leave() {\n let obj = {};\n obj.left = 0;\n obj.top = 0;\n obj.bigShow = false;\n this.$emit(\"sendStyle\", obj);\n },\n },\n};\n","import mod from \"-!../node_modules/babel-loader/lib/index.js??ref--2-0!../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./Zoom.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../node_modules/babel-loader/lib/index.js??ref--2-0!../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./Zoom.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Zoom.vue?vue&type=template&id=5b247e95&scoped=true\"\nimport script from \"./Zoom.vue?vue&type=script&lang=js\"\nexport * from \"./Zoom.vue?vue&type=script&lang=js\"\nimport style0 from \"./Zoom.vue?vue&type=style&index=0&id=5b247e95&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"5b247e95\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../node_modules/extract-css-chunks-webpack-plugin/dist/loader.js??ref--7-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/dist/cjs.js??ref--7-oneOf-1-2!../node_modules/sass-loader/dist/cjs.js??ref--7-oneOf-1-3!../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./Zoom.vue?vue&type=style&index=0&id=5b247e95&prod&lang=scss&scoped=true\""],"sourceRoot":""}