mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Fixed #4929 - Add parent param to all pt method options
This commit is contained in:
parent
1a4bba8107
commit
eb00b8ee23
104 changed files with 399 additions and 158 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<input :class="cx('root')" :value="modelValue" @input="onInput" v-bind="ptm('root', ptmParams)" data-pc-name="inputtext" />
|
||||
<input :class="cx('root')" :value="modelValue" @input="onInput" v-bind="getPTOptions('root')" data-pc-name="inputtext" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -18,17 +18,13 @@ export default {
|
|||
filled() {
|
||||
return this.modelValue != null && this.modelValue.toString().length > 0;
|
||||
},
|
||||
ptmParams() {
|
||||
return {
|
||||
parent: {
|
||||
props: this.$parent?.$props,
|
||||
state: this.$parent?.$data
|
||||
},
|
||||
getPTOptions(key) {
|
||||
return this.ptm(key, {
|
||||
context: {
|
||||
filled: this.filled,
|
||||
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue