Commit 02ece5df268d7018c569b423680d437bf4b23d32
Committed by
GitHub

Merge pull request #398 from muei/2.0
Improve v2
Showing
3 changed files
with
11 additions
and
9 deletions
Show diff stats
.gitignore
@@ -18,4 +18,5 @@ npm-debug.log | @@ -18,4 +18,5 @@ npm-debug.log | ||
18 | examples/dist/ | 18 | examples/dist/ |
19 | dist/ | 19 | dist/ |
20 | yarn-error.log | 20 | yarn-error.log |
21 | -test/unit/coverage | ||
22 | \ No newline at end of file | 21 | \ No newline at end of file |
22 | +test/unit/coverage | ||
23 | +.vscode | ||
23 | \ No newline at end of file | 24 | \ No newline at end of file |
src/components/input/input.vue
@@ -141,17 +141,17 @@ | @@ -141,17 +141,17 @@ | ||
141 | } | 141 | } |
142 | }, | 142 | }, |
143 | methods: { | 143 | methods: { |
144 | - handleEnter () { | ||
145 | - this.$emit('on-enter'); | 144 | + handleEnter (event) { |
145 | + this.$emit('on-enter', event); | ||
146 | }, | 146 | }, |
147 | - handleIconClick () { | ||
148 | - this.$emit('on-click'); | 147 | + handleIconClick (event) { |
148 | + this.$emit('on-click', event); | ||
149 | }, | 149 | }, |
150 | - handleFocus () { | ||
151 | - this.$emit('on-focus'); | 150 | + handleFocus (event) { |
151 | + this.$emit('on-focus', event); | ||
152 | }, | 152 | }, |
153 | - handleBlur () { | ||
154 | - this.$emit('on-blur'); | 153 | + handleBlur (event) { |
154 | + this.$emit('on-blur', event); | ||
155 | if (!findComponentUpward(this, ['DatePicker', 'TimePicker', 'Cascader', 'Search'])) { | 155 | if (!findComponentUpward(this, ['DatePicker', 'TimePicker', 'Cascader', 'Search'])) { |
156 | this.dispatch('FormItem', 'on-form-blur', this.currentValue); | 156 | this.dispatch('FormItem', 'on-form-blur', this.currentValue); |
157 | } | 157 | } |