Skip to content

Commit

Permalink
修复一些遗漏样式
Browse files Browse the repository at this point in the history
  • Loading branch information
hzzhangdaying committed Jul 16, 2018
1 parent 9142eb2 commit c4354c0
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 24 deletions.
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@

`Element UI`的自定义样式

对于ElementUI原有组件中需要修改的样式,在`theme/kaola.css`中覆盖原有样式即可

当前对应依赖版本:`[email protected]``[email protected]`
当前对应依赖版本:`[email protected]``[email protected]`

需要安装sass-loader依赖

因为饿了么组件升级,select的计算属性不兼容,所以select需要修改组件,使用时直接全局注册即可

import ElSelect from 'element-kaola/Select/index';
//全局注册组件
Vue.component('el-select', ElSelect);
按照nek-ui覆盖原element-ui的样式,使用的话直接按如下引入即可
import 'element-kaola/index.scss'
8 changes: 4 additions & 4 deletions common/element-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ $--border-color-lighter: #ebeef5 !default;
$--border-color-extra-light: #f2f6fc !default;
$--border-color-hover: $--color-text-placeholder !default;
$--border-base: $--border-width-base $--border-style-base $--border-color-base !default;
$--border-radius-base: 4px !default;
$--border-radius-base: 2px !default;
$--border-radius-small: 2px !default;
$--border-radius-circle: 100% !default;

Expand Down Expand Up @@ -490,7 +490,7 @@ $--table-fixed-box-shadow: 0 0 10px rgba(0, 0, 0, .12) !default;
$--pagination-font-size: 13px !default;
$--pagination-fill: $--color-white !default;
$--pagination-color: $--color-text-primary !default;
$--pagination-border-radius: 3px !default;
$--pagination-border-radius: 2px !default;
$--pagination-button-color: $--color-text-primary !default;
$--pagination-button-width: 35.5px !default;
$--pagination-button-height: 28px !default;
Expand Down Expand Up @@ -526,7 +526,7 @@ $--tag-fill: rgba($--color-primary, 0.10) !default;
$--tag-color: $--color-primary !default;
$--tag-border: rgba($--color-primary, 0.20) !default;
$--tag-font-size: 12px !default;
$--tag-border-radius: 4px !default;
$--tag-border-radius: 2px !default;

$--tag-info-fill: rgba($--color-info, 0.10) !default;
$--tag-info-border: rgba($--color-info, 0.20) !default;
Expand Down Expand Up @@ -571,7 +571,7 @@ $--badge-size: 18px !default;
/* Card
--------------------------*/
$--card-border-color: $--border-color-lighter !default;
$--card-border-radius: 4px !default;
$--card-border-radius: 2px !default;
$--card-padding: 20px !default;

/* Slider
Expand Down
16 changes: 9 additions & 7 deletions components/KLButton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
font-size: 12px;
padding: 9px 16px;
border-radius: 2px;
min-width: 80px;

&:hover,
&:focus {
color: #1acac6;
Expand Down Expand Up @@ -46,6 +48,9 @@
@include when(round) {
line-height: 12px;
}
@include when(circle) {
min-width: 0px;
}
/*危险累按钮样式覆盖*/
@include m(danger) {
&.is-plain {
Expand Down Expand Up @@ -86,21 +91,18 @@
@include m(text) {
&:hover,
&:focus {
background: #FFF;
border-color: #FFF;
}
&:active {

background: transparent;
border-color: transparent;
color: #21D1C8;
}

&.is-disabled,
&.is-disabled:hover,
&.is-disabled:focus {
border-color: transparent;
color: #c0c4cc;
cursor: not-allowed;
background-image: none;
background-color: #fff;
background-color: transparent;
}
}
}
16 changes: 16 additions & 0 deletions components/KLForm.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@include b(form) {
@include m(label-top) {
.el-form-item__label {
padding-bottom: 8px;
line-height: 17px;
}
}
}
@include b(form-item) {
margin-bottom: 16px;
@include e(label) {
line-height: 1;
padding: 14px 12px 14px 0;
font-size: 12px;
}
}
1 change: 1 addition & 0 deletions components/KLSelect.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
}

@include b(select) {
width: 100%;
.el-tag--info {
color: #909399;
}
Expand Down
3 changes: 2 additions & 1 deletion components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@
@import 'KLSteps.scss';
@import 'KLTabs.scss';
@import 'KLTooltip.scss';
@import 'KLMenu.scss';
@import 'KLMenu.scss';
@import "KLForm.scss";
4 changes: 2 additions & 2 deletions index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@charset "UTF-8";
@import "./reset.css";
@import "./util.css";
@import "@/style/common/element-variables.scss";
@import "@/style/components/index.scss";
@import "./common/element-variables.scss";
@import "./components/index.scss";
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "element-kaola",
"version": "3.0.1",
"version": "3.0.2",
"description": "Custom styles for ElementUI",
"scripts": {
"release": "npm config set registry https://registry.npmjs.org && ./publish.sh"
Expand Down

0 comments on commit c4354c0

Please sign in to comment.