primevue-mirror/doc/metergroup/VerticalDoc.vue

67 lines
1.7 KiB
Vue
Raw Normal View History

2024-01-11 13:46:09 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Layout of the MeterGroup is configured with the <i>orientation</i> property that accepts <i>horizontal</i> and <i>vertical</i> as options.</p>
</DocSectionText>
<div class="card flex" style="height: 350px">
<MeterGroup :value="value" orientation="vertical" />
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
value: [
{ color: '#4ADE81', label: 'E-mails', value: 17 },
{ color: '#FB923C', label: 'Messages', value: 36 },
{ color: '#C084FC', label: 'Other', value: 24 }
],
code: {
basic: `
<MeterGroup :value="value" orientation="vertical" />
`,
options: `
<template>
<div class="card flex" style="height: 350px">
<MeterGroup :value="value" orientation="vertical" />
</div>
</template>
<script>
export default {
data() {
return {
value: [
{ color: '#4ADE81', label: 'E-mails', value: 17 },
{ color: '#FB923C', label: 'Messages', value: 36 },
{ color: '#C084FC', label: 'Other', value: 24 }
]
};
}
};
<\/script>
`,
composition: `
<template>
<div class="card flex" style="height: 350px">
<MeterGroup :value="value" orientation="vertical" />
</div>
</template>
<script setup>
import { ref } from "vue";
const value = ref([
{ color: '#4ADE81', label: 'E-mails', value: 17 },
{ color: '#FB923C', label: 'Messages', value: 36 },
{ color: '#C084FC', label: 'Other', value: 24 }
]);
<\/script>
`
}
};
}
};
</script>