Skip to content

Commit

Permalink
chore(lib): update Input
Browse files Browse the repository at this point in the history
- In `src/components/input/Input.vue`,
    - `v-model` binding conforms to Vue 3,
        - `value` prop --> `modelValue`
        - `input` event --> `update:modelValue`
    - Automatic ESLint fix is applied. The following trivial errors
      are manually fixed,
        - `statusTypeIcon` explicitly returns `undefined` if there
          is no match.
        - `.native` modifiers are removed.
  • Loading branch information
kikuomax committed Jul 15, 2022
1 parent 7dfb2ac commit 5efb26e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/input/Input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default {
mixins: [FormElementMixin],
inheritAttrs: false,
props: {
value: [Number, String],
modelValue: [Number, String],
type: {
type: String,
default: 'text'
Expand All @@ -103,7 +103,7 @@ export default {
},
data() {
return {
newValue: this.value,
newValue: this.modelValue,
newType: this.type,
newAutocomplete: this.autocomplete || config.defaultInputAutocomplete,
isPasswordVisible: false,
Expand All @@ -119,7 +119,7 @@ export default {
},
set(value) {
this.newValue = value
this.$emit('input', value)
this.$emit('update:modelValue', value)
}
},
rootClasses() {
Expand Down Expand Up @@ -221,7 +221,7 @@ export default {
* When v-model is changed:
* 1. Set internal value.
*/
value(value) {
modelValue(value) {
this.newValue = value
}
},
Expand Down

0 comments on commit 5efb26e

Please sign in to comment.