首页 > 其他 > 详细

Vue 哈希换histroy

时间:2019-10-15 18:14:47      阅读:100      评论:0      收藏:0      [点我收藏+]

这个需要后端支持一下 

前端配置在router下的index.js配置如下:

import Vue from ‘vue‘
import Router from ‘vue-router‘
import Info from "../components/info.vue"
import play from "../components/play.vue"
import { resolve } from ‘path‘;
Vue.use(Router)
export default new Router({
    base:‘/mobile‘,
    mode:process.env.NODE_ENV !== ‘production‘?‘hash‘:‘history‘,
    strict: process.env.NODE_ENV !== ‘production‘,
  routes: [
        {
          path: ‘/‘,
          name: ‘index‘,
          redirect:‘/Games‘
        },

 

Vue 哈希换histroy

原文:https://www.cnblogs.com/jstll/p/11679089.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!