Merge remote-tracking branch 'eleme/dev' into carbon

pull/6151/head
Leopoldthecoder 2017-07-29 22:05:15 +08:00
commit 4f21221c0b
13 changed files with 65 additions and 23 deletions

View File

@ -1,5 +1,18 @@
## Changelog
### 1.4.1
*2017-07-28*
- Fixed child nodes expanding when checking parent node in Tree, #6029
- Fixed checking behavior error of Tree, #6034
- Fixed FormItem not inheriting `label-width` as a Form's direct child, #6044
- Fixed Menu incorrectly showing SubMenu in collapse mode, #6111
- Fixed render order error of `v-if` controlled dynamic TabPanes, #6066
- Fixed Popover still popping up after mouse leaves within `open-delay`, #6058 (by @laobubu)
- Fixed delete buttons still rendered in file list of disabled Upload, #6091
- Fixed background color error on hover of striped Table, #6024 (by @xtongs)
### 1.4.0 Boron
*2017-07-21*

View File

@ -1,5 +1,17 @@
## 更新日志
### 1.4.1
*2017-07-28*
- 修复 Tree 勾选父节点会弹出子节点的问题,#6029
- 修复 Tree 勾选逻辑错误,#6034
- 修复作为 Form 直接子元素的 FormItem 不继承 `label-width` 的问题,#6044
- 修复 collapse 模式下的 Menu 自动弹出子菜单的问题,#6111
- 修复使用 `v-if` 的动态 TabPane 顺序错误的问题,#6066
- 修复鼠标在 `open-delay` 时间内移开元素后,仍然会弹出 Popover 的问题,#6058by @laobubu
- 修复禁用的 Upload 的文件列表仍然显示删除按钮并可操作的问题,#6091
- 修复斑马纹的 Table 的背景色在 hover 时不正确的问题,#6024by @xtongs
### 1.4.0 Boron
*2017-07-21*

View File

@ -17,7 +17,7 @@
}
}, 1000);
};
var vaildatePass = (rule, value, callback) => {
var validatePass = (rule, value, callback) => {
if (value === '') {
callback(new Error('Please input the password'));
} else {

View File

@ -1 +1 @@
{"1.0.9":"1.0","1.1.6":"1.1","1.2.9":"1.2","1.3.7":"1.3","1.4.0":"1.4"}
{"1.0.9":"1.0","1.1.6":"1.1","1.2.9":"1.2","1.3.7":"1.3","1.4.1":"1.4"}

View File

@ -1,6 +1,6 @@
{
"name": "element-ui",
"version": "1.4.0",
"version": "1.4.1",
"description": "A Component Library for Vue.js.",
"main": "lib/element-ui.common.js",
"files": [

View File

@ -49,8 +49,7 @@
computed: {
isObject() {
const type = typeof this.value;
return type !== 'string' && type !== 'number' && type !== 'boolean';
return Object.prototype.toString.call(this.value).toLowerCase() === '[object object]';
},
currentLabel() {

View File

@ -12,7 +12,7 @@
<el-tag
v-for="item in selected"
:key="getValueKey(item)"
closable
:closable="!disabled"
:hit="item.hitState"
type="primary"
@close="deleteTag($event, item)"
@ -367,13 +367,16 @@
}
},
scrollToOption(className = 'selected') {
scrollToOption(option) {
const target = Array.isArray(option) && option[0] ? option[0].$el : option.$el;
if (this.$refs.popper && target) {
const menu = this.$refs.popper.$el.querySelector('.el-select-dropdown__wrap');
scrollIntoView(menu, menu.getElementsByClassName(className)[0]);
scrollIntoView(menu, target);
}
},
handleMenuEnter() {
this.$nextTick(() => this.scrollToOption());
this.$nextTick(() => this.scrollToOption(this.selected));
},
emitChange(val) {
@ -384,8 +387,7 @@
getOption(value) {
let option;
const type = typeof value;
const isObject = type !== 'string' && type !== 'number' && type !== 'boolean';
const isObject = Object.prototype.toString.call(value).toLowerCase() === '[object object]';
for (let i = this.cachedOptions.length - 1; i >= 0; i--) {
const cachedOption = this.cachedOptions[i];
const isEqual = isObject
@ -551,12 +553,11 @@
this.emitChange(option.value);
this.visible = false;
}
this.$nextTick(() => this.scrollToOption());
this.$nextTick(() => this.scrollToOption(option));
},
getValueIndex(arr = [], value) {
const type = typeof value;
const isObject = type !== 'string' && type !== 'number' && type !== 'boolean';
const isObject = Object.prototype.toString.call(value).toLowerCase() === '[object object]';
if (!isObject) {
return arr.indexOf(value);
} else {
@ -613,7 +614,7 @@
}
}
}
this.$nextTick(() => this.scrollToOption('hover'));
this.$nextTick(() => this.scrollToOption(this.options[this.hoverIndex]));
},
selectOption() {

View File

@ -61,7 +61,9 @@
this.$emit('input', value);
},
addPanes(item) {
const index = this.$slots.default.indexOf(item.$vnode);
const index = this.$slots.default.filter(item => {
return item.elm.nodeType === 1 && /\bel-tab-pane\b/.test(item.elm.className);
}).indexOf(item.$vnode);
this.panes.splice(index, 0, item);
},
removePanes(item) {

View File

@ -1,6 +1,6 @@
{
"name": "element-theme-default",
"version": "1.4.0",
"version": "1.4.1",
"description": "Element component default theme.",
"main": "lib/index.css",
"style": "lib/index.css",

View File

@ -400,9 +400,15 @@
}
@e body {
tr.hover-row > td {
tr.hover-row {
&, &.el-table__row--striped {
&, &.current-row {
> td {
background-color: var(--color-extra-light-gray);
}
}
}
}
tr.current-row > td {
background: color(var(--color-primary) tint(92%));

View File

@ -171,6 +171,11 @@
}
}
}
@when disabled {
.el-upload-list__item:hover .el-upload-list__item-status-label {
display: block;
}
}
@e item-name {
color: var(--color-extra-light-black);
display: block;

View File

@ -1,7 +1,11 @@
<template>
<transition-group
tag="ul"
:class="['el-upload-list', 'el-upload-list--' + listType]"
:class="[
'el-upload-list',
'el-upload-list--' + listType,
{ 'is-disabled': disabled }
]"
name="el-list"
>
<li
@ -24,7 +28,7 @@
'el-icon-check': ['picture-card', 'picture'].indexOf(listType) > -1
}"></i>
</label>
<i class="el-icon-close" @click="$emit('remove', file)"></i>
<i class="el-icon-close" v-if="!disabled" @click="$emit('remove', file)"></i>
<el-progress
v-if="file.status === 'uploading'"
:type="listType === 'picture-card' ? 'circle' : 'line'"

View File

@ -158,7 +158,7 @@ if (typeof window !== 'undefined' && window.Vue) {
};
module.exports = {
version: '1.4.0',
version: '1.4.1',
locale: locale.use,
i18n: locale.i18n,
install,