|
|
@ -31,9 +31,18 @@ |
|
|
style="max-height:300px;overflow:auto;" |
|
|
style="max-height:300px;overflow:auto;" |
|
|
> |
|
|
> |
|
|
<template v-for="parent in contractList"> |
|
|
<template v-for="parent in contractList"> |
|
|
<div class="px-3 text-primary" :key="parent.coin_name"> |
|
|
<div style="display: flex;align-items: center;justify-content: space-between;margin-bottom: 10px;"> |
|
|
{{ parent.coin_name }} |
|
|
<div class="px-3 text-primary" :key="parent.coin_name"> |
|
|
</div> |
|
|
{{ parent.coin_name }} |
|
|
|
|
|
</div> |
|
|
|
|
|
<div> |
|
|
|
|
|
<!-- 搜索框区域 --> |
|
|
|
|
|
<div class="input-group search_box"> |
|
|
|
|
|
<i class="el-icon-search" style="color: #fff;"></i> |
|
|
|
|
|
<input type="text" class="form-control" v-model="searchs" :placeholder="$t('exchange.search')"> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
<table class="table" :key="parent.coin_name + 1"> |
|
|
<table class="table" :key="parent.coin_name + 1"> |
|
|
<thead> |
|
|
<thead> |
|
|
<tr class="text-secondary"> |
|
|
<tr class="text-secondary"> |
|
|
@ -51,6 +60,7 @@ |
|
|
:key="item.symbol" |
|
|
:key="item.symbol" |
|
|
:class="{ active: item.symbol == activeSymbol }" |
|
|
:class="{ active: item.symbol == activeSymbol }" |
|
|
@click="ispopover1(item.symbol)" |
|
|
@click="ispopover1(item.symbol)" |
|
|
|
|
|
v-show="searchsShow(item)" |
|
|
> |
|
|
> |
|
|
<td class="w-10/24"> |
|
|
<td class="w-10/24"> |
|
|
{{ item.symbol }}/{{ parent.coin_name }} |
|
|
{{ item.symbol }}/{{ parent.coin_name }} |
|
|
@ -232,6 +242,7 @@ export default { |
|
|
contractOpen: false, |
|
|
contractOpen: false, |
|
|
contractAgreement: {}, |
|
|
contractAgreement: {}, |
|
|
symbolDetail:{}, |
|
|
symbolDetail:{}, |
|
|
|
|
|
searchs:'' |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
@ -273,8 +284,8 @@ export default { |
|
|
// console.info(this.$refs) |
|
|
// console.info(this.$refs) |
|
|
bus.$on('collapse', msg => { |
|
|
bus.$on('collapse', msg => { |
|
|
// 将数字转换为字符串 |
|
|
// 将数字转换为字符串 |
|
|
const closeStr = msg.close.toString(); |
|
|
|
|
|
// this.activeContract.price =this.activeContract.symbol=='BTC'? (msg.close).toFixed(1):(msg.close).toFixed(3); |
|
|
// this.activeContract.price =this.activeContract.symbol=='BTC'? (msg.close).toFixed(1):(msg.close).toFixed(3); |
|
|
|
|
|
const closeStr = msg.close.toFixed(1) |
|
|
this.activeContract.price = this.activeContract.symbol === 'BTC' ? closeStr.slice(0, closeStr.indexOf('.') + 2) : closeStr.slice(0, closeStr.indexOf('.') + 4); |
|
|
this.activeContract.price = this.activeContract.symbol === 'BTC' ? closeStr.slice(0, closeStr.indexOf('.') + 2) : closeStr.slice(0, closeStr.indexOf('.') + 4); |
|
|
this.holdPositionList.map(item=>{ |
|
|
this.holdPositionList.map(item=>{ |
|
|
if(item.symbol==this.activeContract.symbol) item.realtimePrice=this.activeContract.price |
|
|
if(item.symbol==this.activeContract.symbol) item.realtimePrice=this.activeContract.price |
|
|
@ -386,7 +397,16 @@ export default { |
|
|
//获取某一个持仓订单的数据 |
|
|
//获取某一个持仓订单的数据 |
|
|
setactiveItem(index=0){ |
|
|
setactiveItem(index=0){ |
|
|
this.accountInfo=this.holdPositionList[index] |
|
|
this.accountInfo=this.holdPositionList[index] |
|
|
} |
|
|
}, |
|
|
|
|
|
searchsShow(item){ |
|
|
|
|
|
const reg = new RegExp(this.searchs, "gi"); |
|
|
|
|
|
if (!this.searchs){ |
|
|
|
|
|
return true; |
|
|
|
|
|
}else { |
|
|
|
|
|
let name = item.pair_name || item.coin_name; |
|
|
|
|
|
return reg.test(name); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
@ -401,4 +421,29 @@ export default { |
|
|
.increase{ |
|
|
.increase{ |
|
|
color: #6EB189; |
|
|
color: #6EB189; |
|
|
} |
|
|
} |
|
|
|
|
|
.search_box{ |
|
|
|
|
|
width: 90%; |
|
|
|
|
|
height: 30px; |
|
|
|
|
|
// margin: 10px auto; |
|
|
|
|
|
border: 1px solid #fff; |
|
|
|
|
|
border-radius: 5px; |
|
|
|
|
|
color: #2e2e2e; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
margin-right: 15px; |
|
|
|
|
|
i{ |
|
|
|
|
|
width: 40px; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
font-size: 16px; |
|
|
|
|
|
} |
|
|
|
|
|
input{ |
|
|
|
|
|
background-color: transparent; |
|
|
|
|
|
border: none; |
|
|
|
|
|
border-left: 1px solid #fff; |
|
|
|
|
|
padding: 0px 10px; |
|
|
|
|
|
height: 27px; |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
color: #fff; |
|
|
|
|
|
line-height: 30px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
|