ServeModal.vue 1.69 KB
<template>
  <van-action-sheet v-model="showBox" @click-overlay="onCancel" @close="onCancel" title="服务说明">
    <div class="content">
      <template v-for="(i, index) in list">
        <div :key="index" class="item">
          <div class="title">{{ i.title }}</div>
          <div class="value">{{ i.content }}</div>
        </div>
      </template>
    </div>
  </van-action-sheet>
</template>

<script type="text/ecmascript-6">
export default {
  name: 'ServeModal',
  props: {
    value: Boolean,
    list: {
      type: Array,
      default: () => []
    }
  },
  data () {
    return {
      showBox: false
    }
  },
  watch: {
    value (n) {
      this.showBox = n
    }
  },
  mounted () {
  },
  methods: {
    onCancel () {
      this.$emit('cancel')
    },
  }
}
</script>

<style scoped lang="scss">
.van-popup--bottom.van-popup--round {
  border-radius: 20px 20px 0 0;
}
/deep/.van-action-sheet__header {
  line-height: 56px;
  font-weight: 500;
  font-size: 17px;
  color: #2c2c2c;
}
.content {
  margin: 0 16px;
  border-top: 1px solid #e3e3e6;
  height: 374px;
  box-sizing: border-box;
  overflow-y: scroll;
  padding-bottom: 31px;
  &::-webkit-scrollbar {
    display: none;
  }
  .item {
    padding: 14px 0 0 10px;
    .title {
      line-height: 20px;
      font-size: 14px;
      color: #2c2c2c;
      position: relative;
      &::after {
        width: 4px;
        height: 4px;
        background: #fc5b32;
        position: absolute;
        top: 50%;
        left: -10px;
        content: '';
        transform: translateY(-50%);
        border-radius: 100%;
      }
    }
    .value {
      font-size: 12px;
      color: #999999;
      margin-top: 2px;
      line-height: 17px;
    }
  }
}
</style>