You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
13 KiB

{"version":3,"sources":["webpack:///G:/web/中龙小程序/zhonglmini/components/drag-button/drag-button.vue?8f3c","webpack:///G:/web/中龙小程序/zhonglmini/components/drag-button/drag-button.vue?69b7","webpack:///G:/web/中龙小程序/zhonglmini/components/drag-button/drag-button.vue?3435","webpack:///G:/web/中龙小程序/zhonglmini/components/drag-button/drag-button.vue?494f","uni-app:///components/drag-button/drag-button.vue","webpack:///G:/web/中龙小程序/zhonglmini/components/drag-button/drag-button.vue?5198","webpack:///G:/web/中龙小程序/zhonglmini/components/drag-button/drag-button.vue?d4d7"],"names":["name","props","isDock","type","default","existTabBar","data","top","left","width","height","offsetWidth","offsetHeight","windowWidth","windowHeight","isMove","edge","text","mounted","console","query","methods","click","touchstart","touchmove","touchend"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAwH;AACxH;AAC+D;AACL;AACc;;;AAGxE;AACqL;AACrL,gBAAgB,0LAAU;AAC1B,EAAE,iFAAM;AACR,EAAE,sFAAM;AACR,EAAE,+FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,0FAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAqrB,CAAgB,srBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eCmBzsB;EACAA;EACAC;IACAC;MACAC;MACAC;IACA;IACAC;MACAF;MACAC;IACA;EACA;EACAE;IACA;MACAC;MACAC;MACAC;MACAC;MACAC;MACAC;MACAC;MACAC;MACAC;MACAC;MACAC;IACA;EACA;EACAC;IAAA;IACA;IAEA;IACA;IAKA;MACA;IACA;IACAC;IAEA;IACAC;MACA;MACA;MACA;MACA;MACA;MACA;IACA;EACA;EACAC;IACAC;MACA;IACA;IACAC;MACA;IACA;IACAC;MACA;MACA;QACA;MACA;MAEA;MAEA;MAEA;MAIA;;MAEA;MACA;QACA;MACA;QACA;MACA;QACA;MACA;IAEA;IACAC;MACA;QACA;QAEA;UACA;QACA;UACA;QACA;MAEA;MAEA;MAEA;IACA;EACA;AAAA;AAAA,2B;;;;;;;;;;;;;ACvHA;AAAA;AAAA;AAAA;AAAgyC,CAAgB,ytCAAG,EAAC,C;;;;;;;;;;;ACApzC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"components/drag-button/drag-button.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./drag-button.vue?vue&type=template&id=5aadf2dc&\"\nvar renderjs\nimport script from \"./drag-button.vue?vue&type=script&lang=js&\"\nexport * from \"./drag-button.vue?vue&type=script&lang=js&\"\nimport style0 from \"./drag-button.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\runtime\\\\componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"components/drag-button/drag-button.vue\"\nexport default component.exports","export * from \"-!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--17-0!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./drag-button.vue?vue&type=template&id=5aadf2dc&\"","var components\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--13-1!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./drag-button.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--13-1!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./drag-button.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view>\r\n\t\t<view\r\n\t\t\tid=\"_drag_button\"\r\n\t\t\tclass=\"drag\"\r\n\t\t\t:style=\"'left: ' + left + 'px; top:' + top + 'px;'\"\r\n\t\t\t@touchstart=\"touchstart\"\r\n\t\t\t@touchmove.stop.prevent=\"touchmove\"\r\n\t\t\t@touchend=\"touchend\"\r\n\t\t\t@click.stop.prevent=\"click\"\r\n\t\t\t:class=\"{transition: isDock && !isMove }\"\r\n\t\t>\r\n\t\t\r\n\t\t\t<text>{{ text }}</text>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\texport default {\r\n\t\tname: 'drag-button',\r\n\t\tprops: {\r\n\t\t\tisDock:{\r\n\t\t\t\ttype: Boolean,\r\n\t\t\t\tdefault: false\r\n\t\t\t},\r\n\t\t\texistTabBar:{\r\n\t\t\t\ttype: Boolean,\r\n\t\t\t\tdefault: false\r\n\t\t\t}\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\ttop:0,\r\n\t\t\t\tleft:0,\r\n\t\t\t\twidth: 0,\r\n\t\t\t\theight: 0,\r\n\t\t\t\toffsetWidth: 0,\r\n\t\t\t\toffsetHeight: 0,\r\n\t\t\t\twindowWidth: 0,\r\n\t\t\t\twindowHeight: 0,\r\n\t\t\t\tisMove: true,\r\n\t\t\t\tedge: 10,\r\n\t\t\t\ttext: '客服'\r\n\t\t\t}\r\n\t\t},\r\n\t\tmounted() {\r\n\t\t\tconst sys = uni.getSystemInfoSync();\r\n\t\t\t\r\n\t\t\tthis.windowWidth = sys.windowWidth;\r\n\t\t\tthis.windowHeight = sys.windowHeight;\r\n\t\t\t\r\n\t\t\t// #ifdef APP-PLUS\r\n\t\t\t\tthis.existTabBar && (this.windowHeight -= 50);\r\n\t\t\t// #endif\r\n\t\t\tif (sys.windowTop) {\r\n\t\t\t\tthis.windowHeight += sys.windowTop;\r\n\t\t\t}\r\n\t\t\tconsole.log(sys)\r\n\t\t\t\r\n\t\t\tconst query = uni.createSelectorQuery().in(this);\r\n\t\t\tquery.select('#_drag_button').boundingClientRect(data => {\r\n\t\t\t\tthis.width = data.width;\r\n\t\t\t\tthis.height = data.height;\r\n\t\t\t\tthis.offsetWidth = data.width / 2;\r\n\t\t\t\tthis.offsetHeight = data.height / 2;\r\n\t\t\t\tthis.left = this.windowWidth - this.width - this.edge;\r\n\t\t\t\tthis.top = this.windowHeight - this.height - this.edge;\r\n\t\t\t}).exec();\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\tclick() {\r\n\t\t\t\tthis.$emit('btnClick');\r\n\t\t\t},\r\n\t\t\ttouchstart(e) {\r\n\t\t\t\tthis.$emit('btnTouchstart');\r\n\t\t\t},\r\n\t\t\ttouchmove(e) {\r\n\t\t\t\t// 单指触摸\r\n\t\t\t\tif (e.touches.length !== 1) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.isMove = true;\r\n\t\t\t\t\r\n\t\t\t\tthis.left = e.touches[0].clientX - this.offsetWidth;\r\n\t\t\t\t\r\n\t\t\t\tlet clientY = e.touches[0].clientY - this.offsetHeight;\r\n\t\t\t\t// #ifdef H5\r\n\t\t\t\t\tclientY += this.height;\r\n\t\t\t\t// #endif\r\n\t\t\t\tlet edgeBottom = this.windowHeight - this.height - this.edge;\r\n\r\n\t\t\t\t// 上下触及边界\r\n\t\t\t\tif (clientY < this.edge) {\r\n\t\t\t\t\tthis.top = this.edge;\r\n\t\t\t\t} else if (clientY > edgeBottom) {\r\n\t\t\t\t\tthis.top = edgeBottom;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.top = clientY\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\ttouchend(e) {\r\n\t\t\t\tif (this.isDock) {\r\n\t\t\t\t\tlet edgeRigth = this.windowWidth - this.width - this.edge;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (this.left < this.windowWidth / 2 - this.offsetWidth) {\r\n\t\t\t\t\t\tthis.left = this.edge;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.left = edgeRigth;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.isMove = false;\r\n\t\t\t\t\r\n\t\t\t\tthis.$emit('btnTouchend');\r\n\t\t\t},\r\n\t\t}}\r\n</script>\r\n\r\n<style lang=\"scss\">\r\n\t.drag {\r\n\t\tdisplay: flex;\r\n\t\tjustify-content: center;\r\n\t\talign-items: center;\r\n\t\tbackground-color: #46B98E;\r\n\t\tbox-shadow: 0 0 6upx rgba(0, 0, 0, 0.4);\r\n\t\tcolor: $uni-text-color-inverse;\r\n\t\twidth: 80upx;\r\n\t\theight: 80upx;\r\n\t\tborder-radius: 50%;\r\n\t\tfont-size: $uni-font-size-sm;\r\n\t\tposition: fixed;\r\n\t\tz-index: 999999;\r\n\t\t\r\n\t\t&.transition {\r\n\t\t\ttransition: left .3s ease,top .3s ease;\r\n\t\t}\r\n\t}\r\n\t\r\n</style>\r\n","import mod from \"-!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./drag-button.vue?vue&type=style&index=0&lang=scss&\"; export default mod; export * from \"-!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./drag-button.vue?vue&type=style&index=0&lang=scss&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1720092621425\n var cssReload = require(\"F:/软件/HBuilder X/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"/\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""}