paret parameter added

This commit is contained in:
tugcekucukoglu 2023-12-05 12:49:37 +03:00
parent 65f6191ad4
commit d382e6c960
6 changed files with 110 additions and 51 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="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')">
<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')">
<slot>{{ value + '%' }}</slot>
</div>
</div>
<div v-if="indeterminate" :class="cx('container')" v-bind="ptm('container')">
<div :class="cx('value')" v-bind="ptm('value')"></div>
<div v-if="indeterminate" :class="cx('container')" v-bind="getPTOptions('container')">
<div :class="cx('value')" v-bind="getPTOptions('value')"></div>
</div>
</div>
</template>
@ -17,6 +17,16 @@ 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 {