uni-app-applet/components/cate-items/cate-tu.vue

56 lines
1.1 KiB
Vue
Raw Normal View History

2022-03-11 11:06:18 +00:00
<template>
<view v-if="list.lenght!=0">
<view v-for="(item,index) in list" :key="index">
<!-- 一级title -->
<view class="disjbac mar-x30 mar-s10">
<view class="fon34 bold col3">{{item.title}}</view>
<image class="mar-y50" @tap="delSearch" v-if="item.src!=''" :src="item.src" style="width: 30rpx;height: 30rpx;" mode="heightFix"></image>
</view>
<view class="fon24 col6 disac fw">
<!-- 二级title -->
<view @tap="choosetwo(index,indexo)"
v-for="(itemo,indexo) in item.list" :key="indexo"
class="radius10 mar-y20 flexs mar-x20 cate-tu-item">{{itemo.content}}</view>
</view>
</view>
</view>
</template>
<script>
export default {
name:"cate-tu",
props:{
list:{
type:Array,
default:function(){
return []
}
},
isDetail:{
type:Boolean,
default:false
}
},
data() {
return {
};
},
methods:{
choosetwo(e1,e2){
// console.log('一级索引:',e1);
// console.log('二级索引:',e2);
// console.log(this.list[e1].list[e2].content);
},
delSearch(){
// this.list = []
this.$emit('delev')
}
}
}
</script>
<style>
</style>