Browse Source

更新 index.js

master
邓宏 3 years ago
parent
commit
8a98bfe0b9
  1. 3
      src/router/index.js

3
src/router/index.js

@ -11,7 +11,8 @@ const routes = [
{
path: "/demo",
name: "demo",
component: import('@/views/demo.vue').then(e=>{ // 引入文件路径错误,会导致不能热更新
// 必须用工厂化函数方式返回,否则打包后变空白
component: ()=>import('@/views/demo.vue').then(e=>{ // 引入文件路径错误,会导致不能热更新
e.default.name='demo' //组件命名
return e
}),

Loading…
Cancel
Save