mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 01:12:37 +00:00
Refactor #4209 - For InputMask
This commit is contained in:
parent
38bd2712e9
commit
ea6bd0fb3a
2 changed files with 38 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<input :class="cx('root')" :readonly="readonly" @input="onInput" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" @keypress="onKeyPress" @paste="onPaste" v-bind="ptm('root')" data-pc-name="inputmask" />
|
||||
<input :class="cx('root')" :readonly="readonly" @input="onInput" @focus="onFocus" @blur="onBlur" @keydown="onKeyDown" @keypress="onKeyPress" @paste="onPaste" v-bind="ptm('root', ptmParams)" data-pc-name="inputmask" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -496,6 +496,14 @@ export default {
|
|||
computed: {
|
||||
filled() {
|
||||
return this.modelValue != null && this.modelValue.toString().length > 0;
|
||||
},
|
||||
ptmParams() {
|
||||
return {
|
||||
context: {
|
||||
filled: this.filled,
|
||||
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue