Authored by baoss

新增个人中心页面

import Mine from './mine';
export default [
{
name: 'channel',
path: '/xianyu/channel',
component: () => import('./channel/channel')
},
...Mine
];
... ...
export default [{
name: 'mine',
path: '/xianyu/home/mine.html',
component: () => import(/* webpackChunkName: "home" */ './mine')
}];
... ...
<template>
<LayoutApp :show-back="true">
<div class="body" ref="body">
<div>username: {{username}}</div>
<!-- <List></List> -->
</div>
</LayoutApp>
</template>
<script>
// import List from './components/list';
import { createNamespacedHelpers } from 'vuex'
const {mapState} = createNamespacedHelpers('home/mine');
export default {
computed:{
...mapState({
username: state => state.username
})
},
components: {
// List
}
};
</script>
<style lang="scss" scoped>
.footer {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
}
.body {
height: 100%;
overflow-y: auto;
}
</style>
... ...
import mine from './mine';
export default function() {
return {
namespaced: true,
... ... @@ -7,5 +8,8 @@ export default function() {
},
actions: {
},
modules: {
mine: mine()
}
};
}
... ...
export default function() {
return {
namespaced: true,
state: {
username: 'bss'
},
mutations: {},
actions: {},
};
}
... ...
This diff could not be displayed because it is too large.