Commit 95be55e0 by lei

1

parent daa7ebe1
...@@ -155,7 +155,8 @@ const headerBtns = computed(() => [ ...@@ -155,7 +155,8 @@ const headerBtns = computed(() => [
value: "echart", value: "echart",
}, },
]); ]);
const props = defineProps<{ const props = withDefaults(
defineProps<{
token: string; token: string;
scene: string; scene: string;
tb: string; tb: string;
...@@ -163,7 +164,11 @@ const props = defineProps<{ ...@@ -163,7 +164,11 @@ const props = defineProps<{
r24h: number; r24h: number;
mt: string; mt: string;
up?: number; up?: number;
}>(); }>(),
{
up: 0,
}
);
const emit = defineEmits(["update:setPool", "SettwitterRul"]); const emit = defineEmits(["update:setPool", "SettwitterRul"]);
const r24h = ref(""); const r24h = ref("");
const numR24h = ref<string>(""); const numR24h = ref<string>("");
...@@ -195,8 +200,8 @@ const getPriceRange = () => { ...@@ -195,8 +200,8 @@ const getPriceRange = () => {
// -,跌 // -,跌
let newR24h = parseFloat((proR24h + "").replace("-", "")); let newR24h = parseFloat((proR24h + "").replace("-", ""));
// 原价 // 原价
let oldPrice = props.up / (1 - newR24h); let oldPrice = up / (1 - newR24h);
numR24h.value = oldPrice - props.up + ""; numR24h.value = oldPrice - up + "";
numR24h.value = "-" + parseCoinAmount(numR24h.value); numR24h.value = "-" + parseCoinAmount(numR24h.value);
} else if (proR24h == 0) { } else if (proR24h == 0) {
numR24h.value = "+0"; numR24h.value = "+0";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment