From 4b43bfb3f6f499f480712dd29bef52275466afd6 Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期五, 30 七月 2021 22:10:59 +0800 Subject: [PATCH] change all --- src/pages/settings/views/NetSettings.vue | 28 +++++++++++++++++++--------- 1 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/pages/settings/views/NetSettings.vue b/src/pages/settings/views/NetSettings.vue index 4abaf73..9b2d2cf 100644 --- a/src/pages/settings/views/NetSettings.vue +++ b/src/pages/settings/views/NetSettings.vue @@ -7,11 +7,14 @@ :class="activePage == i ? 'menu-item-active' : ''" v-for="(item, i) in tabList" :key="i" - @click="openRight(item, i)" + @click="openRight(i)" ref="leftbar" > - <span class="icon iconfont">{{ item.icon }}</span> + <div> + <span class="icon iconfont">{{ item.icon }}</span> <span class="text">{{ item.name }}</span> + </div> + <span v-if="showStatus && i==2" class="status">宸茶繛鎺�</span> </div> </div> <div class="net-right"> @@ -227,10 +230,10 @@ <div class="name">{{ "缃戠粶" + item.index }}</div> <div class="right"> - <span class="icon iconfont good" v-if="item.lower_up" + <span class="icon iconfont good" v-if="item.lower_up&&item.active" ></span > - <span class="icon iconfont bad" v-else></span> + <span class="icon iconfont bad" v-if="!item.lower_up&&item.active"></span> <el-switch v-model="item.active" active-color="rgba(61, 104, 225, 1)" @@ -238,6 +241,7 @@ ></el-switch> </div> </div> + </div> <div class="wire-detail" v-if="activePage == 2 && inWireDetail"> <div class="title">缃戠粶璁剧疆</div> @@ -436,7 +440,7 @@ } }); }, - openRight(item, i) { + openRight(i) { this.activePage = i; if (i == 1) { this.inWifiDetail = false; @@ -497,6 +501,11 @@ this.openWireDetail(item); }); }, + }, + computed: { + showStatus(){ + return this.wireArr.some((item) => item.lower_up==true) + } }, }; </script> @@ -569,15 +578,16 @@ border-radius: 8px; line-height: 50px; box-sizing: border-box; - font-size: 14px; + font-size: 14px; cursor: pointer; padding: 0 20px; display: flex; + justify-content: space-between; .icon { - margin-right: 12px; - font-size: 19px; + margin-right: 8px; + font-size: 18px; } .text { - font-size: 16px; + font-size: 15px; } } .menu-item-active { -- Gitblit v1.8.0