Skip to content

Instantly share code, notes, and snippets.

@vsanrocha
Created May 21, 2018 14:49
Show Gist options
  • Select an option

  • Save vsanrocha/6dd0c5a85c687637e73dca1f45b497bc to your computer and use it in GitHub Desktop.

Select an option

Save vsanrocha/6dd0c5a85c687637e73dca1f45b497bc to your computer and use it in GitHub Desktop.
<div>
<input :inputProps>
</div>
computed: {
inputProps() {
return {
v-mask="hasMask"
:data-vv-validate-on="validation.on"
:id="id"
:name="id"
:type="type"
:autocomplete="autocomplete"
v-validate="validation.rule"
v-model="inputValue"
@keyup.enter="emitKeyupEnter"
@keyup="emitKeyup($event.target.value)"
@blur="checkContent()"
@focus="inputFocus()"
:tabindex="tabIndex"
:maxlength="maxChar"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment