| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <template>
- <div class="container news-container">
- <left></left>
- <right v-on:childEvent="listenChild"></right>
- </div>
- </template>
- <script>
- import { Left, Right } from '~components/news'
- import 'bootstrap/dist/css/bootstrap.min.css'
- export default {
- layout: 'main',
- data () {
- return {
- pageSize: 10,
- nowPage: 1
- }
- },
- fetch ({ store }) {
- return Promise.all([
- store.dispatch('loadAllNews', { page: this.nowPage, pageSize: this.pageSize }),
- store.dispatch('loadHotNews')
- ])
- },
- components: {
- Left,
- Right
- },
- methods: {
- listenChild: function (nPage) {
- this.nowPage = nPage
- this.$store.dispatch('loadAllNews', { page: this.nowPage, pageSize: this.pageSize })
- }
- }
- }
- </script>
- <style scoped>
- /*.clearfix, .nav-list{
- font-size: 14px!important;
- }
- .footer .item{
- margin-top: 20px;
- }
- .navbar{
- height: 36px!important;
- min-height: 36px!important;
- }*/
- div{
- display: block;
- }
- </style>
|