1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +08:00

fix: Error with this.unsubscribe is not a function (#499)

This commit is contained in:
Edwin Betancourt 2020-05-18 12:16:20 -04:00 committed by GitHub
parent 603532a09f
commit d24666370f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 5 deletions

View File

@ -40,6 +40,7 @@ export default {
data() {
return {
documents: [],
unsubscribe: () => {},
search: ''
}
},
@ -89,7 +90,7 @@ export default {
})
},
subscribeChanges() {
this.$store.subscribe((mutation, state) => {
return this.$store.subscribe((mutation, state) => {
if (mutation.type === 'notifyDashboardRefresh') {
this.getPendingDocuments()
}

View File

@ -49,6 +49,7 @@ export default {
data() {
return {
recentItems: [],
unsubscribe: () => {},
isLoaded: true,
search: '',
accentRegexp: /[\u0300-\u036f]/g
@ -144,7 +145,7 @@ export default {
}
},
subscribeChanges() {
this.$store.subscribe((mutation, state) => {
return this.$store.subscribe((mutation, state) => {
if (mutation.type === 'notifyDashboardRefresh') {
this.getRecentItems()
}

View File

@ -54,6 +54,7 @@ export default {
data() {
return {
favorites: [],
unsubscribe: () => {},
isLoaded: true,
search: '',
accentRegexp: /[\u0300-\u036f]/g
@ -108,7 +109,7 @@ export default {
})
},
subscribeChanges() {
this.$store.subscribe((mutation, state) => {
return this.$store.subscribe((mutation, state) => {
if (mutation.type === 'notifyDashboardRefresh') {
this.getFavoritesList()
}

View File

@ -37,7 +37,8 @@ export default {
mixins: [formMixin],
data() {
return {
fieldsList
fieldsList,
unsubscribe: () => {}
}
},
created() {

View File

@ -96,7 +96,8 @@ export default {
},
data() {
return {
fieldsList
fieldsList,
unsubscribe: () => {}
}
},
computed: {