Refactor #4124 - Textarea pt context improvements

This commit is contained in:
Tuğçe Küçükoğlu 2023-07-13 15:42:30 +03:00
parent 6afaa15de3
commit 02f67d1b0f
2 changed files with 25 additions and 1 deletions

View file

@ -1,5 +1,5 @@
<template>
<textarea :class="cx('root')" :value="modelValue" @input="onInput" v-bind="ptm('root')" data-pc-name="textarea"></textarea>
<textarea :class="cx('root')" :value="modelValue" @input="onInput" v-bind="ptm('root', ptmParams)" data-pc-name="textarea"></textarea>
</template>
<script>
@ -44,6 +44,13 @@ export default {
computed: {
filled() {
return this.modelValue != null && this.modelValue.toString().length > 0;
},
ptmParams() {
return {
context: {
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
}
};
}
}
};