fix: 添加地图的深色模式

This commit is contained in:
zhangyu
2021-12-16 20:05:20 +08:00
parent f20f5a502a
commit 470fbb1a61
3 changed files with 16 additions and 3 deletions

View File

@@ -335,7 +335,7 @@
word-break: break-all;
border-radius: 2px;
box-sizing: border-box;
border: 2px solid #fff;
border: 2px solid $--border-color-light;
overflow: hidden;
}
}

View File

@@ -1,7 +1,7 @@
<template>
<div class="overview">
<div class="content-col-content">
<div id="map" style="height: 100%; width: 100%"></div>
<div id="map" style="height: 100%; width: 100%" :style="theme=='light'? '': ' filter: invert(1) hue-rotate(0.5turn);opacity: 0.75;'"></div>
</div>
<!--自定义地图鼠标悬浮提示dom避免被overflowhidden裁剪-->
<div :style="{'left': `${tooltip.x}px`, 'top': `${tooltip.y}px`}" class="my-pane"></div>
@@ -32,7 +32,8 @@ export default {
tooltip: {
x: 0,
y: 0
}
},
theme: localStorage.getItem(`nz-user-${localStorage.getItem('nz-user-id')}-theme`)
}
},
mounted () {

View File

@@ -165,6 +165,18 @@ export default {
{
id: 'group',
name: this.$t('dashboard.panel.chartForm.typeVal.group.label')
},
{
id: 'map',
name: this.$t('dashboard.panel.chartForm.typeVal.map.label')
},
{
id: 'carousel',
name: this.$t('dashboard.panel.chartForm.typeVal.carousel.label')
},
{
id: 'hexagonFigure',
name: this.$t('dashboard.panel.chartForm.typeVal.hexagonFigure.label')
}
]
}