Browse Source

修复打开主题设置掉帧的问题

pull/9/head
RYAN0UP 6 years ago
parent
commit
a5c1ded4e3
  1. 2
      src/components/Exception/ExceptionPage.vue
  2. 2
      src/permission.js
  3. 2
      src/views/exception/ExceptionPage.vue
  4. 14
      src/views/interface/ThemeList.vue
  5. 1
      src/views/page/PageList.vue

2
src/components/Exception/ExceptionPage.vue

@ -31,7 +31,7 @@ export default {
},
methods: {
handleToHome() {
this.$router.push({ name: 'dashboard' })
this.$router.push({ name: 'Dashboard' })
}
}
}

2
src/permission.js

@ -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) {

2
src/views/exception/ExceptionPage.vue

@ -31,7 +31,7 @@ export default {
},
methods: {
handleToHome() {
this.$router.push({ name: 'dashboard' })
this.$router.push({ name: 'Dashboard' })
}
}
}

14
src/views/interface/ThemeList.vue

@ -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 = {}
}
}
}

1
src/views/page/PageList.vue

@ -15,7 +15,6 @@
</a-col>
</a-row>
</div>
</div>
</template>
<script>

Loading…
Cancel
Save