fix:修复切换用户主题错误
This commit is contained in:
@@ -175,6 +175,7 @@ export default {
|
||||
.style('font-size', function (d) {
|
||||
return d.r / 3 > 10 ? d.r / 3 : 0
|
||||
})
|
||||
.style('border-radius', '50%')
|
||||
.html((d) => {
|
||||
return this.bubbleFormatterLabel(d)
|
||||
})
|
||||
@@ -237,19 +238,19 @@ export default {
|
||||
this.drawBubbleChart()
|
||||
}, 50)
|
||||
},
|
||||
bubbleEnter (e, node) { // 移入六边形
|
||||
bubbleEnter (e, node) { // 移入气泡
|
||||
this.tooltip.title = node.data.alias
|
||||
this.tooltip.value = node.data.showValue
|
||||
this.tooltip.mapping = node.data.mapping
|
||||
this.tooltip.show = true
|
||||
this.setPosition(e)
|
||||
},
|
||||
bubbleMove (e) { // 六边形内移动
|
||||
bubbleMove (e) { // 气泡内移动
|
||||
if (this.tooltip.show) {
|
||||
this.setPosition(e)
|
||||
}
|
||||
},
|
||||
bubbleLeave () {
|
||||
bubbleLeave () { // 移出气泡
|
||||
this.tooltip.show = false
|
||||
},
|
||||
setPosition (e) {
|
||||
|
||||
@@ -499,9 +499,12 @@
|
||||
<span style="margin-right: 5px" :title="$t('overall.duplicate')">
|
||||
<i @click="copyColumns(index)" class="nz-icon nz-icon-override"></i>
|
||||
</span>
|
||||
<span class="nz-icon-minus-medium" :title="$t('overall.delete')">
|
||||
<span style="margin-right: 5px" class="nz-icon-minus-medium" :title="$t('overall.delete')">
|
||||
<i @click="removeColumns(index)" class="nz-icon nz-icon-minus"></i>
|
||||
</span>
|
||||
<span style="margin-right: 5px;fontSize:17px;cursor: pointer;" class="draggable-sort" :title="$t('dashboard.panel.chartForm.sort')">
|
||||
<i class="el-icon-sort"></i>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<transition-group appear tag="div" name="el-zoom-in-top">
|
||||
@@ -542,7 +545,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item :prop="'param.columns.' + index + '.display'" :rules="{ required: true, message: $t('validate.required'), trigger: 'blur'}" class="thresholds-from-item">
|
||||
<el-input v-model="item.display" style="margin-right: 10px" size="small" @change="change('columns',index)"/>
|
||||
<el-input v-model="item.display" size="small" @change="change('columns',index)"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</transition-group>
|
||||
|
||||
@@ -452,9 +452,12 @@
|
||||
<span style="margin-right: 5px" :title="$t('overall.duplicate')">
|
||||
<i @click="copyColumns(index)" class="nz-icon nz-icon-override"></i>
|
||||
</span>
|
||||
<span class="nz-icon-minus-medium" :title="$t('overall.delete')">
|
||||
<span style="margin-right: 5px" class="nz-icon-minus-medium" :title="$t('overall.delete')">
|
||||
<i @click="removeColumns(index)" class="nz-icon nz-icon-minus"></i>
|
||||
</span>
|
||||
<span style="margin-right: 5px;fontSize:17px;cursor: pointer;" class="draggable-sort" :title="$t('dashboard.panel.chartForm.sort')">
|
||||
<i class="el-icon-sort"></i>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<transition-group appear tag="div" name="el-zoom-in-top">
|
||||
@@ -495,7 +498,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item :prop="'param.columns.' + index + '.display'" :rules="{ required: true, message: $t('validate.required'), trigger: 'blur'}" class="thresholds-from-item">
|
||||
<el-input v-model="item.display" style="margin-right: 10px" size="small" @change="change('columns',index)"/>
|
||||
<el-input v-model="item.display" size="small" @change="change('columns',index)"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</transition-group>
|
||||
|
||||
@@ -142,8 +142,10 @@ router.beforeEach((to, from, next) => {
|
||||
returnMenuCode(res.data.menus, arr)
|
||||
store.commit('setButtonList', arr)
|
||||
store.commit('setRoleList', res.data.roles)
|
||||
if (localStorage.getItem('nz-user-id')) {
|
||||
const theme = localStorage.getItem(`nz-user-${localStorage.getItem('nz-user-id')}-theme`) || 'light'
|
||||
document.getElementsByTagName('body')[0].setAttribute('class', 'theme-' + theme)
|
||||
}
|
||||
resolve()
|
||||
} else {
|
||||
localStorage.removeItem('nz-token')
|
||||
@@ -152,8 +154,10 @@ router.beforeEach((to, from, next) => {
|
||||
})
|
||||
})
|
||||
} else {
|
||||
if (localStorage.getItem('nz-user-id')) {
|
||||
const theme = localStorage.getItem(`nz-user-${localStorage.getItem('nz-user-id')}-theme`) || 'light'
|
||||
document.getElementsByTagName('body')[0].setAttribute('class', 'theme-' + theme)
|
||||
}
|
||||
resolve()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -168,6 +168,7 @@ const user = {
|
||||
localStorage.removeItem('nz-username')
|
||||
localStorage.removeItem('nz-username')
|
||||
localStorage.removeItem('nz-token')
|
||||
localStorage.removeItem('nz-user-id')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user