Fixed #4929 - Add parent param to all pt method options

This commit is contained in:
mertsincan 2023-12-05 11:06:32 +00:00
parent 1a4bba8107
commit eb00b8ee23
104 changed files with 399 additions and 158 deletions

View file

@ -1,12 +1,12 @@
<template>
<div role="progressbar" :class="cx('root')" aria-valuemin="0" :aria-valuenow="value" aria-valuemax="100" v-bind="getPTOptions('root')">
<div v-if="determinate" :class="cx('value')" :style="progressStyle" v-bind="getPTOptions('value')">
<div v-if="value != null && value !== 0 && showValue" :class="cx('label')" v-bind="getPTOptions('label')">
<div role="progressbar" :class="cx('root')" aria-valuemin="0" :aria-valuenow="value" aria-valuemax="100" v-bind="ptm('root')">
<div v-if="determinate" :class="cx('value')" :style="progressStyle" v-bind="ptm('value')">
<div v-if="value != null && value !== 0 && showValue" :class="cx('label')" v-bind="ptm('label')">
<slot>{{ value + '%' }}</slot>
</div>
</div>
<div v-if="indeterminate" :class="cx('container')" v-bind="getPTOptions('container')">
<div :class="cx('value')" v-bind="getPTOptions('value')"></div>
<div v-if="indeterminate" :class="cx('container')" v-bind="ptm('container')">
<div :class="cx('value')" v-bind="ptm('value')"></div>
</div>
</div>
</template>
@ -17,16 +17,6 @@ import BaseProgressBar from './BaseProgressBar.vue';
export default {
name: 'ProgressBar',
extends: BaseProgressBar,
methods: {
getPTOptions(key) {
return this.ptm(key, {
parent: {
props: this.$parent?.$props,
state: this.$parent?.$data
}
});
}
},
computed: {
progressStyle() {
return {