Commit d8fd2aac authored by leon's avatar leon

feat:APPF-3577 horizontal add preview image

parent 344b4872
......@@ -39,7 +39,7 @@ export default {
devicePixelRatio: canvasDpr
})
canvas.setChart(chart)
const { dataList: { categories, series } } = this.elementData
const { dataList: { categories, series, preview, images } } = this.elementData
const options = {
...this.elementInfo.option,
tooltip: {},
......@@ -51,7 +51,17 @@ export default {
}
chart.setOption(options)
chart.on('click', event => {
// 特殊处理,如果preview为true,代表点击显示图片
if(preview) {
uni.previewImage({
current: event.dataIndex,
urls:images,
indicator: 'number',
loop: true
})
} else {
this.handleEchartsClick(event)
}
})
return chart
})
......
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