网站上的某些页面在部署后将不会显示

时间:2019-07-28 21:53:28

标签: vue.js heroku web-deployment

我设法通过Heroku部署了我的第一个网站,但是当我单击图标以查看另一页面(“当前项目”页面)时,该页面不会显示-我收到“无法获得CurrentProjects”。我做了一些研究,发现可能是我的Vue.Js路由器(当前处于“历史记录”模式)可能需要更改。有谁知道我在哪里可以找到有关如何进行更改的信息?我做了一些研究,没有运气。我还附上了router.js页面。任何帮助或线索表示赞赏。

import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
import CurrentProjects from './views/CurrentProjects.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/CurrentProjects',
      name: 'CurrentProjects',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/CurrentProjects.vue')
    }
  ]
})

0 个答案:

没有答案
相关问题