2024-01-12 09:53:18 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
2024-02-04 16:11:37 +00:00
|
|
|
<p>Adding more items to the array displays the meters in a group.</p>
|
2024-01-12 09:53:18 +00:00
|
|
|
</DocSectionText>
|
|
|
|
<div class="card">
|
|
|
|
<MeterGroup :value="value" />
|
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
value: [
|
2024-02-04 16:11:37 +00:00
|
|
|
{ label: 'Apps', color: '#34d399', value: 16 },
|
|
|
|
{ label: 'Messages', color: '#fbbf24', value: 8 },
|
|
|
|
{ label: 'Media', color: '#60a5fa', value: 24 },
|
|
|
|
{ label: 'System', color: '#c084fc', value: 10 }
|
2024-01-12 09:53:18 +00:00
|
|
|
],
|
|
|
|
code: {
|
|
|
|
basic: `
|
|
|
|
<MeterGroup :value="value" />
|
|
|
|
`,
|
|
|
|
options: `
|
|
|
|
<template>
|
|
|
|
<div class="card">
|
|
|
|
<MeterGroup :value="value" />
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
value: [
|
2024-02-04 16:11:37 +00:00
|
|
|
{ label: 'Apps', color: '#34d399', value: 16 },
|
|
|
|
{ label: 'Messages', color: '#fbbf24', value: 8 },
|
|
|
|
{ label: 'Media', color: '#60a5fa', value: 24 },
|
|
|
|
{ label: 'System', color: '#c084fc', value: 10 }
|
2024-01-12 09:53:18 +00:00
|
|
|
]
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
<\/script>
|
|
|
|
`,
|
|
|
|
composition: `
|
|
|
|
<template>
|
|
|
|
<div class="card">
|
|
|
|
<MeterGroup :value="value" />
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref } from "vue";
|
|
|
|
|
|
|
|
const value = ref([
|
2024-02-04 16:11:37 +00:00
|
|
|
{ label: 'Apps', color: '#34d399', value: 16 },
|
|
|
|
{ label: 'Messages', color: '#fbbf24', value: 8 },
|
|
|
|
{ label: 'Media', color: '#60a5fa', value: 24 },
|
|
|
|
{ label: 'System', color: '#c084fc', value: 10 }
|
2024-01-12 09:53:18 +00:00
|
|
|
]);
|
|
|
|
<\/script>
|
|
|
|
`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|