dev_zt
parent
2a095a9b3c
commit
ec7afcfee1
|
@ -49,7 +49,7 @@ export default {
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const pathname = window.location.hash.split('/')[1] || ''
|
const pathname = window.location.hash.split('/')[1] || ''
|
||||||
if (!['login'].includes(pathname)) {
|
if (!['login'].includes(pathname)) {
|
||||||
getUserInfo()
|
// getUserInfo()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const getUserInfo = async () => {
|
const getUserInfo = async () => {
|
||||||
|
|
|
@ -33,6 +33,7 @@ export default {
|
||||||
});
|
});
|
||||||
const getChartsZfl = (id, text) => {
|
const getChartsZfl = (id, text) => {
|
||||||
var dom = document.getElementById(id);
|
var dom = document.getElementById(id);
|
||||||
|
console.log(dom);
|
||||||
var op = {
|
var op = {
|
||||||
color: ['#80FFA5', '#00DDFF', '#37A2FF', '#FF0087', '#FFBF00'],
|
color: ['#80FFA5', '#00DDFF', '#37A2FF', '#FF0087', '#FFBF00'],
|
||||||
title: {
|
title: {
|
||||||
|
@ -239,6 +240,9 @@ export default {
|
||||||
}
|
}
|
||||||
const getEchart = (dom, op) => {
|
const getEchart = (dom, op) => {
|
||||||
if (dom) {
|
if (dom) {
|
||||||
|
// 图表的dom属性中发现了一个特殊的属性:_echarts_instance_,对应的值是一个id,可能是由于再次渲染时这个id未发生改变导致ehcarts认为不需要重新渲染
|
||||||
|
// 手动移除该属性
|
||||||
|
dom.removeAttribute('_echarts_instance_')
|
||||||
var myChart = echarts.init(dom);
|
var myChart = echarts.init(dom);
|
||||||
var option = op;
|
var option = op;
|
||||||
|
|
||||||
|
@ -267,7 +271,6 @@ export default {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20%;
|
height: 20%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
border: 1px solid red;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue