mirror of https://github.com/ElemeFE/element
Input: fix blur event param & improve docs
parent
417a0c3fd9
commit
6644207668
|
@ -7,7 +7,7 @@
|
|||
- 修复 TimePicker 选择范围时结束时间小于开始时间会重置开始时间, #894
|
||||
- 修复结合 `vue-i18n` 使用时会提示不能覆盖 `$t` 方法的问题
|
||||
- 新增 Loading 自定义加载文案的功能,并优化了视觉表现
|
||||
|
||||
- 修复 Input blur 事件的参数不是 event 对象的问题
|
||||
|
||||
### 1.0.0-rc.9
|
||||
|
||||
|
|
|
@ -650,6 +650,8 @@
|
|||
| 事件名称 | 说明 | 回调参数 |
|
||||
|---------|--------|---------|
|
||||
| click | 点击 Input 内的图标时触发 | event |
|
||||
| blur | 在 Input 失去焦点时触发 | event |
|
||||
| focus | 在 Input 或得焦点时触发 | event |
|
||||
|
||||
### Autocomplete API
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
|
||||
methods: {
|
||||
handleBlur(event) {
|
||||
this.$emit('blur', this.currentValue);
|
||||
this.$emit('blur', event);
|
||||
this.dispatch('form-item', 'el.form.blur', [this.currentValue]);
|
||||
},
|
||||
inputSelect() {
|
||||
|
@ -120,14 +120,14 @@
|
|||
|
||||
this.textareaStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
|
||||
},
|
||||
handleFocus(ev) {
|
||||
this.$emit('focus', ev);
|
||||
handleFocus(event) {
|
||||
this.$emit('focus', event);
|
||||
},
|
||||
handleInput(ev) {
|
||||
this.currentValue = ev.target.value;
|
||||
handleInput(event) {
|
||||
this.currentValue = event.target.value;
|
||||
},
|
||||
handleIconClick(ev) {
|
||||
this.$emit('click', ev);
|
||||
handleIconClick(event) {
|
||||
this.$emit('click', event);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue