<template>
  <section class="question-header-wrapper">
    <img @click="goBack" class="left" src="../../images/left-array-black.png" alt="">
    <span class="center">{{title}}</span>
    <div class="right" >
      <span v-show="total">
        <span class="order">{{order}}</span><span class="total">/{{total}}</span>
      </span>
    </div>
  </section>
</template>
<script>
export default {
  props: {
    title: {
      type: String,
      default: "第一篇 基础知识",
    },
    order: {
      type: Number | String,
      default: 0,
    },
    total: {
      type: Number | String,
      default: 0,
    }
  },
  methods: {
    //返回
    goBack() {
      this.$router.back(-1);
      // rocNative.goBack();
    },
  },
}
</script>
<style lang="less" scoped>
.question-header-wrapper {
  width: 100%;
  // box-sizing: content-box;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 28px 15px 0;
  // padding-top: 28px;
  // margin: 0 15px;
  background: #fff;
  .left {
    height: 25px;
    padding-right: 35px;
  }
  .center {
    height: 40px;
    line-height: 40px;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    color: #000000;
    padding: 0 10px;
  }
  .right {
    min-width: 60px;
    font-size: 14px;
    text-align: right;
    span {
      &.order {
        color: #373839;
        font-weight: 700;
      }
      &.total {
        color: #979899;
      }
    }
  }
}
</style>