| | |
| | | </div> |
| | | </section> |
| | | <div class="mainBackground rounded-view" key="x"> |
| | | <PerpetualOpen class="pl-30 pr-30" :key="keyIndex + 'a'" :selectIndex="selectIndex" :symbol="symbol" |
| | | <!-- 永续合约 --> |
| | | <!-- <PerpetualOpen class="pl-30 pr-30" :key="keyIndex + 'a'" :selectIndex="selectIndex" :symbol="symbol" |
| | | :green-data="bids" :red-data="asks" :price="price" :init-open="initOpen" :init-close="initClose" |
| | | :init-futrue="initFutrue" :currentType="currentType" @changeValueBack="changeValueBack" |
| | | @changeCurrentType="changeCurrentType" @ordered="onOrdered"> |
| | | </PerpetualOpen> |
| | | </PerpetualOpen> --> |
| | | <div class="line"></div> |
| | | <!-- 委托/持仓--> |
| | | <PerpetualOrder class="pl-30 pr-30" :key="keyIndex + 'b'" :symbol="symbol" :order-cur="orderCur" |
| | |
| | | this.clearTimer() |
| | | // this.clearTimeout() |
| | | this.initParam(this.symbol, evt) // 重新初始化 |
| | | // TODO: 这里要做判断 |
| | | if (this.selectIndex / 1 === 1) { |
| | | this[this.curTab](this.symbol) // 重新调取记录 |
| | | console.log('this.curTab', this.curTab) |
| | | } else { // 交割合约 |
| | | this[this.curTab](this.symbol) |
| | | // this.show = true |
| | | console.log('curTab', evt, this.curTab) |
| | | |
| | | // 判断方法是否存在 |
| | | const fn = this[this.curTab]; |
| | | if (typeof fn === 'function') { |
| | | fn.call(this, this.symbol); |
| | | console.log('[onOrdered] 调用方法:', this.curTab, '参数:', this.symbol, '事件:', evt); |
| | | } else { |
| | | console.warn(`[onOrdered] curTab 方法不存在: ${this.curTab}`); |
| | | } |
| | | //console.log('下单后更新数据') |
| | | }, |