侧栏背景更换

<el-dropdown-menu slot="dropdown">
                <el-dropdown-item command="1">更换背景</el-dropdown-item>
                <el-dropdown-item command="2">退出登录</el-dropdown-item>
              </el-dropdown-menu>
。。。
data() {
    return {
      imgSrc: require("../assets/bar2.png"),
      imgSrc2: require("../assets/bar6.png"),
。。。
selectSide(command) {
      switch (command) {
        case "1":
          this.sideBarImg = !this.sideBarImg;
          this.$router.push("/loginRecord");
          break;
        case "2":
          this.handleOut();
          break;
        default:
          return;
      }
    },


.sideBg {
  height: 100%;
  z-index: -1;
  position: absolute;
}
.sideC {
  z-index: 1;
  position: absolute;
}

 

posted @ 2021-08-16 09:37  乐盘游  阅读(61)  评论(0编辑  收藏  举报