绝对路径

axios.get('/static/modelplat/menuCon.json').then(res => {
                    this.menuCon = res.data.menuCon;

                    // 初始化数据
                    this.sceneModelCon = this.menuCon[0].modelArr;
            }).catch(() => {
        this.$message({
          type: 'info',
          message: '请求数据出错'
        });
            });

相对路径:

axios.get('./static/modelplat/menuCon.json').then(res => {
                    this.menuCon = res.data.menuCon;

                    // 初始化数据
                    this.sceneModelCon = this.menuCon[0].modelArr;
            }).catch(() => {
        this.$message({
          type: 'info',
          message: '请求数据出错'
        });
            });
axios.get('static/modelplat/menuCon.json').then(res => {
                    this.menuCon = res.data.menuCon;

                    // 初始化数据
                    this.sceneModelCon = this.menuCon[0].modelArr;
            }).catch(() => {
        this.$message({
          type: 'info',
          message: '请求数据出错'
        });
            });

 

相关文章:

  • 2022-12-23
  • 2021-11-27
  • 2021-09-21
  • 2021-09-14
  • 2019-10-29
猜你喜欢
  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2022-02-03
  • 2021-11-22
相关资源
相似解决方案