<script setup lang="ts">
const a: number[] = [1, 23, 4, 532, 5, 100];
</script>
<template>
<div>
<h1>{
{ a.map(v => ({num: v})) }}</h1>
</div>
</template>
ts 使用数组 拼接成对象展示
猜你喜欢
转载自blog.csdn.net/mp624183768/article/details/128597786
今日推荐
周排行