Add loading for theme list.

pull/9/head
ruibaby 6 years ago
parent 65da2bddda
commit f5050b6f21

@ -9,6 +9,7 @@
<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="themes"
:loading="themeLoading"
> >
<a-list-item <a-list-item
slot="renderItem" slot="renderItem"
@ -310,6 +311,7 @@ export default {
mixins: [mixin, mixinDevice], mixins: [mixin, mixinDevice],
data() { data() {
return { return {
themeLoading: false,
optionLoading: true, optionLoading: true,
uploadVisible: false, uploadVisible: false,
wrapperCol: { wrapperCol: {
@ -338,8 +340,10 @@ export default {
}, },
methods: { methods: {
loadThemes() { loadThemes() {
this.themeLoading = true
themeApi.listAll().then(response => { themeApi.listAll().then(response => {
this.themes = response.data.data this.themes = response.data.data
this.themeLoading = false
}) })
}, },
settingDrawer(theme) { settingDrawer(theme) {

Loading…
Cancel
Save