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')
      }
    }
  },
原文地址:https://www.cnblogs.com/steven2020/p/13304543.html