|
|
|
@ -95,7 +95,7 @@ |
|
|
|
:key="item.symbol" |
|
|
|
:class="{ active: item.symbol == activeSymbol }" |
|
|
|
@click="ispopover1(item.symbol)" |
|
|
|
v-show="isShow(item)" |
|
|
|
v-if="isShow(item)" |
|
|
|
style="display:block" |
|
|
|
> |
|
|
|
<td style="display:block;width:100%;border:none;"> |
|
|
|
@ -370,10 +370,11 @@ export default { |
|
|
|
if (sub == msg) { |
|
|
|
if( data.symbol=='BTC' )(data.price).toFixed(1) |
|
|
|
this.contractList = data; |
|
|
|
// if(this.filterCoin==''){ |
|
|
|
// this.contractListFilter = data; |
|
|
|
// // this.Listes(); |
|
|
|
// } |
|
|
|
if(this.filterCoin==''){ |
|
|
|
// console.log('123'); |
|
|
|
this.contractListFilter = data; |
|
|
|
// this.Listes(); |
|
|
|
} |
|
|
|
}else if (cmd == "ping") { |
|
|
|
this.ws.send({ |
|
|
|
cmd: "pong" |
|
|
|
@ -409,11 +410,12 @@ export default { |
|
|
|
if(this.activeSymbol==''){ |
|
|
|
// 页面初始获取 |
|
|
|
this.contractList = res; |
|
|
|
this.Listes(); |
|
|
|
// if(this.filterCoin==''){ |
|
|
|
// this.contractListFilter = res; |
|
|
|
// this.Listes(); |
|
|
|
// } |
|
|
|
if(this.filterCoin==''){ |
|
|
|
// console.log('1234'); |
|
|
|
this.contractListFilter = res; |
|
|
|
this.Listes(); |
|
|
|
} |
|
|
|
|
|
|
|
// 默认值 |
|
|
|
let firstParent = res[0]; |
|
|
|
@ -482,16 +484,19 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
isShow(symbol) { |
|
|
|
|
|
|
|
const reg = new RegExp(this.filterCoin, "gi"); |
|
|
|
if (!this.filterCoin) return true; |
|
|
|
else { |
|
|
|
// let name = symbol.coinName || symbol.pair; |
|
|
|
// return name.search(reg) >= 0; |
|
|
|
let name = symbol.pair_name || symbol.symbol; |
|
|
|
return reg.test(name); |
|
|
|
// return name.search(reg) >= 0; |
|
|
|
} |
|
|
|
return name.toLowerCase().includes(this.filterCoin.toLowerCase()); |
|
|
|
// const reg = new RegExp(this.filterCoin, "gi"); |
|
|
|
// if (!this.filterCoin) return true; |
|
|
|
// else { |
|
|
|
// // let name = symbol.coinName || symbol.pair; |
|
|
|
// // return name.search(reg) >= 0; |
|
|
|
// let name = symbol.pair_name || symbol.symbol; |
|
|
|
// console.log(reg.test(name),'12345'); |
|
|
|
// return reg.test(name); |
|
|
|
// // return name.search(reg) >= 0; |
|
|
|
// } |
|
|
|
// return !this.keyword || symbol.coinName.concat(symbol.pair).search(reg) >= 0; |
|
|
|
|
|
|
|
}, |
|
|
|
|