<template>
  <div v-loading="NDloading">

    <div class="indicators">
      <span class="indicators05">MA5:{{ indicators05 || 0 }}</span>
      <span class="indicators10">MA10:{{ indicators10 || 0 }}</span>
      <span class="indicators20">MA20:{{ indicators20 || 0 }}</span>
    </div>
    <!-- margin-left: -80px -->
   
    <div
      id="chartsBox"
      v-loading="NDloading"
      style="width: 100%; min-height: 700px"
    ></div>
    <!-- ============================== -->
    <ul class="contentBox">
      <li>
        <div>
          <span>{{$t(`home.open`)}}</span>
          <span>{{ NDAQObj.openPrice || 0 }} </span> 
        </div>
        <div>
          <!-- 最高 -->
          <span>{{$t(`home.highestPrice`)}}</span>
          <span>{{ NDAQObj.highestPrice || 0 }}</span>
        </div>
        
        <div>
          <!-- 振幅 -->
          <span>{{$t(`home.amplitude`)}}</span>
          <span>--</span>
        </div>
        
        <div>
          <!-- 成交量 -->
          <span>{{$t(`home.ndaqAmount`)}}</span>
          <span>{{NDAQObj.amount || 0 }}</span>
        </div>
        <div>
          <!-- 涨跌额 -->
          <span>{{$t(`home.rise`)}}</span>
          <span>{{ NDAQObj.increase || 0 }}</span>
        </div>
      </li>
      <!-- <li> -->
        <!-- <div>
          <span>昨收</span>
          <span>{{ yesterday.closePrice || 0 }}</span>
        </div> -->
        <!-- <div>
          <span>最低</span>
          <span>{{ NDAQObj.lowestPrice || 0 }}</span>
        </div> -->
        <!-- <div>
          <span>成交额</span>
          <span>--</span>
        </div> -->
      <!-- </li> -->
      
      <li>
        <div>
          <!-- 昨收 -->
          <span>{{$t(`home.closePrice`)}}</span>
          <span>{{ yesterday.closePrice || 0 }}</span>
        </div>
        <div>
          <!-- 最低 -->
          <span>{{$t(`home.lowestPrice`)}}</span>
          <span>{{ NDAQObj.lowestPrice || 0 }}</span>
        </div>
         <div>
          <!-- 成交额 -->
          <span>{{$t(`home.clinch`)}}</span>
          <span>--</span>
        </div>
      
       
        <div>
          <!-- 涨跌幅 -->
          <span>{{$t(`home.picture`)}}</span>
          <span>{{
            `${NDAQObj.netChangeRatio} %` || 0
          }}</span>
        </div>
        <div>        
          <span></span>
          <span></span>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
import IndexJs from "../NDAQ/index";
export default {
  mixins: [IndexJs],
  data(){
    return {
      //定义一个对象，然后赋值，在取值就行在Js定义可以不
    }
  }
};
</script>

<style lang="scss" scoped>
.indicators {
  //  outline: 1px solid red;
  height: 30px;
  line-height: 30px;
  .indicators05 {
    color: #aa069f;
  }
  .indicators10 {
    color: #ff7e52;
  }
  .indicators20 {
    color: #416df9;
  }
}
.indicators span {
  // outline: 1px solid red;
  padding: 5px 10px;
  font-size: 12px;
  margin-left: 10px;
}

//底部文字内容
.contentBox {
  width: 100%;
  // outline: 1px solid red;
  // height: 300px;
  // padding: 0 50px;
  display: flex;
  flex-wrap: wrap;
  margin: 0 auto;
  justify-content: space-around;


  li {
    // outline: 1px solid red;
    width: 100%;
    height: 40px;
    // background: #faa90e;
    display: flex;
    // padding-left: 50px;
   
    div {
      // background: #ff7e52;
      // outline: 1px solid red;
      display: flex;
      // width: 220px;
      width: 20%;
      line-height: 40px;
      justify-content: space-between;
      // margin-left: 20px;
      margin-left: 20px;
      span {
        font-size: 14px;
        font-weight: normal;
        color: rgba(0, 0, 0, 0.6);
      }
      span:nth-of-type(1){
        // outline: 1px solid red;
        // width: 150px;
        text-align: right;
        
      }
      span:nth-of-type(2){
        // outline: 1px solid red;
        width: 100px;
        padding-left: 5px;
        text-align: left;
      }
    }
  }
}
</style>