Browse Source

Create Journal Page.

pull/9/head
ruibaby 6 years ago
parent
commit
661e0dcd6e
  1. 7
      src/config/router.config.js
  2. 8
      src/views/page/PageList.vue
  3. 66
      src/views/page/internal/JournalList.vue

7
src/config/router.config.js

@ -85,6 +85,13 @@ export const asyncRouterMap = [
hidden: true,
component: () => import('@/views/page/internal/GalleryList'),
meta: { title: '图库', hiddenHeaderContent: false }
},
{
path: '/pages/journals',
name: 'JournalList',
hidden: true,
component: () => import('@/views/page/internal/JournalList'),
meta: { title: '日志', hiddenHeaderContent: false }
}
]
},

8
src/views/page/PageList.vue

@ -23,6 +23,9 @@
<router-link :to="{name:'GalleryList'}" v-if="record.id==2">
<a href="javascript:void(0);">编辑</a>
</router-link>
<router-link :to="{name:'JournalList'}" v-if="record.id==3">
<a href="javascript:void(0);">编辑</a>
</router-link>
</span>
</a-table>
</a-tab-pane>
@ -66,6 +69,11 @@ const internalPages = [
id: '2',
name: '图库页面',
url: '/galleries'
},
{
id: '3',
name: '日志页面',
url: '/journals'
}
]
export default {

66
src/views/page/internal/JournalList.vue

@ -0,0 +1,66 @@
<template>
<div class="page-header-index-wide">
<a-row>
<a-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24">
<a-list
class="demo-loadmore-list"
:loading="loading"
itemLayout="horizontal"
:dataSource="data"
>
<a-list-item slot="renderItem" slot-scope="item, index" :key="index">
<a slot="actions">edit</a>
<a slot="actions">more</a>
<a-list-item-meta
:description="item.url"
>
<a slot="title" href="https://vue.ant.design/">{{ item.url }}</a>
<a-avatar
slot="avatar"
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
/>
</a-list-item-meta>
<div>content</div>
</a-list-item>
</a-list>
</a-col>
</a-row>
</div>
</template>
<script>
import postApi from '@/api/post'
export default {
data() {
return {
loading: true,
data: [],
queryParam: {
page: 0,
size: 10,
sort: null,
keyword: null,
categoryId: null,
status: null
}
}
},
created() {
this.loadPosts()
},
methods: {
loadPosts() {
postApi.listLatest().then(response => {
this.data = response.data.data
this.loading = false
})
}
}
}
</script>
<style>
.demo-loadmore-list {
min-height: 350px;
}
</style>
Loading…
Cancel
Save