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. 18
      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: { methods: {
handleToHome() { 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)) { 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) {

2
src/views/exception/ExceptionPage.vue

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

18
src/views/interface/ThemeList.vue

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

1
src/views/page/PageList.vue

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

Loading…
Cancel
Save