day-choose.vue 1.47 KB
<!--求购时限选择-->

<template>

  <div class="customSelectWrapper">
    <div class="customSelectTextWrapper">
      <span class="leftText">求购期限:</span>
      <div class="rightWrapper">
        <span class="rightText">{{value}}</span>
        <i class="cubeic-arrow" ></i>
      </div>
    </div>
    <Select
      v-model="value"
      :title="title"
      :options="options"
      @change="change"
      class="customSelect"
    />
  </div>

</template>

<script>

import {Select} from 'cube-ui';

export default {
  name: 'DayChoose',
  components: {Select},

  data() {
    return {
      options: ['1天', '3天', '7天', '15天', '30天'],
      value: '7天',
      title: '选择求购时限',

    };
  },
  methods: {
    change(value, index, text) {
      console.log('change', value, index, text);
    }
  }

};
</script>

<style lang="scss" scoped>

  .customSelectWrapper {

    position: relative;

    height: 60px;
    padding-top: 10px;
  }

  .customSelectTextWrapper {

    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;

  }

  .leftText {
    font-family: PingFang-SC-Regular;
    font-size: 14px;
    color: #000000;
    letter-spacing: 0;
  }

  .rightWrapper {

  }

  .rightText {
    font-family: PingFang-SC-Regular;
    font-size: 14px;
    color: #000000;
    letter-spacing: 0;
  }

  .customSelect {
    position: relative;
    opacity: 0 !important;
  }

</style>