mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 08:44:25 +08:00
support exchange rate
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
const exchangeRatesLocalStorageKey = 'lab_exchange_rates';
|
||||
|
||||
function getExchangeRates() {
|
||||
const storageData = localStorage.getItem(exchangeRatesLocalStorageKey) || '{}';
|
||||
return JSON.parse(storageData);
|
||||
}
|
||||
|
||||
function setExchangeRates(value) {
|
||||
const storageData = JSON.stringify(value);
|
||||
localStorage.setItem(exchangeRatesLocalStorageKey, storageData);
|
||||
}
|
||||
|
||||
function clearExchangeRates() {
|
||||
localStorage.removeItem(exchangeRatesLocalStorageKey);
|
||||
}
|
||||
|
||||
export default {
|
||||
getExchangeRates,
|
||||
setExchangeRates,
|
||||
clearExchangeRates,
|
||||
};
|
||||
Reference in New Issue
Block a user