zoukankan      html  css  js  c++  java
  • 相对路径 绝对路径

    绝对路径

    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: '请求数据出错'
            });
                });
  • 相关阅读:
    animation循环滚动
    <canvas>简单学习
    月末总结
    回顾-总结(2)
    初识正则
    学习中小项目遇到事
    在炎热的夏天学习以提高效率
    前端存储之cookie、localStorage
    总结(1)
    jQuery
  • 原文地址:https://www.cnblogs.com/mengfangui/p/9127749.html
Copyright © 2011-2022 走看看