Home/Article/website/nuxt3 分类名嵌套分类下内容的循环例子
nuxt3
<template>
根地址<hr/>
<!-- {{ result }} www -->
<div v-for="(group, categary) in result" :key="categary">
<div>{{categary}}</div>
<div>
<div v-for="(item, iskey) in group" :key="iskey">
{{item.pic}}
</div>
</div>
</div>
</template>
<script lang="ts" setup>
useHead({
title:'one',
meta: [
{ hid: 'keywords', name: 'keywords', content: '前端, keywords' }
]
})
const { articleApi } = useApi()
const res = await articleApi.getFangyimall()
const result = res.data.danaoshi_queryRaw
console.log("----------------------res------------------")
console.log(result)
console.log("----------------------end------------------")
</script>
上一篇: nuxt3 setup语法糖中怎么用以前的data下一篇: nuxt3 setup ts 实现锚点跳转及滚动监听好用例子