Newer
Older
CallCenterFront / src / layout / components / ivr / ivrBtn.vue
StephanieGitHub on 8 Apr 2020 1 KB MOD:坐席IVR构建
<template>
  <div v-show="show" :class="{'ivr-btn':true,'ivr-btn-active':!disabled,'ivr-btn-disabled':disabled}" @click="click">
    <svg-icon :icon-class="icon" class="ivr-icon"/>
    <slot/>
  </div>
</template>

<script>
export default {
  name: 'IvrBtn',
  props: {
    show: {
      type: Boolean,
      default: true
    },
    disabled: {
      type: Boolean,
      default: false
    },
    icon: {
      type: String,
      default: ''
    }
  },
  methods: {
    click() {
      this.$emit('click')
    }
  }
}
</script>

<style scoped>
  .ivr-btn{
    width:50px;
    display: inline-block;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    background-color:transparent;
    border-style:none;
    color: #ffffff;
    -webkit-appearance: none;
    text-align: center;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    outline: none;
    margin: 0;
    -webkit-transition: .1s;
    transition: .1s;
    font-weight: 500;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    padding: 3px 3px;
    font-size: 12px;
  }
  .ivr-btn-active:hover{
    color: #5dc8d7
  }
  .ivr-btn-disabled{
    color:#e1e1e1
  }
  .ivr-icon{
    width: 100%;
    text-align: center;
    display: block;
    font-size: 25px;
    margin-bottom: 2px;
  }

</style>