上一页 1 2 3 4 5 6 7 ··· 9 下一页
2017年12月5日
摘要: vue-router vue-resource vuex 阅读全文
posted @ 2017-12-05 14:18 不了无明 阅读(210) 评论(0) 推荐(0) 编辑
2017年10月20日
摘要: export default vuex.Store{ State, //数据库。 getters,// 是我们从数据库里取数据的 API,getters 得是一个”纯函数“ actions,//处理数据 Mutations, //把数据存入数据库的 API,用来修改state 的。 } getters: // 获取控制变量 ctrl export function g... 阅读全文
posted @ 2017-10-20 16:11 不了无明 阅读(146) 评论(0) 推荐(0) 编辑
2017年10月18日
摘要: 单个路由的过渡 基于路由的动态过渡 阅读全文
posted @ 2017-10-18 13:45 不了无明 阅读(324) 评论(0) 推荐(0) 编辑
2017年10月11日
摘要: //meta字段,一个路由匹配到的所有路由记录会暴露为 $route 对象(还有在导航守卫中的路有对象)的 $route.matched 数组。 const router = new VueRouter({ routes: [ { path: '/foo', component: Foo, children: [ { ... 阅读全文
posted @ 2017-10-11 15:23 不了无明 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 导航守卫主要用来通过跳转或取消的方式守卫导航 全局守卫,使用 router.beforeEach 注册一个全局前置守卫 const router = new VueRouter({ ... }) router.beforeEach((to, from, next) => { // to: Route 阅读全文
posted @ 2017-10-11 11:49 不了无明 阅读(569) 评论(0) 推荐(0) 编辑
摘要: vue-router 默认 hash 模式,页面不会重新加载 用路由的 history 模式,利用 history.pushState API 来完成 URL 跳转而无须重新加载页面。 需要服务端支持,服务端增加一个覆盖所有情况的候选资源:如果 URL 匹配不到任何静态资源,则应该返回同一个 ind 阅读全文
posted @ 2017-10-11 10:04 不了无明 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 在组件中使用$route会使之与其对应路由形成高度耦合,使用props解耦 阅读全文
posted @ 2017-10-11 09:00 不了无明 阅读(231) 评论(0) 推荐(0) 编辑
2017年10月10日
摘要: 需要的文件: angular.js ng-table.js ng-table.css bootrasp.css 注入依赖: 为ng-table设置数据 为 table 添加 ng-table 属性 阅读全文
posted @ 2017-10-10 17:12 不了无明 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 别名 阅读全文
posted @ 2017-10-10 17:00 不了无明 阅读(200) 评论(0) 推荐(0) 编辑
摘要: //展示多个视图 const router = new VueRouter({ routes: [ { path: '/', components: { default: Foo, a: Bar } } ] }) 阅读全文
posted @ 2017-10-10 13:23 不了无明 阅读(627) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 9 下一页