对于这个问题,网上最多的就是:

demo请狠狠的点这里: ¥   https://download.lllomh.com/cliect/#/product/NB04197165951651

demo 请狠狠的点这里: c https://download.csdn.net/download/lllomh/37021716 

var viewer = new Viewer(document.getElementById('scenePhoto'),{
  show: function (){
			viewer.update();
		  }  
});

其实没啥用,

要先销毁,但是第一次就没执行.所以是空的

执行之前 先判断

    if(_this.viewer!=null){
          _this.viewer.destroy()
        }

加上 里面的 undate()

        _this.viewer = new Viewer(ViewerDom, {
          inline: true,
          navbar: false,
          title: false,
          button:false,
          transition:true,
          viewed() {
            _this.viewer.zoomTo(1);
          },
          show: function (){
            _this.viewer.update();
          }

        });

二次执行的时候才会生效

  watch: {
    '$route' (to, from){
      console.log(to.path)
      console.log(from.path)
      this.getArtDetailData()

    }
  },

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐