theme-chalk tuning

pull/7671/head
Leopoldthecoder 2017-10-23 20:01:49 +08:00 committed by 杨奕
parent 9e6f1adafc
commit 917b8e78f2
18 changed files with 33 additions and 24 deletions

View File

@ -393,6 +393,7 @@ The corresponding methods are: `MessageBox`, `MessageBox.alert`, `MessageBox.con
| closeOnHashChange | whether to close MessageBox when hash changes | boolean | — | true | | closeOnHashChange | whether to close MessageBox when hash changes | boolean | — | true |
| showInput | whether to show an input | boolean | — | false (true when called with prompt) | | showInput | whether to show an input | boolean | — | false (true when called with prompt) |
| inputPlaceholder | placeholder of input | string | — | — | | inputPlaceholder | placeholder of input | string | — | — |
| inputType | type of input | string | — | text |
| inputValue | initial value of input | string | — | — | | inputValue | initial value of input | string | — | — |
| inputPattern | regexp for the input | regexp | — | — | | inputPattern | regexp for the input | regexp | — | — |
| inputValidator | validation function for the input. Should returns a boolean or string. If a string is returned, it will be assigned to inputErrorMessage | function | — | — | | inputValidator | validation function for the input. Should returns a boolean or string. If a string is returned, it will be assigned to inputErrorMessage | function | — | — |

View File

@ -391,6 +391,7 @@ import { MessageBox } from 'element-ui';
| closeOnHashChange | 是否在 hashchange 时关闭 MessageBox | boolean | — | true | | closeOnHashChange | 是否在 hashchange 时关闭 MessageBox | boolean | — | true |
| showInput | 是否显示输入框 | boolean | — | false以 prompt 方式调用时为 true| | showInput | 是否显示输入框 | boolean | — | false以 prompt 方式调用时为 true|
| inputPlaceholder | 输入框的占位符 | string | — | — | | inputPlaceholder | 输入框的占位符 | string | — | — |
| inputType | 输入框的类型 | string | — | text |
| inputValue | 输入框的初始文本 | string | — | — | | inputValue | 输入框的初始文本 | string | — | — |
| inputPattern | 输入框的校验表达式 | regexp | — | — | | inputPattern | 输入框的校验表达式 | regexp | — | — |
| inputValidator | 输入框的校验函数。可以返回布尔值或字符串,若返回一个字符串, 则返回结果会被赋值给 inputErrorMessage | function | — | — | | inputValidator | 输入框的校验函数。可以返回布尔值或字符串,若返回一个字符串, 则返回结果会被赋值给 inputErrorMessage | function | — | — |

View File

@ -25,7 +25,7 @@
"dist:all": "node build/bin/build-all.js && npm run build:theme", "dist:all": "node build/bin/build-all.js && npm run build:theme",
"i18n": "node build/bin/i18n.js", "i18n": "node build/bin/i18n.js",
"lint": "eslint src/**/* test/**/* packages/**/*.{js,vue} build/**/* --quiet", "lint": "eslint src/**/* test/**/* packages/**/*.{js,vue} build/**/* --quiet",
"pub": "npm run bootstrap && sh build/git-release.sh && sh build/release.sh", "pub": "npm run bootstrap && sh build/git-release.sh && sh build/release.sh && node build/bin/gen-indices.js",
"pub:all": "npm run dist:all && lerna publish --skip-git && git commit -am 'publish independent packages' && git push eleme dev", "pub:all": "npm run dist:all && lerna publish --skip-git && git commit -am 'publish independent packages' && git push eleme dev",
"test": "npm run lint && npm run build:theme && cross-env CI_ENV=/dev/ karma start test/unit/karma.conf.js --single-run", "test": "npm run lint && npm run build:theme && cross-env CI_ENV=/dev/ karma start test/unit/karma.conf.js --single-run",
"test:watch": "npm run build:theme && karma start test/unit/karma.conf.js" "test:watch": "npm run build:theme && karma start test/unit/karma.conf.js"

View File

@ -204,7 +204,7 @@
} else if (defaultValue) { } else if (defaultValue) {
return [new Date(defaultValue), advanceDate(defaultValue, 24 * 60 * 60 * 1000)]; return [new Date(defaultValue), advanceDate(defaultValue, 24 * 60 * 60 * 1000)];
} else { } else {
return [new Date(), advanceDate(Date.now, 24 * 60 * 60 * 1000)]; return [new Date(), advanceDate(Date.now(), 24 * 60 * 60 * 1000)];
} }
}; };
@ -378,7 +378,9 @@
// should allow them to be set individually in the future // should allow them to be set individually in the future
if (this.minDate) { if (this.minDate) {
this.leftDate = this.minDate; this.leftDate = this.minDate;
this.rightDate = nextMonth(this.leftDate); this.rightDate = this.unlinkPanels && this.maxDate
? this.maxDate
: nextMonth(this.leftDate);
} else { } else {
this.leftDate = calcDefaultValue(this.defaultValue)[0]; this.leftDate = calcDefaultValue(this.defaultValue)[0];
this.rightDate = nextMonth(this.leftDate); this.rightDate = nextMonth(this.leftDate);
@ -388,8 +390,11 @@
defaultValue(val) { defaultValue(val) {
if (!Array.isArray(this.value)) { if (!Array.isArray(this.value)) {
this.leftDate = calcDefaultValue(val)[0]; const [left, right] = calcDefaultValue(val);
this.rightDate = nextMonth(this.leftDate); this.leftDate = left;
this.rightDate = val && val[1] && this.unlinkPanels
? right
: nextMonth(this.leftDate);
} }
} }
}, },

View File

@ -11,6 +11,7 @@ const defaults = {
closeOnHashChange: true, closeOnHashChange: true,
inputValue: null, inputValue: null,
inputPlaceholder: '', inputPlaceholder: '',
inputType: 'text',
inputPattern: null, inputPattern: null,
inputValidator: null, inputValidator: null,
inputErrorMessage: '', inputErrorMessage: '',

View File

@ -36,6 +36,7 @@
<div class="el-message-box__input" v-show="showInput"> <div class="el-message-box__input" v-show="showInput">
<el-input <el-input
v-model="inputValue" v-model="inputValue"
:type="inputType"
@compositionstart.native="handleComposition" @compositionstart.native="handleComposition"
@compositionupdate.native="handleComposition" @compositionupdate.native="handleComposition"
@compositionend.native="handleComposition" @compositionend.native="handleComposition"
@ -307,6 +308,7 @@
showInput: false, showInput: false,
inputValue: null, inputValue: null,
inputPlaceholder: '', inputPlaceholder: '',
inputType: 'text',
inputPattern: null, inputPattern: null,
inputValidator: null, inputValidator: null,
inputErrorMessage: '', inputErrorMessage: '',

View File

@ -20,7 +20,7 @@
@include e(wrap) { @include e(wrap) {
max-height: 280px; max-height: 280px;
padding: 6px 0; padding: 10px 0;
box-sizing: border-box; box-sizing: border-box;
overflow: auto; overflow: auto;
background-color: $--color-white; background-color: $--color-white;
@ -36,7 +36,7 @@
& li { & li {
padding: 0 20px; padding: 0 20px;
margin: 0; margin: 0;
line-height: 33px; line-height: 34px;
cursor: pointer; cursor: pointer;
color: $--color-text-regular; color: $--color-text-regular;
font-size: $--font-size-base; font-size: $--font-size-base;

View File

@ -102,7 +102,7 @@ $--index-popper: 2000;
-------------------------- */ -------------------------- */
$--disabled-fill-base: $--background-color-base; $--disabled-fill-base: $--background-color-base;
$--disabled-color-base: $--color-text-placeholder; $--disabled-color-base: $--color-text-placeholder;
$--disabled-border-base: $--border-color-lighter; $--disabled-border-base: $--border-color-light;
/* Icon /* Icon
-------------------------- */ -------------------------- */

View File

@ -58,7 +58,8 @@
} }
@include e(header-label) { @include e(header-label) {
font-size: 14px; font-size: 16px;
font-weight: 500;
padding: 0 5px; padding: 0 5px;
line-height: 22px; line-height: 22px;
text-align: center; text-align: center;

View File

@ -34,7 +34,8 @@
} }
div { div {
font-size: 14px; font-size: 16px;
font-weight: 500;
margin-right: 50px; margin-right: 50px;
} }
} }

View File

@ -60,6 +60,7 @@
margin: 5px 0; margin: 5px 0;
background-color: $--color-white; background-color: $--color-white;
border: 1px solid $--border-color-lighter; border: 1px solid $--border-color-lighter;
border-radius: $--border-radius-base;
box-shadow: $--dropdown-menu-box-shadow; box-shadow: $--dropdown-menu-box-shadow;
@include e(item) { @include e(item) {

View File

@ -15,6 +15,7 @@
-webkit-appearance: none; -webkit-appearance: none;
padding-left: #{$--input-height + 10}; padding-left: #{$--input-height + 10};
padding-right: #{$--input-height + 10}; padding-right: #{$--input-height + 10};
text-align: center;
} }
} }

View File

@ -239,7 +239,7 @@
@include e(inner) { @include e(inner) {
display: block; display: block;
resize: vertical; resize: vertical;
padding: 5px 7px; padding: 5px 15px;
line-height: 1.5; line-height: 1.5;
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;

View File

@ -4,14 +4,14 @@
@include b(select-dropdown) { @include b(select-dropdown) {
@include e(item) { @include e(item) {
font-size: $--select-font-size; font-size: $--select-font-size;
padding: 7px 20px; padding: 0 20px;
position: relative; position: relative;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
color: $--select-option-color; color: $--select-option-color;
height: $--select-option-height; height: $--select-option-height;
line-height: 1.5; line-height: $--select-option-height;
box-sizing: border-box; box-sizing: border-box;
cursor: pointer; cursor: pointer;
@ -30,10 +30,11 @@
&.selected { &.selected {
color: $--select-option-selected; color: $--select-option-selected;
font-weight: bold;
} }
& span { & span {
line-height: 1.5 !important; line-height: 34px !important;
} }
} }
} }

View File

@ -90,7 +90,7 @@
@include e(outer) { @include e(outer) {
height: 6px; height: 6px;
border-radius: 100px; border-radius: 100px;
background-color: $--border-color-light; background-color: $--border-color-lighter;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
vertical-align: middle; vertical-align: middle;

View File

@ -118,7 +118,7 @@
} }
@include e(title) { @include e(title) {
font-size: 15px; font-size: 16px;
line-height: 38px; line-height: 38px;
@include when(process) { @include when(process) {

View File

@ -88,14 +88,7 @@
} }
@include when(disabled) { @include when(disabled) {
.el-switch__core { opacity: 0.6;
border-color: $--switch-disabled-color !important;
background: $--switch-disabled-color !important;
}
.el-switch__label * {
color: $--switch-disabled-text-color !important;
}
} }
@include m(wide) { @include m(wide) {

View File

@ -134,6 +134,7 @@
.el-input__inner { .el-input__inner {
height: $--transfer-filter-height; height: $--transfer-filter-height;
width: 100%; width: 100%;
font-size: 12px;
display: inline-block; display: inline-block;
box-sizing: border-box; box-sizing: border-box;
border-radius: #{$--transfer-filter-height / 2}; border-radius: #{$--transfer-filter-height / 2};