fix: problems with paging. (#84)

pull/87/head
Ryan Wang 2020-03-06 13:57:54 +08:00 committed by GitHub
parent 60f5c09280
commit 1eaad4b47d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 63 additions and 95 deletions

View File

@ -223,7 +223,8 @@ export default {
pagination: { pagination: {
page: 1, page: 1,
size: 18, size: 18,
sort: null sort: null,
total: 1
}, },
queryParam: { queryParam: {
page: 0, page: 0,

View File

@ -120,7 +120,8 @@ export default {
pagination: { pagination: {
page: 1, page: 1,
size: 12, size: 12,
sort: '' sort: null,
total: 1
}, },
queryParam: { queryParam: {
page: 0, page: 0,

View File

@ -127,7 +127,8 @@ export default {
pagination: { pagination: {
page: 1, page: 1,
size: 12, size: 12,
sort: '' sort: null,
total: 1
}, },
queryParam: { queryParam: {
page: 0, page: 0,

View File

@ -531,7 +531,8 @@ export default {
pagination: { pagination: {
page: 1, page: 1,
size: 10, size: 10,
sort: null sort: null,
total: 1
}, },
queryParam: { queryParam: {
page: 0, page: 0,

View File

@ -127,7 +127,8 @@ export default {
pagination: { pagination: {
page: 1, page: 1,
size: 10, size: 10,
sort: '' sort: null,
total: 1
}, },
queryParam: { queryParam: {
page: 0, page: 0,

View File

@ -584,7 +584,8 @@ export default {
pagination: { pagination: {
page: 1, page: 1,
size: 10, size: 10,
sort: null sort: null,
total: 1
}, },
queryParam: { queryParam: {
page: 0, page: 0,

View File

@ -388,7 +388,8 @@ export default {
pagination: { pagination: {
page: 1, page: 1,
size: 10, size: 10,
sort: null sort: null,
total: 1
}, },
queryParam: { queryParam: {
page: 0, page: 0,

View File

@ -267,7 +267,8 @@ export default {
pagination: { pagination: {
page: 1, page: 1,
size: 10, size: 10,
sort: null sort: null,
total: 1
}, },
queryParam: { queryParam: {
page: 0, page: 0,

View File

@ -353,7 +353,8 @@ export default {
pagination: { pagination: {
page: 1, page: 1,
size: 18, size: 18,
sort: null sort: null,
total: 1
}, },
queryParam: { queryParam: {
page: 0, page: 0,

View File

@ -12,73 +12,51 @@
align="middle" align="middle"
> >
<a-col :span="24"> <a-col :span="24">
<a-card <a-alert
:bordered="false" message="注意:备份后生成的压缩文件存储在临时文件中,重启服务器会造成备份文件的丢失,所以请尽快下载!"
:bodyStyle="{ padding: '0' }" banner
closable
/>
<a-divider>历史备份</a-divider>
<a-list
itemLayout="vertical"
size="small"
:dataSource="backups"
> >
<a-list <a-list-item
itemLayout="horizontal" slot="renderItem"
:dataSource="backupTips" slot-scope="backup"
> >
<a-list-item <a-button
slot="renderItem" slot="extra"
slot-scope="backupTip" type="link"
> style="color: red"
<a-list-item-meta :description="backupTip.description"> icon="delete"
<h4 slot="title">{{ backupTip.title }}</h4> :loading="deleting"
</a-list-item-meta> @click="handleBackupDeleteClick(backup.filename)"
<a-alert >删除</a-button>
slot="extra" <a-list-item-meta>
v-if="backupTip.alert" <a
:message="backupTip.alert.message" slot="title"
:type="backupTip.alert.type" :href="backup.downloadUrl"
banner >
/> <a-icon
</a-list-item> type="schedule"
</a-list> style="color: #52c41a"
/>
<a-divider>历史备份</a-divider> {{ backup.filename }}
</a>
<a-list <p slot="description">{{ backup.updateTime | timeAgo }}/{{ backup.fileSize | fileSizeFormat }}</p>
itemLayout="vertical" </a-list-item-meta>
size="small" </a-list-item>
:dataSource="backups" <div
v-if="loading"
class="loading-container"
style="position: absolute;bottom: 40px; width: 100%;text-align: center;"
> >
<a-list-item <a-spin />
slot="renderItem" </div>
slot-scope="backup" </a-list>
>
<a-button
slot="extra"
type="link"
style="color: red"
icon="delete"
:loading="deleting"
@click="handleBackupDeleteClick(backup.filename)"
>删除</a-button>
<a-list-item-meta>
<a
slot="title"
:href="backup.downloadUrl"
>
<a-icon
type="schedule"
style="color: #52c41a"
/>
{{ backup.filename }}
</a>
<p slot="description">{{ backup.updateTime | timeAgo }}/{{ backup.fileSize | fileSizeFormat }}</p>
</a-list-item-meta>
</a-list-item>
<div
v-if="loading"
class="loading-container"
style="position: absolute;bottom: 40px; width: 100%;text-align: center;"
>
<a-spin />
</div>
</a-list>
</a-card>
</a-col> </a-col>
</a-row> </a-row>
<a-divider class="divider-transparent" /> <a-divider class="divider-transparent" />
@ -110,27 +88,7 @@ export default {
backuping: false, backuping: false,
loading: false, loading: false,
deleting: false, deleting: false,
backups: [], backups: []
backupTips: [
{
title: '博客备份',
description:
'将会压缩 Halo 的工作目录到临时文件中,并提供下载链接。如果附件太多的话,可能会十分耗时,请耐心等待!',
alert: {
type: 'warning',
message: '注意:备份后生成的压缩文件存储在临时文件中,重启服务器会造成备份文件的丢失,所以请尽快下载!'
}
},
{ title: '备份查询', description: '查询近期的备份,按照备份时间递减排序。' },
{ title: '备份删除', description: '删除已经备份的内容。' },
{
title: '版本要求',
alert: {
type: 'warning',
message: '注意:要求 Halo server 版本大于 v1.1.1!你可以在 【系统 | 关于】 里面找到系统的版本信息。'
}
}
]
} }
}, },
model: { model: {

View File

@ -229,7 +229,8 @@ export default {
pagination: { pagination: {
page: 1, page: 1,
size: 10, size: 10,
sort: null sort: null,
total: 1
}, },
queryParam: { queryParam: {
page: 0, page: 0,