在tsconfig.json文件添加这几行代码即可
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
"@typings/*": ["src/typings/*"],
"@components/*": ["src/components/*"],
"@style/*": ["src/style/*"],
"@utils/*": ["src/utils/*"],
"@router/*": ["src/router/*"],
"@store/*": ["src/store/*"],
}