const getImport = (file, path) => require(`@/${path || 'views'}/` + file + '.vue').default
{path: '/getAddressList', name: 'getAddressList', component: getImport('configCenter/formList')}, {path: '/getAddressDetail', name: 'getAddressDetail', component: getImport('configCenter/getAddress')}
这么写单纯的是为了不用每次都import那个路径,原理就看看require和import的区别就是了,记住看.default