<!-- * @Description: * @Author: 王晓颖 * @Date: --> <template> <div v-show="show" :class="{'ivr-btn':true}" @click="click"> <el-button :type="type" :disabled="disabled"> <svg-icon :icon-class="icon" class="ivr-icon"/> <slot/> </el-button> </div> </template> <script> export default { name: 'CtiBtn', props: { show: { type: Boolean, default: true }, disabled: { type: Boolean, default: false }, icon: { type: String, default: '' }, type: { type: String, default: 'primary' } }, methods: { click() { this.$emit('click') } } } </script> <style rel="stylesheet/scss" lang="scss" scoped> .ivr-btn{ width:50px; display: 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: auto; margin-bottom: 3px; } </style>