Vue
<script setup>
import { ref } from 'vue';
const gridData = ref(generateData());
function generateData() {
const countries = ['대한민국', '미국', '일본', '독일', '프랑스'];
return countries.map((country, i) => ({
id: i + 1,
country,
sales: Math.round(Math.random() * 10000),
expenses: Math.round(Math.random() * 5000),
active: i % 2 === 0
}));
}
</script>