i
This commit is contained in:
@@ -1,13 +1,36 @@
|
||||
<template>
|
||||
<nut-tabs style="height:100vh" v-model="val" title-scroll name="tab4value" direction="vertical">
|
||||
<nut-tab-pane v-for="item in 10" :title="'Tab '+ item"> Tab {{ item }}</nut-tab-pane>
|
||||
</nut-tabs>
|
||||
<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 {ref, onMounted} from 'vue';
|
||||
import Taro from '@tarojs/taro'
|
||||
import {ref} from 'vue'
|
||||
import {getMerTypeList} from '@/api/user'
|
||||
|
||||
const val = ref('0');
|
||||
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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user