vuex add namespaced
This commit is contained in:
@@ -186,7 +186,7 @@ export default {
|
||||
setTagsViewTitle() {
|
||||
const title = this.lang === 'zh' ? '编辑文章' : 'Edit Article'
|
||||
const route = Object.assign({}, this.tempRoute, { title: `${title}-${this.postForm.id}` })
|
||||
this.$store.dispatch('updateVisitedView', route)
|
||||
this.$store.dispatch('tagsView/updateVisitedView', route)
|
||||
},
|
||||
submitForm() {
|
||||
this.postForm.display_time = parseInt(this.display_time / 1000)
|
||||
|
@@ -110,7 +110,7 @@ export default {
|
||||
},
|
||||
set(lang) {
|
||||
this.$i18n.locale = lang
|
||||
this.$store.dispatch('setLanguage', lang)
|
||||
this.$store.dispatch('app/setLanguage', lang)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@@ -136,7 +136,7 @@ export default {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
// dispatch @/store/modules/user login action
|
||||
this.$store.dispatch('login', this.loginForm).then(() => {
|
||||
this.$store.dispatch('user/login', this.loginForm).then(() => {
|
||||
this.loading = false
|
||||
this.$router.push({ path: this.redirect || '/' })
|
||||
}).catch(() => {
|
||||
|
@@ -22,7 +22,7 @@ export default {
|
||||
return this.roles[0]
|
||||
},
|
||||
set(val) {
|
||||
this.$store.dispatch('changeRoles', val).then(() => {
|
||||
this.$store.dispatch('user/changeRoles', val).then(() => {
|
||||
this.$emit('change')
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user