Skip to content

Commit 9dab21c

Browse files
committed
fix: device undef
1 parent ccfa8ec commit 9dab21c

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/layouts/UserLayout.vue

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div id="userLayout" :class="['user-layout-wrapper', device]">
2+
<div id="userLayout" :class="['user-layout-wrapper', isMobile && 'mobile']">
33
<div class="container">
44
<div class="top">
55
<div class="header">
@@ -13,7 +13,7 @@
1313
</div>
1414
</div>
1515

16-
<route-view></route-view>
16+
<router-view />
1717

1818
<div class="footer">
1919
<div class="links">
@@ -30,15 +30,11 @@
3030
</template>
3131

3232
<script>
33-
import RouteView from './RouteView'
33+
import { deviceMixin } from '@/store/device-mixin'
3434
3535
export default {
3636
name: 'UserLayout',
37-
components: { RouteView },
38-
mixins: [],
39-
data () {
40-
return {}
41-
},
37+
mixins: [deviceMixin],
4238
mounted () {
4339
document.body.classList.add('userLayout')
4440
},
@@ -49,7 +45,7 @@ export default {
4945
</script>
5046

5147
<style lang="less" scoped>
52-
#userLayout.user-layout-wrapper {
48+
#userLayout.user-layout-wrapper {
5349
height: 100%;
5450
5551
&.mobile {

0 commit comments

Comments
 (0)