@peng_kai/kit 0.2.20 → 0.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { computed } from 'vue';
|
|
2
|
+
import { computed, reactive } from 'vue';
|
|
3
3
|
import bigNumber from 'bignumber.js';
|
|
4
4
|
import isNil from 'lodash-es/isNil';
|
|
5
5
|
|
|
@@ -11,7 +11,7 @@ export const config = {
|
|
|
11
11
|
/**
|
|
12
12
|
* 当 symbol 为以下值时,使用预设的 Logo
|
|
13
13
|
*/
|
|
14
|
-
const presetSymbols: Record<string, string> = {
|
|
14
|
+
const presetSymbols: Record<string, string> = reactive({
|
|
15
15
|
USDT: 'https://api.iconify.design/cryptocurrency-color:usdt.svg',
|
|
16
16
|
TRX: 'https://api.iconify.design/cryptocurrency-color:trx.svg',
|
|
17
17
|
USDC: 'https://api.iconify.design/cryptocurrency-color:usdc.svg',
|
|
@@ -20,7 +20,11 @@ const presetSymbols: Record<string, string> = {
|
|
|
20
20
|
BUSD: 'https://assets.coingecko.com/coins/images/9576/large/BUSD.png',
|
|
21
21
|
MATIC: 'https://api.iconify.design/cryptocurrency-color:matic.svg',
|
|
22
22
|
SOL: 'https://api.iconify.design/cryptocurrency-color:sol.svg',
|
|
23
|
-
};
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export function setConfig(symbols: Record<string, string>) {
|
|
26
|
+
Object.assign(presetSymbols, symbols);
|
|
27
|
+
}
|
|
24
28
|
</script>
|
|
25
29
|
|
|
26
30
|
<script setup lang="ts">
|