|
@@ -8,8 +8,8 @@
|
|
|
<ul>
|
|
<ul>
|
|
|
<li v-for="(item, index) in dataList" :key="index">
|
|
<li v-for="(item, index) in dataList" :key="index">
|
|
|
<span>{{ formatDate(item.TS, 'HH:mm:ss') }}</span>
|
|
<span>{{ formatDate(item.TS, 'HH:mm:ss') }}</span>
|
|
|
- <span :class="handlePriceColor(quote.presettle, item.PE)">{{ item.PE }}</span>
|
|
|
|
|
- <span>{{ item.Vol }}</span>
|
|
|
|
|
|
|
+ <span :class="handlePriceColor(item.PE, quote.presettle)">{{ handleNumberValue(item.PE) }}</span>
|
|
|
|
|
+ <span>{{ handleNumberValue(item.Vol) }}</span>
|
|
|
</li>
|
|
</li>
|
|
|
</ul>
|
|
</ul>
|
|
|
</div>
|
|
</div>
|
|
@@ -18,7 +18,7 @@
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import { ref, watch } from 'vue'
|
|
import { ref, watch } from 'vue'
|
|
|
-import { formatDate, handlePriceColor } from '@/filters'
|
|
|
|
|
|
|
+import { formatDate, handleNumberValue, handlePriceColor } from '@/filters'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { queryHistoryTikDatas, queryMarketRun } from '@/services/api/market'
|
|
import { queryHistoryTikDatas, queryMarketRun } from '@/services/api/market'
|
|
|
import { useFuturesStore } from '@/stores'
|
|
import { useFuturesStore } from '@/stores'
|
|
@@ -60,8 +60,8 @@ useRequest(queryMarketRun, {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-watch(() => quote.value?.last, () => {
|
|
|
|
|
- if (quote.value) {
|
|
|
|
|
|
|
+watch(() => quote.value, (q) => {
|
|
|
|
|
+ if (q?.last) {
|
|
|
const list = dataList.value
|
|
const list = dataList.value
|
|
|
if (list.length > 9) {
|
|
if (list.length > 9) {
|
|
|
// 移除列表最后一条记录
|
|
// 移除列表最后一条记录
|
|
@@ -75,12 +75,12 @@ watch(() => quote.value?.last, () => {
|
|
|
Bid: 0,
|
|
Bid: 0,
|
|
|
HI: 0,
|
|
HI: 0,
|
|
|
HV: 0,
|
|
HV: 0,
|
|
|
- PE: quote.value.last,
|
|
|
|
|
|
|
+ PE: q.last,
|
|
|
TDR: 0,
|
|
TDR: 0,
|
|
|
TK: 0,
|
|
TK: 0,
|
|
|
- TS: quote.value.lasttime,
|
|
|
|
|
|
|
+ TS: q.lasttime,
|
|
|
TT: 0,
|
|
TT: 0,
|
|
|
- Vol: quote.value.lastvolume,
|
|
|
|
|
|
|
+ Vol: q.lastvolume,
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|