Commit e481b73e by luyt

feat:按钮(大中小)添加,样式调整

1 parent aeb7c81c
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<div class="operate"> <div class="operate">
<el-button size="small" type="primary" @click="handleOkFn">查询</el-button> <el-button size="small" type="primary" @click="handleOkFn">查询</el-button>
<el-button size="small" @click="handleRestFn">重置</el-button> <el-button size="small" @click="handleRestFn">重置</el-button>
<el-button type="text" size="small" @click="expandFn" v-if="hasExpand"> <el-button type="text" size="small" class="gl-padding0" @click="expandFn" v-if="hasExpand">
<span>{{ !expand ? '展开' : '收起' }}</span> <span>{{ !expand ? '展开' : '收起' }}</span>
<i class="expand" :class="classIcon"></i> <i class="expand" :class="classIcon"></i>
</el-button> </el-button>
......
...@@ -142,7 +142,7 @@ export default { ...@@ -142,7 +142,7 @@ export default {
preButtonsComp = preButtons.map(item => handleVNode(item)) preButtonsComp = preButtons.map(item => handleVNode(item))
selectComp = ( selectComp = (
<el-dropdown class="gl-dropdown"> <el-dropdown class="gl-dropdown" trigger="click">
<span class="el-dropdown-link">更多</span> <span class="el-dropdown-link">更多</span>
<el-dropdown-menu slot="dropdown">{postButtons.map(item => handleVNode(item, true))}</el-dropdown-menu> <el-dropdown-menu slot="dropdown">{postButtons.map(item => handleVNode(item, true))}</el-dropdown-menu>
</el-dropdown> </el-dropdown>
...@@ -172,5 +172,8 @@ export default { ...@@ -172,5 +172,8 @@ export default {
margin-left: 10px; margin-left: 10px;
color: $color-primary; color: $color-primary;
} }
.el-button + .el-button{
margin-left: 10px;
}
} }
</style> </style>
/**
重置样式,公共样式
*/
.gl-padding0{
padding: 0 !important;
}
.gl-margin0{
margin: 0 !important;
}
\ No newline at end of file \ No newline at end of file
@import "utils.scss"; @import "utils.scss";
@import "global.scss"; @import "global.scss";
@import "reset.scss";
// $defaultColor: #5850ff; // $defaultColor: #5850ff;
// $lightColor: #7973ff; // $lightColor: #7973ff;
...@@ -8,6 +9,7 @@ ...@@ -8,6 +9,7 @@
$defaultColor: $color-primary; $defaultColor: $color-primary;
$lightColor: $color-primary-light07; $lightColor: $color-primary-light07;
$dackColor: $color-primary-dark30; $dackColor: $color-primary-dark30;
$lightColorDisabled: $color-primary-light04;
//滚动条的公共样式 //滚动条的公共样式
.scrollbar-common { .scrollbar-common {
...@@ -47,9 +49,10 @@ $dackColor: $color-primary-dark30; ...@@ -47,9 +49,10 @@ $dackColor: $color-primary-dark30;
/* 按钮 */ /* 按钮 */
.el-button { .el-button {
padding: 12px 20px; padding: 12px 23px;
font-size: 14px; font-size: 14px;
border-radius: 4px; border-radius: 4px;
min-width: 76px;
} }
.el-button:hover, .el-button:hover,
.el-button:focus { .el-button:focus {
...@@ -64,7 +67,7 @@ $dackColor: $color-primary-dark30; ...@@ -64,7 +67,7 @@ $dackColor: $color-primary-dark30;
} }
.el-button.is-round { .el-button.is-round {
padding: 12px 20px; padding: 12px 23px;
} }
.el-button--primary { .el-button--primary {
color: #fff; color: #fff;
...@@ -82,18 +85,77 @@ $dackColor: $color-primary-dark30; ...@@ -82,18 +85,77 @@ $dackColor: $color-primary-dark30;
border-color: $lightColor; border-color: $lightColor;
color: #fff; color: #fff;
} }
.el-button--text {
color: $defaultColor;
padding: 0px;
min-width: 0 !important;
}
.el-button--text:focus, .el-button--text:focus,
.el-button--text:hover { .el-button--text:hover {
color: $lightColor; color: $lightColor;
border-color: transparent; border-color: transparent;
background-color: transparent; background-color: transparent;
} }
.el-button--text:active {
color: $dackColor;
}
.el-button.is-disabled.el-button--text, .el-button.is-disabled.el-button--text:focus, .el-button.is-disabled.el-button--text:hover{
// border-color: $lightColorDisabled;
color: $lightColorDisabled;
}
// 文字链接
.el-button--text.btn-link:hover,.el-button--text.btn-link:active{
text-decoration:underline;
}
.el-button.is-disabled.el-button--text.btn-link, .el-button.is-disabled.el-button--text.btn-link:focus, .el-button.is-disabled.el-button--text.btn-link:hover{
text-decoration:underline;
}
.el-button.is-plain:focus, .el-button.is-plain:focus,
.el-button.is-plain:hover { .el-button.is-plain:hover {
background: #fff; background: #fff;
border-color: $lightColor; border-color: $lightColor;
color: $lightColor; color: $lightColor;
} }
.el-button.is-plain{
border-color: $defaultColor;
color: $defaultColor;
}
.el-button.is-plain:active {
border-color: $dackColor;
color: $dackColor;
}
.el-button.is-disabled.is-plain, .el-button.is-disabled.is-plain:focus, .el-button.is-disabled.is-plain:hover{
border-color: $lightColorDisabled;
color: $lightColorDisabled;
}
// 三级按钮样式 以is-plain为基础
.el-button.is-plain.btn-three{
border-color: #666;
color: #666;
&:focus,&:hover {
opacity: 0.7;
}
&:active{
opacity: 1;
border-color: #484848;
color: #484848;
}
&.is-disabled{
opacity: 0.4;
border-color: #666;
color: #666;
&:focus,&:hover{
opacity: 0.4;
border-color: #666;
color: #666;
}
}
}
.el-button--primary.is-active, .el-button--primary.is-active,
.el-button--primary:active { .el-button--primary:active {
background: $dackColor; background: $dackColor;
...@@ -103,25 +165,52 @@ $dackColor: $color-primary-dark30; ...@@ -103,25 +165,52 @@ $dackColor: $color-primary-dark30;
.el-button--primary.is-plain{ .el-button--primary.is-plain{
background: #fff; background: #fff;
} }
.el-select .el-input__inner:focus { .el-select .el-input__inner:focus {
border-color: $dackColor; border-color: $dackColor;
} }
.el-button--small { .el-button--small {
padding: 8px 16px; padding: 8px 15px;
font-size: 14px; font-size: 14px;
border-radius: 4px; border-radius: 4px;
min-width: 60px;
} }
.el-button--small.is-round { .el-button--small.is-round {
padding: 8px 16px; padding: 8px 15px;
} }
.el-button--mini { .el-button--mini {
padding: 5px 10px; padding: 4px 7px;
font-size: 14px; font-size: 14px;
border-radius: 4px; border-radius: 4px;
min-width: 44px;
} }
.el-button--mini.is-round { .el-button--mini.is-round {
padding: 5px 10px; padding: 4px 7px;
} }
.el-button--primary.is-disabled,
.el-button--primary.is-disabled:active,
.el-button--primary.is-disabled:focus,
.el-button--primary.is-disabled:hover {
// background-color: #e9e9e9;
// border-color: #e9e9e9;
// color: #a3a3a3;
background-color: $lightColorDisabled;
border-color: $lightColorDisabled;
color: #fff;
}
// 按钮间距
.el-button+.el-button{
margin-left: 20px;
}
.el-button--mini+.el-button--mini{
margin-left: 12px;
}
.gap8+.gap8{
margin-left: 8px;
}
.el-dialog__title { .el-dialog__title {
font-size: 20px; font-size: 20px;
font-weight: 500; font-weight: 500;
...@@ -173,10 +262,7 @@ $dackColor: $color-primary-dark30; ...@@ -173,10 +262,7 @@ $dackColor: $color-primary-dark30;
.el-select .el-input.is-focus .el-input__inner { .el-select .el-input.is-focus .el-input__inner {
border-color: $defaultColor; border-color: $defaultColor;
} }
.el-button--text {
color: $defaultColor;
padding: 0px;
}
.el-select-dropdown__item.selected { .el-select-dropdown__item.selected {
color: $defaultColor; color: $defaultColor;
font-weight: bold; font-weight: bold;
...@@ -418,14 +504,7 @@ $dackColor: $color-primary-dark30; ...@@ -418,14 +504,7 @@ $dackColor: $color-primary-dark30;
.el-message-box__headerbtn:hover .el-message-box__close { .el-message-box__headerbtn:hover .el-message-box__close {
color: $defaultColor; color: $defaultColor;
} }
.el-button--primary.is-disabled,
.el-button--primary.is-disabled:active,
.el-button--primary.is-disabled:focus,
.el-button--primary.is-disabled:hover {
background-color: #e9e9e9;
border-color: #e9e9e9;
color: #a3a3a3;
}
/*弹框*/ /*弹框*/
.el-dialog__header { .el-dialog__header {
border-bottom: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!