
现在的方式
import Test from './children/test.vue' .... { path: '', name: 'emptyView123123123123', component: C2, children: [ { path: '', name: 'test', component: Test } ] } 想要实现的方式
//http 请求后端获取数据 pagesource = getpagesouce('test') ... children: [ { path: '', name: 'test', component: Test } ] 或者使用 pagesource new vue 的方式
1 luckyx 2023-03-24 14:59:29 +08:00 compOnent= () => import('./children/test.vue') 其实不太明白你问什么 |
2 luckyx 2023-03-24 15:00:17 +08:00 *typo above component: () => import('./children/test.vue') |
3 ramcasky 2023-03-24 15:54:38 +08:00 你想问的是 ssr 后端渲染吧?看看 next 或者 nuxt |
4 dongtingyue OP @luckyx 就是页面源码是存数据库,前端要如何通过接口获取到后加载路由对应的页面 |
5 dongtingyue OP @ramcasky 不在后端渲染。只是页面是编辑后存数据库。 |
7 yuekcc 2023-03-24 22:32:20 +08:00 |