摘要: vue 绑定样式 对象语法 1.v-bind:class设置一个对象,动态切换class 2.:class可以和class共存 3. :class可以绑定数据中的对象 数组语法 4.v-bind:class设置一个数组 使用了数组就要在data中指定重命名 5.三元表达式 三元表达式 6.数组语法中 阅读全文
posted @ 2019-03-14 12:07 零度从容 阅读(17676) 评论(0) 推荐(0) 编辑
摘要: 一. 使用vuex修改state时,有两种方式: 1.可以直接使用 this.$store.state.变量 = xxx; 2.this.$store.dispatch(actionType, payload) 或者: this.$store.commit(commitType, payload) 阅读全文
posted @ 2019-03-14 12:07 零度从容 阅读(4293) 评论(0) 推荐(0) 编辑