This commit is contained in:
2023-09-06 03:49:21 +08:00
parent 8b5de95140
commit b6ca53f70e
39 changed files with 2146 additions and 679 deletions

View File

@@ -1,39 +1,43 @@
<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
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'
import Taro from "@tarojs/taro";
import { ref } from "vue";
import { getCategoryList } from "@/api/goods";
const val = ref('0')
const val = ref("0");
interface List {
ID?: number
name?: string
ID?: number;
name?: string;
}
const list = ref<Array<List>>([])
const list = ref<Array<List>>([]);
Taro.useLoad(() => {
getGoodsType()
console.log('load')
})
getGoodsType();
console.log("load");
});
Taro.useDidShow(() => {
})
Taro.useDidShow(() => {});
// 获取商品分类
const getGoodsType = async () => {
const res = await getMerTypeList()
list.value = res.data.class
}
const res = await getCategoryList();
list.value = res.data.data;
};
</script>
<style lang="scss">
</style>
<style lang="scss"></style>