This commit is contained in:
Pan
2017-08-28 13:12:44 +08:00
committed by 花裤衩
parent b98860ace1
commit f7aee3b5a3
50 changed files with 386 additions and 416 deletions

View File

@@ -12,17 +12,17 @@
{{scope.row.title}}
</template>
</el-table-column>
<el-table-column label="作者" width="110">
<el-table-column label="作者" width="95" align="center">
<template scope="scope">
<span>{{scope.row.author}}</span>
<el-tag>{{scope.row.author}}</el-tag>
</template>
</el-table-column>
<el-table-column label="阅读数" width="105" align="center">
<el-table-column label="阅读数" width="115" align="center">
<template scope="scope">
{{scope.row.pageviews}}
</template>
</el-table-column>
<el-table-column align="center" prop="created_at" label="发布时间" width="200">
<el-table-column align="center" prop="created_at" label="发布时间" width="220">
<template scope="scope">
<i class="el-icon-time"></i>
<span>{{scope.row.display_time}}</span>
@@ -33,7 +33,7 @@
</template>
<script>
import { getList } from 'api/article'
import { fetchList } from '@/api/article'
export default {
data() {
@@ -49,8 +49,8 @@ export default {
methods: {
fetchData() {
this.listLoading = true
getList().then(response => {
this.list = response.data
fetchList().then(response => {
this.list = response.data.items
this.listLoading = false
})
},

View File

@@ -14,17 +14,17 @@
{{scope.row.title}}
</template>
</el-table-column>
<el-table-column label="作者" width="110">
<el-table-column label="作者" width="95" align="center">
<template scope="scope">
<span>{{scope.row.author}}</span>
<el-tag>{{scope.row.author}}</el-tag>
</template>
</el-table-column>
<el-table-column label="阅读数" width="105" align="center">
<el-table-column label="阅读数" width="115" align="center">
<template scope="scope">
{{scope.row.pageviews}}
</template>
</el-table-column>
<el-table-column align="center" prop="created_at" label="发布时间" width="200">
<el-table-column align="center" prop="created_at" label="发布时间" width="220">
<template scope="scope">
<i class="el-icon-time"></i>
<span>{{scope.row.display_time}}</span>
@@ -35,7 +35,7 @@
</template>
<script>
import { getList } from 'api/article'
import { fetchList } from '@/api/article'
export default {
data() {
@@ -52,8 +52,8 @@ export default {
methods: {
fetchData() {
this.listLoading = true
getList(this.listQuery).then(response => {
this.list = response.data
fetchList(this.listQuery).then(response => {
this.list = response.data.items
this.listLoading = false
})
},