1. 程式人生 > >相對路徑 絕對路徑

相對路徑 絕對路徑

絕對路徑 style () family arr ssa 相對 mode ios

絕對路徑

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: ‘請求數據出錯‘ }); });

相對路徑 絕對路徑