Skip to content

Commit

Permalink
x-input: add event:on-click-clear-icon #2603
Browse files Browse the repository at this point in the history
  • Loading branch information
airyland committed Apr 10, 2018
1 parent 149f5b4 commit f75a78a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/x-input/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ export default {
clear () {
this.currentValue = ''
this.focus()
this.$emit('on-click-clear-icon')
},
focus () {
this.$refs.input.focus()
Expand Down
6 changes: 6 additions & 0 deletions src/components/x-input/metas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ events:
params: '`(error)`'
en: fires when clicking error icon
zh-CN: '点击错误图标时触发,你可以关闭 `should-toast-error` 然后用这个事件来自定义显示错误的提示内容'
on-click-clear-icon:
version: next
en: fires when clicking clear icon
zh-CN: 点击清除按钮时触发
methods:
focus:
en: get input focus
Expand All @@ -146,8 +150,10 @@ methods:
changes:
next:
en:
- '[feature] add event:on-click-clear-icon #2603'
- '[enhance] scroll input element into view when getting focus #2604'
zh-CN:
- '[feature] 支持事件 on-click-clear-icon #2603'
- '[enhance] 获得焦点时滚动到可视区域(Android) #2604'
v2.8.1:
en:
Expand Down

0 comments on commit f75a78a

Please sign in to comment.