From 4d910b1875799709675055c081e8516b38fbc006 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Fri, 16 Jun 2023 11:32:03 +0800 Subject: [PATCH] improve display --- src/components/charts/apexChartConfig.ts | 9 --------- src/modules/wallet/portfolio.vue | 14 +++++++------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/components/charts/apexChartConfig.ts b/src/components/charts/apexChartConfig.ts index 3d5dcedd..432f9e76 100644 --- a/src/components/charts/apexChartConfig.ts +++ b/src/components/charts/apexChartConfig.ts @@ -266,15 +266,6 @@ export const getDonutChartConfig = ( theme: string, labels: string[] ) => { - // const donutColors = { - // series1: '#fdd835', - // series2: '#00d4bd', - // series3: '#826bf8', - // series4: '#32baff', - // series5: '#ffa1a1', - // }; - - console.log(donutColors) const { themeSecondaryTextColor, themePrimaryTextColor } = colorVariables(theme); diff --git a/src/modules/wallet/portfolio.vue b/src/modules/wallet/portfolio.vue index cf0b03fe..b66a50a3 100644 --- a/src/modules/wallet/portfolio.vue +++ b/src/modules/wallet/portfolio.vue @@ -110,7 +110,6 @@ const tokenList = computed(() => { const priceloading = ref(false) const prices = ref([]) -const coinIds = ref({} as Record) const tokenQty = computed(() => { const values = {} as Record; Object.values(balances.value).forEach((b) => { @@ -146,9 +145,7 @@ watchEffect(() => { priceloading.value = true get(`https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=${ids}&order=market_cap_desc&per_page=100&page=1&sparkline=true&price_change_percentage=14d&locale=en`) .then(res => { - console.log("response: ", res) prices.value = res - res.forEach((x: any) => console.log(x.sparkline_in_7d.price.length)) }) } } @@ -169,7 +166,7 @@ const changeData = computed(() => { for (let i = 0; i < width; i++) { for (let j = 0; j < vals.length; j++) { - sum[i] += vals[j][i] || 0 + sum[i] += vals.at(j)?.at(i) || 0 } } @@ -204,7 +201,7 @@ const chartConfig = computed(() => { - Manage all your assets in one page + Track all your assets in one page @@ -226,7 +223,7 @@ const chartConfig = computed(() => {
- + @@ -254,8 +251,11 @@ const chartConfig = computed(() => {
- No Data, Import Address + No Data
+
+ Add More Asset +
Token Value