heyujie
2021-07-30 4b43bfb3f6f499f480712dd29bef52275466afd6
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"
                >&#xe6f1;</span
              >
              <span class="icon iconfont bad" v-else>&#xe6e6;</span>
              <span class="icon iconfont bad" v-if="!item.lower_up&&item.active">&#xe6e6;</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 {