vol-grid 宫格

参数属性

属性说明类型默认
data数据,每项 { title, value, unit }Array[]
col列数Number3
align文字对齐:left、centerStringleft
background背景色String#fff

事件:@click,参数为当前项。

<template>
	<vol-grid :data="gridData" align="center" :col="4"></vol-grid>
	<vol-grid :data="gridData" align="left" :col="2"></vol-grid>
	<vol-grid :data="gridData" align="center" :col="4" background="#eee"></vol-grid>
</template>
<script setup>
import { ref } from 'vue'
const gridData = ref([
	{ title: '原料检验', value: 2000 },
	{ title: '外观检查', value: 1500 },
	{ title: '功能测试', value: 2600 },
	{ title: '耐久性测试', value: 1800 }
])
</script>
Last Updated 2026/10/23 15:32:21
ON THIS PAGE