Commit b637ff0d authored by 王建威's avatar 王建威

筛选navagation

parent fbf247d1
<template>
<view class="navigation" :style="[{'height': style_setting.height*2+'rpx', 'height': style_setting.height*2+'rpx'}, style_setting.bg_show ? {'background-image': 'url('+style_setting.bg_url+')'} : null, {'background-color': style_setting.bg_color}]">
<view>
<text class="navigation_item" v-for="(item, key) in list" :key="key" v-if="item.title_show">
<text class="navigation_item" v-for="(item, key) in list" :key="key" v-if="item.goods_type ? item.goods_type === goods_type : true" >
<text class="navigation_text" :style="[{'color': item.title_color}, item.title_bg_show ? {'background-image': 'url('+item.title_bg_url+')'} : '']" @click="$jump(item.link)">
<i v-if="item.title_icon_show" class="navigation_icon" :style="{'background-image': 'url('+item.title_icon_url+')'}"></i>
<text>{{item.title}}</text>
<text v-if="item.title_show">{{item.title}}</text>
</text>
</text>
</view>
......@@ -21,8 +21,13 @@
data() {
return {
style_setting: this.wrapper_props.style_setting,
list: this.wrapper_props.list
list: this.wrapper_props.list,
goods_type: ''
}
},
mounted() {
const goods_type = getCurrentPages()[0]['$route']['query']['goods_type'] || '';
this.goods_type = goods_type;
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment