Merge branch 'dev-3.8' of git.mesalab.cn:nezha/nezha-fronted into dev-3.9

This commit is contained in:
zyh
2023-09-04 16:01:59 +08:00
4 changed files with 14 additions and 12 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

@@ -289,7 +289,7 @@ export default {
this.tooltip.activeIndex = undefined
})
// 修复echarts bug(dataZoom设置为inside 未按住ctrl 页面无法滚动)
// 修复echarts bug(dataZoom设置为inside 未按住shift 页面无法滚动)
// 监听按键按下事件
document.addEventListener('keydown', this.keydown)
// 监听按键松开事件
@@ -301,9 +301,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
@@ -313,9 +313,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(),

View File

@@ -41,8 +41,10 @@
</el-popover>
</span>
<div class="chart-header__title" v-if="!isGroup" :title="nameFormate">{{nameFormate}}</div>
<div class="chart-header__title groupTitle" :title="chartData ? chartData.length : 0" v-else >
<span @click="groupShow" style="cursor:pointer"> <i class="nz-icon" :class="chartInfo.param.collapse ? 'nz-icon-arrow-right': 'nz-icon-arrow-down'"></i></span>
<div class="chart-header__title groupTitle" v-else :title="chartData ? chartData.length : 0" style="cursor:pointer" @click="groupShow">
<span>
<i class="nz-icon" :class="chartInfo.param.collapse ? 'nz-icon-arrow-right': 'nz-icon-arrow-down'"></i>
</span>
{{nameFormate}}
<span v-show="chartInfo.param.collapse" class="collapse-content">({{chartData ? chartData.length : 0}} charts)</span>
</div>