52 lines
997 B
Vue
52 lines
997 B
Vue
<template>
|
|
<view class="content">
|
|
<!-- 搜索 -->
|
|
<search @handleSearch="handleSearch"></search>
|
|
<!-- 食谱 -->
|
|
<view class="itemTag footbox">
|
|
<view class="tab_list">
|
|
<view class="tabbar" v-for="(ite,ind) in list" :key="ind" @click="handleToggle(ind)">
|
|
<view :class="[index ==ind?'active':'']">{{ite.name}}</view>
|
|
</view>
|
|
</view>
|
|
<foodList :title="type"></foodList>
|
|
</view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import search from "../../components/search.vue"
|
|
import foodList from "../../components/list.vue"
|
|
export default {
|
|
data() {
|
|
return {
|
|
type: ""
|
|
}
|
|
},
|
|
components: {
|
|
search,
|
|
foodList
|
|
},
|
|
onLoad(option) {
|
|
let that = this
|
|
console.log("列表", option)
|
|
that.type = option.pageName
|
|
uni.setNavigationBarTitle({
|
|
title: that.type
|
|
});
|
|
},
|
|
methods: {
|
|
// 点赞
|
|
handleZan() {},
|
|
// 搜索
|
|
handleSearch(ite) {
|
|
console.log("我的菜谱搜索", ite)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
</style>
|