vue路径写法

1 /* Layout */
2 import Layout from '@/layout'

这个@的代表src,意思就是在src路径下找文件。

也可以在vue.config.js文件里配置,找到下面这段话

  configureWebpack: {
    // provide the app's title in webpack's name field, so that
    // it can be accessed in index.html to inject the correct title.
    name: name,
    resolve: {
      alias: {
        '@': resolve('src')
      }
    }
  },

 

posted @ 2020-07-15 11:30  ok代码我改了  阅读(909)  评论(0编辑  收藏  举报