Commit b7e27080 authored by 黄奎's avatar 黄奎

增加下拉

parent 84d1071f
This diff is collapsed.
<template>
<view class="side-box" :style="{ background: bg }">
<view>
<view
class="item"
:style="{
color: !currentIndex2 ? textColor : activeColor,
'border-color': !currentIndex2 ? 'transparent' : activeColor,
'border-bottom': border ? '1rpx solid #eee' : 'none',
'text-align': textAlign,
'background':currentIndex==i?'#FFF':''
}"
@click="change2()"
> 全部 </view
>
</view>
<view
v-for="(x, i) in list"
:key="i"
......@@ -50,11 +64,12 @@ export default {
},
active: {
type: Number,
default: 0,
default: -1,
},
},
data() {
return {
currentIndex2:true,
currentIndex:this.active
};
},
......@@ -73,7 +88,14 @@ export default {
methods: {
change(i) {
this.$emit("change", i);
this.currentIndex2 = false
},
change2() {
this.$emit("change2", 0);
this.currentIndex2 = !this.currentIndex2
this.currentIndex = -1
// console.log('4555555555',this.currentIndex)
},
},
};
</script>
......
......@@ -21,10 +21,16 @@
:h="(navHeight+54)"
></style3>
<style4
v-if="cstyle.Type == 1 && cstyle.Style == 4"
v-if="cstyle.Type == 1 && cstyle.Style == 4 &&u.TenantId!=27"
:d="types"
:h="(navHeight+54)"
></style4>
<!-- 新增进阶教育id27 -->
<style44
v-if="cstyle.Type == 1 && cstyle.Style == 4&&u.TenantId==27"
:d="types"
:h="(navHeight+54)"
></style44>
<style5
v-if="cstyle.Type == 2 && cstyle.Style == 1"
:d="types"
......@@ -72,6 +78,7 @@ import style1 from "@/components/cats/style1";
import style2 from "@/components/cats/style2";
import style3 from "@/components/cats/style3";
import style4 from "@/components/cats/style4";
import style44 from "@/components/cats/style44";//进阶教育id为27
import style5 from "@/components/cats/style5";
import style6 from "@/components/cats/style6";
import style7 from "@/components/cats/style7";
......@@ -83,6 +90,7 @@ import style11 from "@/components/cats/style11";
export default {
data() {
return {
u:{},
cat_style:2,
isloading: true,
pageTitle: "分类",
......@@ -112,6 +120,7 @@ export default {
style2,
style3,
style4,
style44,
style5,
style6,
style7,
......@@ -121,6 +130,7 @@ export default {
style11,
},
onLoad(option) {
this.u = uni.getStorageSync('mall_UserInfo');
this.navHeight = this.$navHeight - 2;
// this.cstyle = uni.getStorageSync("basedata")
// ? uni.getStorageSync("basedata").cat_style
......
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