mirror of https://github.com/ElemeFE/element
Merge remote-tracking branch 'eleme/dev' into carbon
# Conflicts: # CHANGELOG.en-US.md # CHANGELOG.zh-CN.md # examples/app.vue # examples/index.tpl # examples/versions.json # package.json # packages/dropdown/src/dropdown.vue # packages/theme-default/package.json # packages/theme-default/src/date-picker/date-picker.css # src/index.jspull/7695/head
commit
6d3636fbac
|
@ -221,6 +221,14 @@ in `lazy` mode #6235
|
||||||
##
|
##
|
||||||
<i><sup>*</sup> Dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to [XSS attacks](https://en.wikipedia.org/wiki/Cross-site_scripting). So when `dangerouslyUseHTMLString` is on, please make sure the content of `message` is trusted, and **never** assign `message` to user-provided content.</i>
|
<i><sup>*</sup> Dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to [XSS attacks](https://en.wikipedia.org/wiki/Cross-site_scripting). So when `dangerouslyUseHTMLString` is on, please make sure the content of `message` is trusted, and **never** assign `message` to user-provided content.</i>
|
||||||
|
|
||||||
|
### 1.4.8
|
||||||
|
|
||||||
|
*2017-10-24*
|
||||||
|
|
||||||
|
- Fixed SubMenu retracting when moving the mouse rapidly on the SubMenu of collapsed Menu, #7579
|
||||||
|
- Fixed hidden last shortcut of DateTimePicker when the shortcut menu is long, #7567 (by @DuLinRain)
|
||||||
|
- Added `show-timeout` and `hide-timeout` attributes for Dropdown, #7621 (by @phongkt-dev)
|
||||||
|
|
||||||
### 1.4.7
|
### 1.4.7
|
||||||
|
|
||||||
*2017-10-16*
|
*2017-10-16*
|
||||||
|
@ -228,7 +236,6 @@ in `lazy` mode #6235
|
||||||
- Fixed compatibility of Autocomplete and Vue 2.5.x, #6942 (by @rennai)
|
- Fixed compatibility of Autocomplete and Vue 2.5.x, #6942 (by @rennai)
|
||||||
- Added `allow-focus` attribute for Switch, #7494 (by @breadadams)
|
- Added `allow-focus` attribute for Switch, #7494 (by @breadadams)
|
||||||
|
|
||||||
|
|
||||||
### 1.4.6
|
### 1.4.6
|
||||||
|
|
||||||
*2017-09-27*
|
*2017-09-27*
|
||||||
|
|
|
@ -213,6 +213,13 @@
|
||||||
##
|
##
|
||||||
<i><sup>*</sup> 在网站上动态渲染任意 HTML 是非常危险的,因为容易导致 [XSS 攻击](https://en.wikipedia.org/wiki/Cross-site_scripting)。因此请在 `dangerouslyUseHTMLString` 打开的情况下,确保 `message` 的内容是可信的,**永远不要**将用户提交的内容赋值给 `message` 属性。</i>
|
<i><sup>*</sup> 在网站上动态渲染任意 HTML 是非常危险的,因为容易导致 [XSS 攻击](https://en.wikipedia.org/wiki/Cross-site_scripting)。因此请在 `dangerouslyUseHTMLString` 打开的情况下,确保 `message` 的内容是可信的,**永远不要**将用户提交的内容赋值给 `message` 属性。</i>
|
||||||
|
|
||||||
|
### 1.4.8
|
||||||
|
*2017-10-24*
|
||||||
|
|
||||||
|
- 修复鼠标在折叠的 Menu 子菜单中快速移动时会将菜单收起的问题,#7579
|
||||||
|
- 修复 DateTimePicker 的快捷菜单过长时,最后一项会被隐藏的问题,#7567(by @DuLinRain)
|
||||||
|
- 新增 Dropdown 的 `show-timeout` 和 `hide-timeout` 属性,#7621(by @phongkt-dev)
|
||||||
|
|
||||||
### 1.4.7
|
### 1.4.7
|
||||||
*2017-10-16*
|
*2017-10-16*
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
|
|
||||||
> A Vue.js 2.0 UI Toolkit for Web.
|
> A Vue.js 2.0 UI Toolkit for Web.
|
||||||
|
|
||||||
<a target='_blank' rel='nofollow' href='https://app.codesponsor.io/link/bD3dKbdDE2F7Ky9LUN1kjTFK/ElemeFE/element'>
|
<!--<a target='_blank' rel='nofollow' href='https://app.codesponsor.io/link/bD3dKbdDE2F7Ky9LUN1kjTFK/ElemeFE/element'>-->
|
||||||
<img alt='Sponsor' width='888' height='68' src='https://app.codesponsor.io/embed/bD3dKbdDE2F7Ky9LUN1kjTFK/ElemeFE/element.svg' />
|
<!--<img alt='Sponsor' width='888' height='68' src='https://app.codesponsor.io/embed/bD3dKbdDE2F7Ky9LUN1kjTFK/ElemeFE/element.svg' />-->
|
||||||
</a >
|
<!--</a >-->
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
- [Home Page](http://element.eleme.io/)
|
- [Home Page](http://element.eleme.io/)
|
||||||
|
|
|
@ -328,6 +328,8 @@ Besides default size, Dropdown component provides three additional sizes for you
|
||||||
| placement | placement of pop menu | string | top/top-start/top-end/bottom/bottom-start/bottom-end | bottom-end |
|
| placement | placement of pop menu | string | top/top-start/top-end/bottom/bottom-start/bottom-end | bottom-end |
|
||||||
| trigger | how to trigger | string | hover/click | hover |
|
| trigger | how to trigger | string | hover/click | hover |
|
||||||
| hide-on-click | whether to hide menu after clicking menu-item | boolean | — | true |
|
| hide-on-click | whether to hide menu after clicking menu-item | boolean | — | true |
|
||||||
|
| show-timeout | Delay time before show a dropdown | number | — | 250 |
|
||||||
|
| hide-timeout | Delay time before hide a dropdown | number | — | 150 |
|
||||||
|
|
||||||
### Dropdown Events
|
### Dropdown Events
|
||||||
| Event Name | Description | Parameters |
|
| Event Name | Description | Parameters |
|
||||||
|
|
|
@ -407,7 +407,7 @@ Depending on your design, there are several different ways to align your label e
|
||||||
|
|
||||||
Form component allows you to verify your data, helping you find and correct errors.
|
Form component allows you to verify your data, helping you find and correct errors.
|
||||||
|
|
||||||
:::demo Just add the `rule` attribute for `Form` component, pass validation rules, and set `prop` attribute for `Form-Item` as a specific key that needs to be validated. See more information at [async-validator](https://github.com/yiminghe/async-validator).
|
:::demo Just add the `rules` attribute for `Form` component, pass validation rules, and set `prop` attribute for `Form-Item` as a specific key that needs to be validated. See more information at [async-validator](https://github.com/yiminghe/async-validator).
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
|
||||||
|
|
|
@ -334,6 +334,8 @@ Dropdown 组件提供除了默认值以外的三种尺寸,可以在不同场
|
||||||
| placement | 菜单弹出位置 | string | top/top-start/top-end/bottom/bottom-start/bottom-end | bottom-end |
|
| placement | 菜单弹出位置 | string | top/top-start/top-end/bottom/bottom-start/bottom-end | bottom-end |
|
||||||
| trigger | 触发下拉的行为 | string | hover, click | hover |
|
| trigger | 触发下拉的行为 | string | hover, click | hover |
|
||||||
| hide-on-click | 是否在点击菜单项后隐藏菜单 | boolean | — | true |
|
| hide-on-click | 是否在点击菜单项后隐藏菜单 | boolean | — | true |
|
||||||
|
| show-timeout | 展开下拉菜单的延时 | number | — | 250 |
|
||||||
|
| hide-timeout | 收起下拉菜单的延时 | number | — | 150 |
|
||||||
|
|
||||||
### Dropdown Events
|
### Dropdown Events
|
||||||
| 事件名称 | 说明 | 回调参数 |
|
| 事件名称 | 说明 | 回调参数 |
|
||||||
|
|
|
@ -399,7 +399,7 @@
|
||||||
|
|
||||||
在防止用户犯错的前提下,尽可能让用户更早地发现并纠正错误。
|
在防止用户犯错的前提下,尽可能让用户更早地发现并纠正错误。
|
||||||
|
|
||||||
::: demo Form 组件提供了表单验证的功能,只需要通过 `rule` 属性传入约定的验证规则,并 Form-Item 的 `prop` 属性设置为需校验的字段名即可。校验规则参见 [async-validator](https://github.com/yiminghe/async-validator)
|
::: demo Form 组件提供了表单验证的功能,只需要通过 `rules` 属性传入约定的验证规则,并 Form-Item 的 `prop` 属性设置为需校验的字段名即可。校验规则参见 [async-validator](https://github.com/yiminghe/async-validator)
|
||||||
```html
|
```html
|
||||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||||
<el-form-item label="活动名称" prop="name">
|
<el-form-item label="活动名称" prop="name">
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"1.0.9":"1.0","1.1.6":"1.1","1.2.9":"1.2","1.3.7":"1.3","1.4.7":"1.4","2.0.0-beta.1":"2.0"}
|
{"1.0.9":"1.0","1.1.6":"1.1","1.2.9":"1.2","1.3.7":"1.3","1.4.8":"1.4","2.0.0-beta.1":"2.0"}
|
|
@ -46,6 +46,14 @@
|
||||||
},
|
},
|
||||||
visibleArrow: {
|
visibleArrow: {
|
||||||
default: true
|
default: true
|
||||||
|
},
|
||||||
|
showTimeout: {
|
||||||
|
type: Number,
|
||||||
|
default: 250
|
||||||
|
},
|
||||||
|
hideTimeout: {
|
||||||
|
type: Number,
|
||||||
|
default: 150
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -88,14 +96,14 @@
|
||||||
clearTimeout(this.timeout);
|
clearTimeout(this.timeout);
|
||||||
this.timeout = setTimeout(() => {
|
this.timeout = setTimeout(() => {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
}, 250);
|
}, this.showTimeout);
|
||||||
},
|
},
|
||||||
hide() {
|
hide() {
|
||||||
if (this.triggerElm.disabled) return;
|
if (this.triggerElm.disabled) return;
|
||||||
clearTimeout(this.timeout);
|
clearTimeout(this.timeout);
|
||||||
this.timeout = setTimeout(() => {
|
this.timeout = setTimeout(() => {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
}, 150);
|
}, this.hideTimeout);
|
||||||
},
|
},
|
||||||
handleClick() {
|
handleClick() {
|
||||||
if (this.triggerElm.disabled) return;
|
if (this.triggerElm.disabled) return;
|
||||||
|
|
|
@ -805,84 +805,6 @@ describe('Table', () => {
|
||||||
}, DELAY);
|
}, DELAY);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('reserve-selection', done => {
|
|
||||||
const getData = function(page = 0) {
|
|
||||||
let id = 0;
|
|
||||||
const rows = [];
|
|
||||||
const row = () => {
|
|
||||||
return {
|
|
||||||
id: ++id + page * 10,
|
|
||||||
date: new Date().getTime()
|
|
||||||
};
|
|
||||||
};
|
|
||||||
let count = 10;
|
|
||||||
|
|
||||||
while (--count) {
|
|
||||||
rows.push(row());
|
|
||||||
}
|
|
||||||
return rows;
|
|
||||||
};
|
|
||||||
const vm = createVue({
|
|
||||||
template: `
|
|
||||||
<el-table ref="table" :row-key="rowKey" :data="testData" @selection-change="change">
|
|
||||||
<el-table-column type="selection" reserve-selection />
|
|
||||||
<el-table-column prop="id" label="id" />
|
|
||||||
<el-table-column prop="date" label="date" />
|
|
||||||
</el-table>
|
|
||||||
`,
|
|
||||||
|
|
||||||
created() {
|
|
||||||
this.testData = getData();
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
|
||||||
return { selected: [], testData: [] };
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
rowKey(row) {
|
|
||||||
return row.id;
|
|
||||||
},
|
|
||||||
|
|
||||||
change(rows) {
|
|
||||||
this.selected = rows;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, true);
|
|
||||||
|
|
||||||
setTimeout(_ => {
|
|
||||||
// click first
|
|
||||||
vm.$el.querySelectorAll('.el-checkbox')[1].click();
|
|
||||||
|
|
||||||
setTimeout(_ => {
|
|
||||||
expect(vm.$el.querySelectorAll('.el-checkbox__input.is-checked')).to.length(1);
|
|
||||||
// go to second page
|
|
||||||
vm.testData = getData(1);
|
|
||||||
setTimeout(_ => {
|
|
||||||
// expect no checked
|
|
||||||
expect(vm.$el.querySelectorAll('.el-checkbox__input.is-checked')).to.length(0);
|
|
||||||
// click first checkbox
|
|
||||||
vm.$el.querySelectorAll('.el-checkbox')[1].click();
|
|
||||||
vm.$el.querySelectorAll('.el-checkbox')[2].click();
|
|
||||||
setTimeout(_ => {
|
|
||||||
// back first page
|
|
||||||
vm.testData = getData();
|
|
||||||
setTimeout(_ => {
|
|
||||||
expect(vm.$el.querySelectorAll('.el-checkbox__input.is-checked')).to.length(1);
|
|
||||||
// clear
|
|
||||||
vm.$refs.table.clearSelection();
|
|
||||||
setTimeout(_ => {
|
|
||||||
expect(vm.$el.querySelectorAll('.el-checkbox__input.is-checked')).to.length(0);
|
|
||||||
destroyVM(vm);
|
|
||||||
done();
|
|
||||||
}, DELAY);
|
|
||||||
}, DELAY);
|
|
||||||
}, DELAY);
|
|
||||||
}, DELAY);
|
|
||||||
}, DELAY);
|
|
||||||
}, DELAY);
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('type', () => {
|
describe('type', () => {
|
||||||
const createTable = function(type) {
|
const createTable = function(type) {
|
||||||
return createVue({
|
return createVue({
|
||||||
|
|
Loading…
Reference in New Issue