58 lines
982 B
Vue
58 lines
982 B
Vue
|
|
|
|
<template>
|
|
<div class="cusbutton" @click="$emit('click')" :class="{ flex, selected }">
|
|
<slot></slot>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
name: "CusButton2",
|
|
props: {
|
|
flex: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
selected: {
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style scoped lang="less">
|
|
.cusbutton {
|
|
display: inline-block;
|
|
background: rgba(19, 66, 97, 1);
|
|
border: 1px solid rgba(0, 0, 0, 1);
|
|
padding: 10px 13px;
|
|
|
|
/** 文本1 */
|
|
font-size: 16px;
|
|
font-weight: 400;
|
|
letter-spacing: 0px;
|
|
color: rgba(255, 255, 255, 1);
|
|
text-align: center;
|
|
vertical-align: top;
|
|
cursor: pointer;
|
|
&.flex {
|
|
flex: 1;
|
|
}
|
|
|
|
&.selected {
|
|
background: linear-gradient(180deg, rgba(24, 131, 201, 1) 0%, rgba(10, 64, 99, 1) 100%);
|
|
|
|
|
|
}
|
|
|
|
&:hover {
|
|
background: linear-gradient(180deg, rgba(24, 131, 201, 1) 0%, rgba(10, 64, 99, 1) 100%);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
</style>
|