diff --git a/nezha-fronted/package-lock.json b/nezha-fronted/package-lock.json index 531ecdd9a..9545f25a8 100644 --- a/nezha-fronted/package-lock.json +++ b/nezha-fronted/package-lock.json @@ -14340,7 +14340,7 @@ }, "node-sass": { "version": "4.14.1", - "resolved": "https://registry.npmmirror.com/node-sass/-/node-sass-4.14.1.tgz", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz", "integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==", "dev": true, "requires": { @@ -20727,7 +20727,7 @@ }, "webpack-bundle-analyzer": { "version": "2.13.1", - "resolved": "https://registry.npmmirror.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.13.1.tgz", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.13.1.tgz", "integrity": "sha512-rwxyfecTAxoarCC9VlHlIpfQCmmJ/qWD5bpbjkof+7HrNhTNZIwZITxN6CdlYL2axGmwNUQ+tFgcSOiNXMf/sQ==", "dev": true, "requires": { diff --git a/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue b/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue index 33d423ab5..6085aff88 100644 --- a/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue +++ b/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue @@ -274,7 +274,7 @@ export default { this.tooltip.activeIndex = undefined }) - // 修复echarts bug(dataZoom设置为inside 未按住ctrl 页面无法滚动) + // 修复echarts bug(dataZoom设置为inside 未按住shift 页面无法滚动) // 监听按键按下事件 document.addEventListener('keydown', this.keydown) // 监听按键松开事件 @@ -286,9 +286,9 @@ export default { }, keydown (event) { // 监听按键按下事件 - // 判断是否按下了Ctrl键 - if (event.ctrlKey) { - // 如果按下了Ctrl键,则启用Echarts的dataZoom功能 + // 判断是否按下了shift键 + if (event.shiftKey) { + // 如果按下了shift键,则启用Echarts的dataZoom功能 getChart(this.chartId).setOption({ dataZoom: [{ disabled: false @@ -298,9 +298,9 @@ export default { }, keyup (event) { // 监听按键松开事件 - // 判断是否释放了Ctrl键 - if (!event.ctrlKey) { - // 如果释放了Ctrl键,则禁用Echarts的dataZoom功能 + // 判断是否释放了shift键 + if (!event.shiftKey) { + // 如果释放了shift键,则禁用Echarts的dataZoom功能 getChart(this.chartId).setOption({ dataZoom: [{ disabled: true diff --git a/nezha-fronted/src/components/chart/chart/options/chartTimeSeries.js b/nezha-fronted/src/components/chart/chart/options/chartTimeSeries.js index 32aa06870..c10ebc33b 100644 --- a/nezha-fronted/src/components/chart/chart/options/chartTimeSeries.js +++ b/nezha-fronted/src/components/chart/chart/options/chartTimeSeries.js @@ -52,7 +52,7 @@ export const chartTimeSeriesLineOption = { { disabled: true, type: 'inside', - zoomOnMouseWheel: 'ctrl' + zoomOnMouseWheel: 'shift' } ], color: initColor(),