review:【antd】【iot】首页统计

This commit is contained in:
YunaiV
2025-11-21 09:17:19 +08:00
parent 23b87b13c4
commit c38d746c25
8 changed files with 29 additions and 10 deletions

View File

@@ -28,13 +28,17 @@ const hasData = computed(() => {
/** 初始化图表 */
function initChart() {
if (!hasData.value) return;
if (!hasData.value) {
return;
}
// TODO @haohaoawait nextTick();
nextTick(() => {
const data = Object.entries(
props.statsData.productCategoryDeviceCounts,
).map(([name, value]) => ({ name, value }));
// TODO @haohao看看 chart-options 怎么提取出去,类似 apps/web-antd/src/views/mall/statistics/member/modules/area-chart-options.ts 写法
renderEcharts({
tooltip: {
trigger: 'item',
@@ -132,6 +136,7 @@ onMounted(() => {
</template>
<style scoped>
/** TODO tindwind */
.chart-card {
height: 100%;
}