fix:修改时序图缩放键为shift

This commit is contained in:
zyh
2023-09-04 15:48:59 +08:00
parent 2aba070995
commit b79be41eac
3 changed files with 10 additions and 10 deletions

View File

@@ -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": {

View File

@@ -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

View File

@@ -52,7 +52,7 @@ export const chartTimeSeriesLineOption = {
{
disabled: true,
type: 'inside',
zoomOnMouseWheel: 'ctrl'
zoomOnMouseWheel: 'shift'
}
],
color: initColor(),