From 9d273c172dba83326fb3cf380e8e25d3aaacbfe2 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sun, 16 Jul 2023 15:16:14 +0800 Subject: [PATCH] modify exchange rates page style --- src/components/desktop/AmountInput.vue | 6 +- src/stores/exchangeRates.js | 4 +- src/views/desktop/ExchangeRatesPage.vue | 218 ++++++++++++++---------- 3 files changed, 137 insertions(+), 91 deletions(-) diff --git a/src/components/desktop/AmountInput.vue b/src/components/desktop/AmountInput.vue index 9b2a416c..47e73b00 100644 --- a/src/components/desktop/AmountInput.vue +++ b/src/components/desktop/AmountInput.vue @@ -1,6 +1,6 @@ @@ -10,8 +10,10 @@ import transactionConstants from '@/consts/transaction.js'; export default { props: [ + 'class', 'density', 'disabled', + 'enableRules', 'modelValue' ], emits: [ diff --git a/src/stores/exchangeRates.js b/src/stores/exchangeRates.js index 05b4179f..d7fdc3cc 100644 --- a/src/stores/exchangeRates.js +++ b/src/stores/exchangeRates.js @@ -59,12 +59,12 @@ export const useExchangeRatesStore = defineStore('exchangeRates', { if (!force) { if (currentExchangeRateData && currentExchangeRateData.time && currentExchangeRateData.data && formatUnixTime(currentExchangeRateData.data.updateTime, 'YYYY-MM-DD') === formatUnixTime(now, 'YYYY-MM-DD')) { - return currentExchangeRateData.data; + return Promise.resolve(currentExchangeRateData.data); } if (currentExchangeRateData && currentExchangeRateData.time && currentExchangeRateData.data && formatUnixTime(currentExchangeRateData.time, 'YYYY-MM-DD HH') === formatUnixTime(now, 'YYYY-MM-DD HH')) { - return currentExchangeRateData.data; + return Promise.resolve(currentExchangeRateData.data); } } diff --git a/src/views/desktop/ExchangeRatesPage.vue b/src/views/desktop/ExchangeRatesPage.vue index 259454db..d9170bea 100644 --- a/src/views/desktop/ExchangeRatesPage.vue +++ b/src/views/desktop/ExchangeRatesPage.vue @@ -1,76 +1,102 @@