loulijun2021
2023-08-30 02965944b963cb9704280e33f5812aa38d436f76
src/components/RightPanel/index.vue
@@ -2,9 +2,9 @@
  <div ref="rightPanel" :class="{show:show}" class="rightPanel-container">
    <div class="rightPanel-background" />
    <div class="rightPanel">
      <div class="handle-button" :style="{'top':buttonTop+'px','background-color':theme}" @click="show=!show">
        <i :class="show?'el-icon-close':'el-icon-setting'" />
      </div>
      <!--      <div class="handle-button" :style="{'top':buttonTop+'px','background-color':theme}" @click="show=!show">-->
      <!--        <i :class="show?'el-icon-close':'el-icon-setting'" />-->
      <!--      </div>-->
      <div class="rightPanel-items">
        <slot />
      </div>
@@ -38,16 +38,16 @@
    }
  },
  watch: {
    show(value) {
      if (value && !this.clickNotClose) {
        this.addEventClick()
      }
      // if (value) {
      //   addClass(document.body, 'showRightPanel')
      // } else {
      //   removeClass(document.body, 'showRightPanel')
      // }
    }
    // show(value) {
    //   if (value && !this.clickNotClose) {
    //     this.addEventClick()
    //   }
    //   // if (value) {
    //   //   addClass(document.body, 'showRightPanel')
    //   // } else {
    //   //   removeClass(document.body, 'showRightPanel')
    //   // }
    // }
  },
  mounted() {
    this.insertToBody()