This commit is contained in:
duanliang
2025-04-23 08:59:33 +08:00
parent 55ca8b0e74
commit f01789286e
2 changed files with 11 additions and 6 deletions

View File

@@ -42,6 +42,7 @@
watch(
() => props.list,
(val) => {
// console.log(val,'88888888888888888')
aIndex+=1
if(aIndex>=3&&!val.length){
condShow.value = 1

View File

@@ -40,6 +40,7 @@
let params = null
let condShow = ref(0)
let aIndex = 1
let newList = ref([])
watch(
() => props.list,
(val) => {
@@ -48,6 +49,7 @@
condShow.value = 1
}
if (val.length > 0) {
newList.value = val
setTimeout(() => {
condShow.value = 2
init()
@@ -61,7 +63,7 @@
const getSeriesData = () => {
console.log(props.list,'props.listprops.listprops.list')
return props.list.map((item) => {
return newList.value.map((item) => {
item.value?item.value:0;
return {
type: 'bar',
@@ -79,7 +81,7 @@
}
const init = () => {
if (!params) {
// if (!params) {
params = {
legend: {
show: true,
@@ -89,6 +91,7 @@
itemWidth: fitChartSize(12),
itemGap: fitChartSize(6),
formatter: function (name) {
console.log(name,'nnnnnnnnnnnnnnnnnnnnnnnn')
let obj = props.list.find((item) => item.name == name)
if(obj?.value){
obj.value?obj.value:0;
@@ -133,10 +136,11 @@
},
series: getSeriesData()
}
}
else {
params.series = getSeriesData()
}
let datas = getSeriesData()
// }
// else {
// params.series = getSeriesData()
// }
setOption(params)
}
</script>