In the presence of a webpack.base.conf.js resolve the property: where alias alias meaning corresponding file may be picked up in an alias that
resolve: {
extensions:['.js', '.vue', '.json'],
alias: {
'@':resolve('src'),
'assets':resolve('src/assets'),
'components':resolve('src/components'),
'router':resolve('src/router'),
'views':resolve('src/views')
}
}
When referring to the use of import method, you can directly use an alias:
import TabBar from 'components / Tabs / TabBar.vue'
When reference in the picture: the need to use an alias cited before ~
<img src="~assets/img/tabbar/home.svg">