196 lines
3.3 KiB
SCSS
Executable File
196 lines
3.3 KiB
SCSS
Executable File
@import './variables.module.scss';
|
|
|
|
// Element Plus风格的颜色按钮样式
|
|
@mixin colorBtn($color) {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 8px 16px;
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
line-height: 1;
|
|
white-space: nowrap;
|
|
text-align: center;
|
|
background-image: none;
|
|
border: 1px solid $color;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
box-sizing: border-box;
|
|
color: #fff;
|
|
background-color: $color;
|
|
|
|
&:hover,
|
|
&:focus {
|
|
background-color: lighten($color, 10%);
|
|
border-color: lighten($color, 10%);
|
|
color: #fff;
|
|
}
|
|
|
|
&:active {
|
|
background-color: darken($color, 5%);
|
|
border-color: darken($color, 5%);
|
|
color: #fff;
|
|
}
|
|
|
|
&:disabled {
|
|
color: #c0c4cc;
|
|
background-color: #f5f7fa;
|
|
border-color: #e4e7ed;
|
|
cursor: not-allowed;
|
|
}
|
|
}
|
|
|
|
.blue-btn {
|
|
@include colorBtn($blue)
|
|
}
|
|
|
|
.light-blue-btn {
|
|
@include colorBtn($light-blue)
|
|
}
|
|
|
|
.red-btn {
|
|
@include colorBtn($red)
|
|
}
|
|
|
|
.pink-btn {
|
|
@include colorBtn($pink)
|
|
}
|
|
|
|
.green-btn {
|
|
@include colorBtn($green)
|
|
}
|
|
|
|
.tiffany-btn {
|
|
@include colorBtn($tiffany)
|
|
}
|
|
|
|
.yellow-btn {
|
|
@include colorBtn($yellow)
|
|
}
|
|
|
|
.pan-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 8px 16px;
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
line-height: 1;
|
|
white-space: nowrap;
|
|
text-align: center;
|
|
background-image: none;
|
|
border: 1px solid #dcdfe6;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
box-sizing: border-box;
|
|
color: #606266;
|
|
background-color: #fff;
|
|
|
|
&:hover,
|
|
&:focus {
|
|
color: #409eff;
|
|
border-color: #c6e2ff;
|
|
background-color: #ecf5ff;
|
|
}
|
|
|
|
&:active {
|
|
color: #3a8ee6;
|
|
border-color: #3a8ee6;
|
|
background-color: #ecf5ff;
|
|
}
|
|
|
|
&:disabled {
|
|
color: #c0c4cc;
|
|
background-color: #f5f7fa;
|
|
border-color: #e4e7ed;
|
|
cursor: not-allowed;
|
|
}
|
|
}
|
|
|
|
// Element Plus风格的链接按钮样式
|
|
.pan-btn-link {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 8px 16px;
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
line-height: 1;
|
|
white-space: nowrap;
|
|
text-align: center;
|
|
background-image: none;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
box-sizing: border-box;
|
|
background-color: transparent;
|
|
text-decoration: none;
|
|
outline: none;
|
|
|
|
&:hover,
|
|
&:focus {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
&:active {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
&:disabled {
|
|
color: #c0c4cc;
|
|
cursor: not-allowed;
|
|
text-decoration: none;
|
|
}
|
|
}
|
|
|
|
// 不同颜色的链接按钮
|
|
.blue-btn-link {
|
|
@extend .pan-btn-link;
|
|
color: #409eff;
|
|
|
|
&:hover,
|
|
&:focus {
|
|
color: #66b1ff;
|
|
}
|
|
}
|
|
|
|
.red-btn-link {
|
|
@extend .pan-btn-link;
|
|
color: #f56c6c;
|
|
|
|
&:hover,
|
|
&:focus {
|
|
color: #f78989;
|
|
}
|
|
}
|
|
|
|
.info-btn-link {
|
|
@extend .pan-btn-link;
|
|
color: #909399;
|
|
|
|
&:hover,
|
|
&:focus {
|
|
color: #a6a9ad;
|
|
}
|
|
}
|
|
|
|
.custom-button {
|
|
display: inline-block;
|
|
line-height: 1;
|
|
white-space: nowrap;
|
|
cursor: pointer;
|
|
background: #fff;
|
|
color: #fff;
|
|
-webkit-appearance: none;
|
|
text-align: center;
|
|
box-sizing: border-box;
|
|
outline: 0;
|
|
margin: 0;
|
|
padding: 10px 15px;
|
|
font-size: 14px;
|
|
border-radius: 4px;
|
|
}
|