写了个batman-active-panel组件

为了减少父级html的影响,需要把组件的$el放在body下

在mounted放法中写:

 

this.$nextTick(() => {
      const body = document.querySelector("body");
      if (body.append) {
        body.append(this.$el);
      } else {
        body.appendChild(this.$el);
      }
    });

  

其中做了兼容IE11

 

相关文章:

  • 2022-12-23
  • 2021-04-15
  • 2022-03-04
  • 2022-03-06
  • 2022-01-05
  • 2021-08-12
  • 2022-12-23
  • 2021-08-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-26
相关资源
相似解决方案