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

# Conflicts:
#	CHANGELOG.en-US.md
#	CHANGELOG.zh-CN.md
#	examples/app.vue
#	examples/docs/en-US/switch.md
#	examples/docs/zh-CN/switch.md
#	examples/versions.json
#	package.json
#	packages/switch/src/component.vue
#	packages/theme-default/package.json
#	packages/theme-default/src/common/var.css
#	packages/theme-default/src/switch.css
#	src/index.js
pull/7517/head
Leopoldthecoder 2017-10-16 18:33:41 +08:00
commit f0b7debd23
6 changed files with 25 additions and 4 deletions

View File

@ -177,6 +177,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>
### 1.4.7
*2017-10-16*
- Fixed compatibility of Autocomplete and Vue 2.5.x, #6942 (by @rennai)
- Added `allow-focus` attribute for Switch, #7494 (by @breadadams)
### 1.4.6
*2017-09-27*

View File

@ -172,6 +172,12 @@
##
<i><sup>*</sup> 在网站上动态渲染任意 HTML 是非常危险的,因为容易导致 [XSS 攻击](https://en.wikipedia.org/wiki/Cross-site_scripting)。因此请在 `dangerouslyUseHTMLString` 打开的情况下,确保 `message` 的内容是可信的,**永远不要**将用户提交的内容赋值给 `message` 属性。</i>
### 1.4.7
*2017-10-16*
- 修复 Autocomplete 与 Vue 2.5.x 不兼容的问题,#6942by @rennai
- Switch 新增 `allow-focus` 属性,#7494by @breadadams
### 1.4.6
*2017-09-27*

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.6":"1.4","2.0.0-alpha.3":"2.0"}
{"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-alpha.3":"2.0"}

View File

@ -184,7 +184,7 @@
methods: {
validate(trigger, callback = noop) {
var rules = this.getFilteredRule(trigger);
if (!rules || rules.length === 0) {
if ((!rules || rules.length === 0) && !this._props.hasOwnProperty('required')) {
callback();
return true;
}
@ -230,10 +230,11 @@
getRules() {
var formRules = this.form.rules;
var selfRules = this.rules;
var requiredRule = this._props.hasOwnProperty('required') ? { required: !!this.required } : [];
formRules = formRules ? formRules[this.prop] : [];
return [].concat(selfRules || formRules || []);
return [].concat(selfRules || formRules || []).concat(requiredRule);
},
getFilteredRule(trigger) {
var rules = this.getRules();
@ -268,7 +269,7 @@
let rules = this.getRules();
if (rules.length) {
if (rules.length || this._props.hasOwnProperty('required')) {
this.$on('el.form.blur', this.onFieldBlur);
this.$on('el.form.change', this.onFieldChange);
}

View File

@ -380,9 +380,15 @@ export default {
const bodyStyle = document.body.style;
if (rect.width > 12 && rect.right - event.pageX < 8) {
bodyStyle.cursor = 'col-resize';
if (hasClass(target, 'is-sortable')) {
target.style.cursor = 'col-resize';
}
this.draggingColumn = column;
} else if (!this.dragging) {
bodyStyle.cursor = '';
if (hasClass(target, 'is-sortable')) {
target.style.cursor = 'pointer';
}
this.draggingColumn = null;
}
}

View File