Browse Source

修改币币交易中的左侧币列表

master
liaoxinyu 2 years ago
parent
commit
1869352e26
  1. 12
      src/views/exchange/symbols.vue

12
src/views/exchange/symbols.vue

@ -56,7 +56,7 @@
<td class="w-33 text-right"> <td class="w-33 text-right">
{{ coin.coin_name == 'fav' ? item.close : item.price}} {{ coin.coin_name == 'fav' ? item.close : item.price}}
</td> </td>
<td class="w-33 text-right" :class="item.increaseStr.startsWith('-') ? 'red' : 'green'"> <td class="w-33 text-right" :class="getItemClass(item)">
{{ item.increaseStr }} {{ item.increaseStr }}
</td> </td>
</tr> </tr>
@ -228,7 +228,15 @@ export default {
this.favList.marketInfoList = res||[]; this.favList.marketInfoList = res||[];
}) })
.catch((err) => {}); .catch((err) => {});
} },
// -
getItemClass(item) {
if (item && item.increaseStr && item.increaseStr.indexOf('-') === 0) {
return 'red';
} else {
return 'green';
}
}
}, },
created() { created() {

Loading…
Cancel
Save