pull/4107/head
mertsincan 2023-07-04 03:24:37 +01:00
parent 3442acade4
commit 29856c6a3a
2 changed files with 10 additions and 3 deletions

View File

@ -446,10 +446,10 @@ export default {
*/
},
ptm(key = '', params = {}) {
return this._getPTValue(this.pt, key, { props: this.$props, state: this.$data, ...params });
return this._getPTValue(this.pt, key, { instance: this, props: this.$props, state: this.$data, ...params });
},
ptmo(obj = {}, key = '', params = {}) {
return this._getPTValue(obj, key, params, false);
return this._getPTValue(obj, key, { instance: this, ...params }, false);
},
cx(key = '', params = {}) {
return !this.isUnstyled ? this._getOptionValue(this.$css.classes, key, { instance: this, props: this.$props, state: this.$data, parentInstance: this.$parentInstance, ...params }) : undefined;

View File

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