primevue-mirror/apps/showcase/doc/metergroup/VerticalDoc.vue

70 lines
2.0 KiB
Vue
Raw Normal View History

2024-01-11 13:46:09 +00:00
<template>
<DocSectionText v-bind="$attrs">
2024-02-04 16:11:37 +00:00
<p>Layout of the MeterGroup is configured with the <i>orientation</i> property that accepts either <i>horizontal</i> or <i>vertical</i> as available options.</p>
2024-01-11 13:46:09 +00:00
</DocSectionText>
2024-05-20 12:14:38 +00:00
<div class="card flex justify-center" style="height: 360px">
2024-02-04 16:11:37 +00:00
<MeterGroup :value="value" orientation="vertical" labelOrientation="vertical" />
2024-01-11 13:46:09 +00:00
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
value: [
2024-02-04 16:11:37 +00:00
{ label: 'Apps', color: '#34d399', value: 24 },
{ label: 'Messages', color: '#fbbf24', value: 16 },
{ label: 'Media', color: '#60a5fa', value: 24 },
{ label: 'System', color: '#c084fc', value: 12 }
2024-01-11 13:46:09 +00:00
],
code: {
basic: `
2024-02-04 16:11:37 +00:00
<MeterGroup :value="value" orientation="vertical" labelOrientation="vertical" />
2024-01-11 13:46:09 +00:00
`,
options: `
<template>
2024-05-20 12:14:38 +00:00
<div class="card flex justify-center" style="height: 360px">
2024-02-04 16:11:37 +00:00
<MeterGroup :value="value" orientation="vertical" labelOrientation="vertical" />
2024-01-11 13:46:09 +00:00
</div>
</template>
<script>
export default {
data() {
return {
value: [
2024-02-04 16:11:37 +00:00
{ label: 'Apps', color: '#34d399', value: 24 },
{ label: 'Messages', color: '#fbbf24', value: 16 },
{ label: 'Media', color: '#60a5fa', value: 24 },
{ label: 'System', color: '#c084fc', value: 12 }
2024-01-11 13:46:09 +00:00
]
};
}
};
<\/script>
`,
composition: `
<template>
2024-05-20 12:14:38 +00:00
<div class="card flex justify-center" style="height: 360px">
2024-02-04 16:11:37 +00:00
<MeterGroup :value="value" orientation="vertical" labelOrientation="vertical" />
2024-01-11 13:46:09 +00:00
</div>
</template>
<script setup>
import { ref } from "vue";
const value = ref([
2024-02-04 16:11:37 +00:00
{ label: 'Apps', color: '#34d399', value: 24 },
{ label: 'Messages', color: '#fbbf24', value: 16 },
{ label: 'Media', color: '#60a5fa', value: 24 },
{ label: 'System', color: '#c084fc', value: 12 }
2024-01-11 13:46:09 +00:00
]);
<\/script>
`
}
};
}
};
</script>