上班
1.volte word文档的书写
收获
1.vuex module
const store= new vuex.Store({
modules:{
app,
user
}
})
2.promise
3.axios
4.angular 优点 一直更新 维护 模块化 依赖注入 typescript强类型语言 rx/js
react js html混合不太好用
vue 简单 但是没有模块化
5.插件
6.表单处理 v-model 用@:value 监听 change或者input事件
computed:{
message:{
get () {
return this.$store.state.obj.message
},
set (value) {
this.$store.commit('updateMessage', value)
}
}
}
7.热重载
import Vue from 'vue'
import Vuex from 'vuex'
import * as getters from './getters'
import * as actions from './actions'
import * as mutations from './mutations'
Vue.use(Vuex)
const state = {
count: 0,
history: []
}
const store = new Vuex.Store({
state,
getters,
actions,
mutations
})
if (module.hot) {
module.hot.accept([
'./getters',
'./actions',
'./mutations'
], () => {
store.hotUpdate({
getters: require('./getters'),
actions: require('./actions'),
mutations: require('./mutations')
})
})
}
export default store