<template>
  <div class="my-table">
    <div class="my-table-bg">&nbsp;</div>
    <div class="my-table-box clear">
      <div class="my-table-li">
        <div class="my-table-li-top">数量(X):</div>
        <div class="my-table-li-bottom">单价(元):</div>
      </div>
      <div class="my-table-li" v-for="(si, i) in price_list" :key="si.min + i">
        <div class="my-table-li-top">
          {{ si.min + "≤X" + (si.max === 0 ? "" : "＜" + si.max) }}
        </div>
        <div class="my-table-li-bottom">
          {{ si.price }}
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "showGoodPrice",
  props: ["price_list"],
  data() {
    return {};
  },
  watch: {
    // newTime: function (val) {
    //   if (val) {
    //     this.initForm();
    //   }
    // },
  },
};
</script>

<style scoped>
.my-table {
  position: relative;
  width: 100%;
  background: rgb(236, 245, 255);

  .my-table-bg {
    width: 100%;
    background: rgb(217, 236, 255);
    height: 32px;
    line-height: 32px;
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
  }
  .my-table-box {
    position: relative;
    width: 100%;
    z-index: 2;
    top: 0;
    left: 0;
    overflow-x: auto;
    display: flex;
    justify-content: flex-start;
    flex-direction: row;
    .my-table-li {
      min-width: 100px;
      /* width: 130px; */
      .my-table-li-top,
      .my-table-li-bottom {
        width: 100%;
        height: 32px;
        padding: 0 5px;
        line-height: 32px;
        text-align: center;
        font-size: 13px;
        overflow: hidden;
      }
      &:first-child {
        width: 80px;
        min-width: 80px;
        .my-table-li-top,
        .my-table-li-bottom {
          padding: 0;
        }
      }
    }
  }
}
</style>
