60 lines
926 B
Vue
60 lines
926 B
Vue
|
|
|
|
<template>
|
|
<div class="cusbutton" @click="$emit('click')" :class="{ flex, selected }">
|
|
<slot></slot>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
name: "CusButton4",
|
|
props: {
|
|
flex: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
selected: {
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style scoped lang="less">
|
|
.cusbutton {
|
|
display: inline-block;
|
|
border-radius: 2.56px;
|
|
border: 2px solid rgba(24, 131, 201, 1);
|
|
padding: 0 20px;
|
|
/** 文本1 */
|
|
font-size: 12px;
|
|
font-weight: 400;
|
|
letter-spacing: 0px;
|
|
color: #fff;
|
|
text-align: center;
|
|
vertical-align: top;
|
|
cursor: pointer;
|
|
height: 20px;
|
|
line-height: 20px;
|
|
|
|
|
|
&.flex {
|
|
flex: 1;
|
|
}
|
|
|
|
&.selected {
|
|
background: rgba(24, 131, 201, 1);
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
&:hover {
|
|
background: rgba(24, 131, 201, 1);
|
|
color: #fff;
|
|
}
|
|
|
|
|
|
|
|
}
|
|
</style>
|