摘要: 创建一个基于 webpack 模板的新项目 全局安装 vue-cli $ npm install --global vue-cli 创建一个基于 webpack 模板的新项目 $ vue init webpack my-project 安装依赖 $ cd my-project $ npm insta 阅读全文
posted @ 2017-10-21 16:38 daidai201 阅读(1412) 评论(0) 推荐(0) 编辑
摘要: !DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta name="viewport" content="ma 阅读全文
posted @ 2017-10-21 14:40 daidai201 阅读(254) 评论(0) 推荐(0) 编辑
摘要: commit:提交可以在组件中使用 this.$store.commit('xxx') 提交 mutation,或者使用 mapMutations 辅助函数将组件中的 methods 映射为 store.commit 调用(需要在根节点注入 store)。 mounted(){ this.incre 阅读全文
posted @ 2017-10-21 10:33 daidai201 阅读(3308) 评论(0) 推荐(1) 编辑