mirror of https://github.com/halo-dev/halo
修复打开主题设置掉帧的问题
parent
697f08e6bd
commit
a5c1ded4e3
|
@ -31,7 +31,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleToHome() {
|
handleToHome() {
|
||||||
this.$router.push({ name: 'dashboard' })
|
this.$router.push({ name: 'Dashboard' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ router.beforeEach((to, from, next) => {
|
||||||
if (Vue.ls.get(ACCESS_TOKEN)) {
|
if (Vue.ls.get(ACCESS_TOKEN)) {
|
||||||
/* has token */
|
/* has token */
|
||||||
if (to.path === '/user/login') {
|
if (to.path === '/user/login') {
|
||||||
next({ path: '/dashboard' })
|
next({ path: '/Dashboard' })
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
} else {
|
} else {
|
||||||
if (store.getters.roles.length === 0) {
|
if (store.getters.roles.length === 0) {
|
||||||
|
|
|
@ -31,7 +31,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleToHome() {
|
handleToHome() {
|
||||||
this.$router.push({ name: 'dashboard' })
|
this.$router.push({ name: 'Dashboard' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,6 +119,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { PageView } from '@/layouts'
|
import { PageView } from '@/layouts'
|
||||||
import themeApi from '@/api/theme'
|
import themeApi from '@/api/theme'
|
||||||
|
import { setTimeout } from 'timers'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -154,12 +155,15 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
settingDrawer(themeId) {
|
settingDrawer(themeId) {
|
||||||
themeApi.fetchConfiguration(themeId).then(response => {
|
this.visible = true
|
||||||
this.visible = true
|
var that = this
|
||||||
this.themeConfiguration = response.data.data
|
setTimeout(function() {
|
||||||
this.loadSettings()
|
themeApi.fetchConfiguration(themeId).then(response => {
|
||||||
this.getThemeProperty(themeId)
|
that.themeConfiguration = response.data.data
|
||||||
})
|
that.loadSettings()
|
||||||
|
that.getThemeProperty(themeId)
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
},
|
},
|
||||||
activeTheme(theme) {
|
activeTheme(theme) {
|
||||||
themeApi.active(theme).then(response => {
|
themeApi.active(theme).then(response => {
|
||||||
|
@ -190,6 +194,8 @@ export default {
|
||||||
},
|
},
|
||||||
onClose() {
|
onClose() {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
|
this.themeConfiguration = {}
|
||||||
|
this.themeProperty = {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
Loading…
Reference in New Issue