Commit fd8d37c2 by 姜雷

Merge branch 'develop' into test

parents f7508ced ad1491ba
...@@ -117,13 +117,13 @@ Component({ ...@@ -117,13 +117,13 @@ Component({
methods: { methods: {
clickHandle(e) { clickHandle(e) {
console.log(e); console.log(e);
const { touches } = e.detail; const { changedTouches } = e.detail;
let x = 0; let x = 0;
let y = 0; let y = 0;
if (touches && touches.length) { if (changedTouches && changedTouches.length) {
x = touches[0].x; x = changedTouches[0].x;
y = touches[0].y; y = changedTouches[0].y;
} }
const objArr = platforFeeChart.getSnapRecords({ x, y }); const objArr = platforFeeChart.getSnapRecords({ x, y });
if (objArr.length) this.triggerEvent('selectedData', objArr[0]._origin); if (objArr.length) this.triggerEvent('selectedData', objArr[0]._origin);
......
<!-- pages/components/PlatformFeeChart/PlatformFeeChart.wxml --> <!-- pages/components/PlatformFeeChart/PlatformFeeChart.wxml -->
<ff-canvas id="PlatformFeeChart" canvas-id="PlatformFeeChart" opts="{{ opts }}" bindcanvastouch="clickHandle" /> <ff-canvas id="PlatformFeeChart" canvas-id="PlatformFeeChart" opts="{{ opts }}" bindcanvastouchend="clickHandle" />
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment