<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>
<script src="https://cdn.bootcss.com/vue-router/3.0.2/vue-router.js"></script>
</head>
<body>
<div id="hdcms">
<router-link to="/hdphp">HDPHP</router-link>
<router-link to="/hdcms">HDCMS</router-link>
<router-view></router-view>
</div>
<script>
const hdphp={ template:'<h1>hdphp</h1>'
}
const hdcms={ template:'<h1>hdcms</h1>'
} let routes=[
{path:'/hdphp',component:hdphp},
{path:'/hdcms',component:hdcms},
] let route = new VueRouter({ routes:routes
});
new Vue({ el:'#hdcms',
router:route
});
</script>
</body>
</html>

vue route的更多相关文章

  1. 深入浅出的webpack4构建工具--webpack4+vue+route+vuex项目构建(十七)

    阅读目录 一:vue传值方式有哪些? 二:理解使用Vuex 三:webpack4+vue+route+vuex 项目架构 回到顶部 一:vue传值方式有哪些? 在vue项目开发过程中,经常会使用组件来 ...

  2. vue route.go 载入刷新

    vue route 重新载入刷新: this.$router.go({path : 'path' , query: { param: this.param} })

  3. Vue Route Building the UI back-end framework

    Vue 的 路由就像ASP.NET MVC路径相似. 路由定义文件也是js格式的,我们都将这些文件放入到src的route文件中. 后台框架主入口: <template> <div ...

  4. Vue route的使用

    1.route.js文件 import Vue from 'vue' import Router from 'vue-router' Vue.use(Router) const router = ne ...

  5. Vue route部分简单高级用法

    一改变页面title的值   在开发时常常需要在切换到不同页面时改变浏览器的title值,那么我们就可以在定义路由的时候通过配置 meta 属性 来改变title值. import Vue from ...

  6. Vue:$route 和 $router 的区别

    参考: https://uzshare.com/view/788446 https://router.vuejs.org/zh/ $route 是“路由信息对象”,包括 path,params,has ...

  7. vue route 跳转

    index.js { path: '/grouporder/grouporderdetail/id/:id', name: '/grouporder/grouporderdetail/id/', co ...

  8. 借助 Vue 来构建单页面应用

    原文: https://github.com/MeCKodo/vue-tutorial 主题 Vue.js (1/2)Vue构建单页应用最佳实战 前言 我们将会选择使用一些vue周边的库 1.使用no ...

  9. Vue.js的库,包,资源的列表大全。

    官方资源 外部资源 社区 播客 官方示例 入门 开发工具 语法高亮 代码片段 自动补全 组件集合 库和插件 路由 ajax/数据 状态管理 校验 UI组件 i18n 示例 模板 脚手架 整合 插件/指 ...

随机推荐

  1. IDA Pro安装教程

    1.下载 http://tools.pediy.com/windows/disassemblers.htm 我们这里选择6.8版本下载 2.安装 打开下载的安装包,解压出来进入IDAPro68文件夹, ...

  2. 如何正确使用QThread

    如何正确使用QThread https://www.2cto.com/kf/201609/550462.html

  3. tensorboard使用方法

    http://blog.csdn.net/u010099080/article/details/77426577

  4. java中的线程问题(二)——线程的创建和用法。

    在java中一个类要当作线程来使用有两种方法. 1.继承Thread类,并重写run函数 2.实现Runnable接口,并重写run函数 因为java是单继承的,在某些情况下一个类可能已经继承了某个父 ...

  5. `ifdef、`else、`endif 用法

    一般情况下,Verilog HDL源程序中所有的行都参加编译.但是有时候希望对其中的一部份内容只有在条件满足的时候才进行编译,也就是对一部分内容指定编译的条件,这就是“条件编译”.有时,希望当满足条件 ...

  6. 结构体变量的 extern 使用方法,转--

    要求如下,在.h文件中这样定义: typedef struct typFNT_GB16     // 汉字字模数据结构 {     signed ];        // 汉字内码索引     ]; ...

  7. java学习笔记38(sql注入攻击及解决方法)

    上一篇我们写了jdbc工具类:JDBCUtils ,在这里我们使用该工具类来连接数据库, 在之前我们使用 Statement接口下的executeQuery(sql)方法来执行搜索语句,但是这个接口并 ...

  8. Apple IAP Subscriptions

    Apple Doc: https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/ ...

  9. 04_安装Nginx图片服务器

    一.安装Nginx 先安装Nginx,看我之前发的文章: 搭建Nginx服务器 二.安装vsftpd 再安装vsftpd组件,看我之前发的文章: Linux安装ftp组件 三.开始搭建Nginx图片服 ...

  10. 使用Jackson解析首字母大写的json字符串

    Jackson在解析返回的json字符串时始终报错,纠结很久之后才找到原因,原来是是由于json字符串中的字母都是首字母大写,导致jackson找不到相应的KEY. 在项目中经常使用从服务器获取的数据 ...