primevue-mirror/doc/metergroup/VerticalDoc.vue

67 lines
1.8 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>
2024-01-12 09:53:18 +00:00
<div class="card flex justify-content-center" style="height: 350px">
2024-01-11 13:46:09 +00:00
<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>
2024-01-12 09:53:18 +00:00
<div class="card flex justify-content-center" style="height: 350px">
2024-01-11 13:46:09 +00:00
<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>
2024-01-12 09:53:18 +00:00
<div class="card flex justify-content-center" style="height: 350px">
2024-01-11 13:46:09 +00:00
<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>