摘要: ``` <!DOCTYPE html .router link active { color: green; font size: 30px; } .box { border: 1px solid black; } nav { border: 1px solid red; } <! router l 阅读全文
posted @ 2019-05-28 23:19 193557749 阅读(208) 评论(0) 推荐(0) 编辑
摘要: ``` <!DOCTYPE html Document <! 1. 导航 首页 音乐 <! 2. 容器 // 3. 提供组件 const Home = { template: }; const Detail = { // 渲染动态路由标识id的值 // this.$router.push() // 阅读全文
posted @ 2019-05-28 23:14 193557749 阅读(186) 评论(0) 推荐(0) 编辑
摘要: ``` <!DOCTYPE html Document .router link exact active { color: red; } <! 1.设置链接 主页 热点 关于我们 <! 需求: 不想通过router link标签改标识 使用js方法改标识 我是第四个导航 <! 2. 提供容器:将来 阅读全文
posted @ 2019-05-28 23:11 193557749 阅读(181) 评论(0) 推荐(0) 编辑
摘要: ``` <!DOCTYPE html Document <! 1.设置链接 主页 <! 需求:点击top 渲染home组件 热点 关于我们 <! 2. 提供容器:将来渲染组件 // 3. 提供要渲染的组件选项(对象) const Home = { template: }; const Top = { 阅读全文
posted @ 2019-05-28 23:07 193557749 阅读(289) 评论(0) 推荐(0) 编辑
摘要: ``` <!DOCTYPE html Document <! 1.设置链接 <! to值 字符串 主页 <! to值 变量 热点 <! to值 可以是{path等} 关于我们 <! to值 可以是{name等} AAA <! to值 可以是{params:{参数名:值}} <! <router li 阅读全文
posted @ 2019-05-28 23:02 193557749 阅读(3167) 评论(0) 推荐(0) 编辑
摘要: ``` <!DOCTYPE html Document <! 1.设置链接 主页 <! 目的: 点击三个不同的router link 渲染同一个组件 点击 篮球/足球/乒乓球按钮 渲染Ball组件 足球 篮球 乒乓球 <! 2. 提供容器:将来渲染组件 // 3. 提供要渲染的组件选项(对象) co 阅读全文
posted @ 2019-05-28 22:58 193557749 阅读(130) 评论(0) 推荐(0) 编辑
摘要: ``` <!DOCTYPE html Document <! 1.设置链接 主页 热点 关于我们 <! 2. 提供容器:将来渲染组件 // 3. 提供要渲染的组件选项(对象) const Home = { template: }; const Top = { template: }; const A 阅读全文
posted @ 2019-05-28 22:55 193557749 阅读(176) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2019-05-28 22:54 193557749 阅读(0) 评论(0) 推荐(0) 编辑
摘要: ``` Document AAA BBB CCC DDD ``` ![](https://img2018.cnblogs.com/blog/1490002/201905/149000... 阅读全文
posted @ 2019-05-28 22:53 193557749 阅读(165) 评论(0) 推荐(0) 编辑
摘要: ``` <!DOCTYPE html Document <! 2. 使用组件 赋值 Vue.component("com a", { template: ` <div 我是来自父组件的数据 {{a}} </div `, // 1. 定义一个属性(变量) 此时没值 props: ["a"], meth 阅读全文
posted @ 2019-05-28 22:51 193557749 阅读(173) 评论(0) 推荐(0) 编辑
摘要: ``` <!DOCTYPE html Document <! 渲染各个组件的容器 <! <div id="abc" </div <! <child a msgchilda="str" </child a <! <child a :msgchilda="str" </child a // 需求: 想把 阅读全文
posted @ 2019-05-28 22:47 193557749 阅读(236) 评论(0) 推荐(0) 编辑
摘要: ``` <!DOCTYPE html Document <! 渲染各个组件的容器 // 需求: 想把根(父)组件的数据data中的某个数据msg传递给子组件child a去使用({{数据}}) Vue.component("child a", { template: `<div 我是子组件 {{co 阅读全文
posted @ 2019-05-28 22:46 193557749 阅读(152) 评论(0) 推荐(0) 编辑
摘要: ``` <!DOCTYPE html Document <! 这个位置是组件的视图内容< 选项template com a child c parent a Vue.component("child a", { template: }); Vue.component("child b", { tem 阅读全文
posted @ 2019-05-28 22:42 193557749 阅读(126) 评论(0) 推荐(0) 编辑
摘要: ``` <!DOCTYPE html Document new Vue({ el: ' app', data: { }, // 选项 // 1. 定义 // 2. 组件选项(template/data/methods等(除了el)) // 3. 使用 自定义标签名 components: { // 阅读全文
posted @ 2019-05-28 22:38 193557749 阅读(135) 评论(0) 推荐(0) 编辑
摘要: ``` Document 首页 用户管理 权限管理 商品管理 ``` ![](https://img2018.cnblogs.com/blog/1490002/201905/1490002-20190... 阅读全文
posted @ 2019-05-28 22:33 193557749 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 需要安装包: moment.js axios.js vue.js 1.把db.json数据复制到db.json数据里面,开启db.json服务器 2.把html代码复制到html里面 html内容 阅读全文
posted @ 2019-05-28 22:28 193557749 阅读(1051) 评论(0) 推荐(0) 编辑
摘要: ``` <!DOCTYPE html Document // 两类+三步 // 全局 // 1. 定义 (组件名,组件选项所在对象) // 注意: 组件名命名, abc childA child a // 2. 写选项 // 注意: template 一个根元素 + data的值必须return{} 阅读全文
posted @ 2019-05-28 22:24 193557749 阅读(170) 评论(0) 推荐(0) 编辑
摘要: ``` <!DOCTYPE html Document // 封装 组件 // Vue.filter(); // Vue.directive(); // newVue Vue.component('span d', { template: ` <div <span {{count}}</span < 阅读全文
posted @ 2019-05-28 22:23 193557749 阅读(94) 评论(0) 推荐(0) 编辑
摘要: ``` Document {{msg}} ``` 阅读全文
posted @ 2019-05-28 22:18 193557749 阅读(212) 评论(0) 推荐(0) 编辑
摘要: ``` Document ``` 阅读全文
posted @ 2019-05-28 22:16 193557749 阅读(414) 评论(0) 推荐(0) 编辑