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