index.vue 1.23 KB
<template>
  <div>
    <div class="btn">
      <div>
        <x-button class="default-btn continue" @click.native="leftClick">{{leftText}}</x-button>
        <x-button class="default-btn" @click.native="rightClick">{{rightText}}</x-button>
      </div>
    </div>
  </div>
</template>
<script>
import { XButton } from 'vux'
export default {
  props: ['leftText', 'rightText'],
  components: {XButton},
  methods: {
    leftClick () {
      this.$emit('leftClick')
    },
    rightClick () {
      this.$emit('rightClick')
    }
  }
}
</script>
<style lang="less" scoped>
  .btn {
    width: 100%;
    background: #fff;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 100;
    &>div {
      display: flex;
      display: -webkit-flex;
      // align-content: center;
      justify-content: space-between;
      padding: 6px 10px;
      .default-btn {
        width: 49%;
        height: 38px;
        background: #89a9cf!important;
        margin: 0;
        color: #fff!important;
        font-size: 16px;
        &.continue {
          background-color: #fff!important;
          color: #89a9cf!important;
          &:after {
            width: 199%;
            border: 1px solid #89a9cf!important;
          }
        }
      }
    }
  }
</style>