<template>
    <nut-tabs style="height:100vh" v-model="val" title-scroll name="tab4value" direction="vertical">
        <nut-tab-pane v-for="item in list" :title="(item.name as string)"> Tab {{ item.name }}</nut-tab-pane>
    </nut-tabs>
</template>

<script lang="ts" setup>
import Taro from '@tarojs/taro'
import {ref} from 'vue'
import {getMerTypeList} from '@/api/user'

const val = ref('0')

interface List {
    ID?: number
    name?: string
}

const list = ref<Array<List>>([])

Taro.useLoad(() => {
    getGoodsType()
    console.log('load')
})

Taro.useDidShow(() => {
})

// 获取商品分类
const getGoodsType = async () => {
    const res = await getMerTypeList()
    list.value = res.data.class
}

</script>

<style lang="scss">

</style>
