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

55 lines
1.2 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>MeterGroup requires a <i>value</i> as the data to display where each item in the collection should be a type of <i>MeterItem</i>.</p>
2024-01-11 13:46:09 +00:00
</DocSectionText>
<div class="card">
<MeterGroup :value="value" />
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
2024-04-01 08:46:59 +00:00
value: [{ label: 'Space used', value: 15, color: 'var(--p-primary-color)' }],
2024-01-11 13:46:09 +00:00
code: {
basic: `
<MeterGroup :value="value" />
`,
options: `
<template>
<div class="card">
<MeterGroup :value="value" />
</div>
</template>
<script>
export default {
data() {
return {
2024-04-01 08:46:59 +00:00
value: [{ label: 'Space used', value: 15, color: 'var(--p-primary-color)' }],
2024-01-11 13:46:09 +00:00
};
}
};
<\/script>
`,
composition: `
<template>
<div class="card">
<MeterGroup :value="value" />
</div>
</template>
<script setup>
import { ref } from "vue";
2024-04-01 08:46:59 +00:00
const value = ref([{ label: 'Space used', value: 15, color: 'var(--p-primary-color)' }]);
2024-01-11 13:46:09 +00:00
<\/script>
`
}
};
}
};
</script>