摘要:
1. vuex文件index.js 文件内容: import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const store = new Vuex.Store({ state: { flag: true }, mutations: { 阅读全文
posted @ 2017-08-08 17:48
海底流
阅读(2200)
评论(0)
推荐(0)
摘要:
使用vue忙碌的开发了几个月的项目,最近终于得以喘息。现在把开发中的问题,总结一下。方便以后观看。 1.vue项目中何时使用v-html标签绑定数据? 当你的数据中有html元素标签,并且希望按照元素标签的样式显示的时候,这个时候就需要使用v-html来绑定数据。 例子: js代码部分: expor 阅读全文
posted @ 2017-08-08 17:47
海底流
阅读(4005)
评论(0)
推荐(0)
摘要:
1.在后缀名为.vue的文件中,直接使用import引入: <style lang="less" scoped> @import '../assets/css/index.less' </style> 或者 <style lang="scss" scoped> @import '../assets/ 阅读全文
posted @ 2017-08-08 17:46
海底流
阅读(2142)
评论(0)
推荐(0)
摘要:
看到别人的解决方法,具体是否正确,有待考证 created () { console.log(this.getStatus(this.$route.path))}, watch: { '$route' (to, from) { console.log(this.getStatus(this.$rou 阅读全文
posted @ 2017-08-08 17:44
海底流
阅读(2114)
评论(0)
推荐(0)
摘要:
今天来介绍一下vue项目的自动化构建; 1.首先确定你本地安装了nodejs,nodejs下载; 在该页面下载适合你本机的程序双击安装; 2.nodejs安装成功以后,会自动安装上npm(npm是nodejs的包管理和分发工具)。也可以安装上淘宝npm镜像,命令:npm install -g cnp 阅读全文
posted @ 2017-08-08 17:43
海底流
阅读(815)
评论(0)
推荐(0)

浙公网安备 33010602011771号