| | |
| | | </div> |
| | | <div class="text-right items-end justify-end"> |
| | | <div class="">{{ $t('数量') }}</div> |
| | | <div class="mt-5">({{ symbol_data.toUpperCase() || '--' }})</div> |
| | | <div class="mt-5">({{ symbol_name.toUpperCase() || '--' }})</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div v-if="showType == 0 || showType == 2" class="flex justify-between pt-6 font-26" v-for="(item, index) in redData" |
| | | :key="item + index" @click="onPrice(item.price)" :style="{ |
| | | <div v-if="showType == 0 || showType == 2" class="flex justify-between pt-6 font-26" |
| | | v-for="(item, index) in redData" :key="item + index" @click="onPrice(item.price)" :style="{ |
| | | 'background': `linear-gradient(to right,${THEME == 'dark' ? '#131A2E' : '#fff'} 0%` + |
| | | (item.amount / greenData[greenData.length - 1].amount) * 100 + '%,rgba(246,70,93,.1) ' + |
| | | (item.amount / greenData[greenData.length - 1].amount) * 100 + '%,rgba(246,70,93,.1) 100%)' |
| | |
| | | |
| | | <script> |
| | | import { WS_URL } from '@/config' |
| | | import { fixDate } from "@/utils/utis"; |
| | | import { fixDate, strToArr } from "@/utils/utis"; |
| | | import { THEME } from '@/config/theme' |
| | | import { _getHomeList } from '@/service/home.api' |
| | | import { mapGetters } from 'vuex' |
| | |
| | | greenData: init, |
| | | redData: init, |
| | | socket: null, |
| | | symbol_data: '' |
| | | symbol_data: '', |
| | | symbol_name: '', |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | getHomeList() { |
| | | _getHomeList(this.symbol).then((res) => { |
| | | this.symbol_data = res[0].symbol_data |
| | | this.symbol_name = strToArr(res[0].name, '/')[0] |
| | | let numberText = res[0].close.toString() |
| | | let numberLength = (numberText.substring(numberText.indexOf('.') + 1, numberText.length)).length |
| | | |