This commit is contained in:
duanxiaohai 2024-05-24 15:44:10 +08:00
parent d46715d758
commit 9b8d00c7e4
1 changed files with 12 additions and 8 deletions

View File

@ -40,10 +40,10 @@ const data = reactive({
const getOption1 = () => {
data.list = data.list1.map((item) => [item]);
data.list1.forEach(item=>{
data.total+=item;
})
data.totalMax = data.total+6;
data.list1.forEach((item) => {
data.total += item;
});
data.totalMax = data.total + 6;
};
const getOption = () => {
data.option = {
@ -120,7 +120,8 @@ const getOption = () => {
normal: {
show: true,
position: ["10%", "-60%"],
formatter: `${data.list[0][0]}%`,
// formatter: `${data.list[0][0]}%`,
formatter: `${data.list[0]?.[0] ?? "0"}%`,
color: "#fff",
fontSize: 22,
fontWeight: 600,
@ -152,7 +153,8 @@ const getOption = () => {
normal: {
show: true,
position: ["35%", "-60%"],
formatter: `${data.list[1][0]}%`,
// formatter: `${data.list[1][0]}%`,
formatter: `${data.list[1]?.[0] ?? "0"}%`,
color: "#fff",
fontSize: 22,
fontWeight: 600,
@ -184,7 +186,8 @@ const getOption = () => {
normal: {
show: true,
position: ["35%", "-60%"],
formatter: `${data.list[2][0]}%`,
// formatter: `${data.list[2][0]}%`,
formatter: `${data.list[2]?.[0] ?? "0"}%`,
color: "#fff",
fontSize: 22,
fontWeight: 600,
@ -216,7 +219,8 @@ const getOption = () => {
normal: {
show: true,
position: ["35%", "-60%"],
formatter: `${data.list[3][0]}%`,
// formatter: `${data.list[3][0]}%`,
formatter: `${data.list[3]?.[0] ?? "0"}%`,
color: "#fff",
fontSize: 22,
fontWeight: 600,