pull/25/head
ruibaby 2019-06-21 22:57:12 +08:00
parent 68d3015360
commit 105b454249
1 changed files with 8 additions and 5 deletions

View File

@ -8,7 +8,7 @@
<a-col :span="24"> <a-col :span="24">
<a-list <a-list
:grid="{ gutter: 12, xs: 1, sm: 1, md: 2, lg: 4, xl: 4, xxl: 4 }" :grid="{ gutter: 12, xs: 1, sm: 1, md: 2, lg: 4, xl: 4, xxl: 4 }"
:dataSource="themes" :dataSource="sortedThemes"
:loading="themeLoading" :loading="themeLoading"
> >
<a-list-item <a-list-item
@ -362,7 +362,7 @@ export default {
attachmentDrawerVisible: false, attachmentDrawerVisible: false,
themes: [], themes: [],
visible: false, visible: false,
themeConfiguration: null, themeConfiguration: [],
themeSettings: [], themeSettings: [],
themeProperty: null, themeProperty: null,
fetchingUrl: null, fetchingUrl: null,
@ -370,8 +370,11 @@ export default {
} }
}, },
computed: { computed: {
activatedTheme() { sortedThemes() {
return this.themes.find(theme => theme.activated) const data = this.themes.slice(0)
return data.sort(function(a, b) {
return b.activated - a.activated
})
} }
}, },
created() { created() {
@ -439,7 +442,7 @@ export default {
onClose() { onClose() {
this.visible = false this.visible = false
this.optionLoading = false this.optionLoading = false
this.themeConfiguration = null this.themeConfiguration = []
this.themeProperty = null this.themeProperty = null
}, },
handleChange(info) { handleChange(info) {