上一页 1 2 3 4 5 6 7 8 ··· 12 下一页
摘要: https://blog.csdn.net/sherry_chan/article/details/79055211 阅读全文
posted @ 2018-05-31 10:41 斯丢皮德曼 阅读(113) 评论(0) 推荐(0) 编辑
摘要: src/vuex/store.js 组件里面使用引入store.js,注意路径 import store from 'store.js' 然后在使用的组件内data(){}同级放入store 三大常用的方法state,mutations,getters 重要的一步,当把state,mutation, 阅读全文
posted @ 2018-05-30 21:27 斯丢皮德曼 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 路由里边的 router/index.js path:'/detail/:id' 动态id 列表页渲染时: :to="'/detail/'+item.id" ===>id是指请求文章列表的id,可以是aid,bid等等 请求列表接口:http://www.phonegap100.com/appapi.php?a=getPortalList&catid=20&page=1 点击进入路由... 阅读全文
posted @ 2018-05-29 21:04 斯丢皮德曼 阅读(1654) 评论(0) 推荐(0) 编辑
摘要: 这是路由之间的跳转,传递值最好采用传参,而不是用$emit和$on,不起作用 如果实在一个页面中的兄弟组件,可以使用$emit和$on 中间件,eventBus.js 放在components目录下面 图片路径 static/img 模拟数据 /static/data.json { "status" 阅读全文
posted @ 2018-05-29 14:33 斯丢皮德曼 阅读(371) 评论(0) 推荐(0) 编辑
摘要: 如下是面向对象的写法,更直观了 阅读全文
posted @ 2018-05-28 23:07 斯丢皮德曼 阅读(458) 评论(0) 推荐(0) 编辑
摘要: 运用的知识点包括: 路由的配置 插槽 vue的过渡动画 路由重定向 router/index.js里面配置路由 app.vue home.vue <button v-for="item in btnType" :class="item.class" @click="modalStatus=false 阅读全文
posted @ 2018-05-28 16:27 斯丢皮德曼 阅读(5476) 评论(0) 推荐(0) 编辑
摘要: src/model/storage.js var storage={ set(key,value){ localStorage.setItem(key,JSON.stringify(value)); }, get(key){ return JSON.parse(localStorage.getItem(key)); }, remove(){ localStorage.remov... 阅读全文
posted @ 2018-05-27 14:51 斯丢皮德曼 阅读(2645) 评论(0) 推荐(0) 编辑
摘要: //main.js中 //引入你mock.js文件 require('./mock.js') //封装api请求 //src/axios/api.js import axios from 'axios' import vue from 'vue' axios.defaults.headers.post['Content-Type'] = 'application/x-www-f... 阅读全文
posted @ 2018-05-27 13:14 斯丢皮德曼 阅读(2950) 评论(0) 推荐(0) 编辑
摘要: .tab border-1px{red} minxin border-1px(&color) position:relative &::after display:block position:absolute left:0 bottom:0 width:100% border-top:1px so 阅读全文
posted @ 2018-05-26 18:30 斯丢皮德曼 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 使用本地mock数据模拟真实数据配置 static/data.json dev.server.js中 var app=express();之后添加以下代码, var appData=require('../data.json');var seller=appData.seller;var goods 阅读全文
posted @ 2018-05-26 17:21 斯丢皮德曼 阅读(496) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 12 下一页