mirror of https://github.com/halo-dev/halo
Remove createTime for post list.
parent
47ac79559b
commit
589ffb1704
|
@ -1,10 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="page-header-index-wide">
|
<div class="page-header-index-wide">
|
||||||
<a-row
|
<a-row :gutter="12" type="flex" align="middle">
|
||||||
:gutter="12"
|
|
||||||
type="flex"
|
|
||||||
align="middle"
|
|
||||||
>
|
|
||||||
<a-col
|
<a-col
|
||||||
class="theme-item"
|
class="theme-item"
|
||||||
:xl="6"
|
:xl="6"
|
||||||
|
@ -15,46 +11,24 @@
|
||||||
v-for="(theme, index) in themes"
|
v-for="(theme, index) in themes"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<a-card
|
<a-card hoverable :title="theme.name">
|
||||||
hoverable
|
<img :alt="theme.name" :src="theme.screenshots" slot="cover">
|
||||||
:title="theme.name"
|
<template class="ant-card-actions" slot="actions">
|
||||||
>
|
|
||||||
<img
|
|
||||||
:alt="theme.name"
|
|
||||||
:src="theme.screenshots"
|
|
||||||
slot="cover"
|
|
||||||
>
|
|
||||||
<template
|
|
||||||
class="ant-card-actions"
|
|
||||||
slot="actions"
|
|
||||||
>
|
|
||||||
<div v-if="theme.activated">
|
<div v-if="theme.activated">
|
||||||
<a-icon
|
<a-icon type="unlock" theme="twoTone"/>已启用
|
||||||
type="unlock"
|
|
||||||
theme="twoTone"
|
|
||||||
/>已启用
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div v-else @click="handleActivateClick(theme)">
|
||||||
v-else
|
<a-icon type="lock"/>启用
|
||||||
@click="handleActivateClick(theme)"
|
|
||||||
>
|
|
||||||
<a-icon type="lock" />启用
|
|
||||||
</div>
|
</div>
|
||||||
<div @click="handleEditClick(theme)">
|
<div @click="handleEditClick(theme)">
|
||||||
<a-icon type="setting" />设置
|
<a-icon type="setting"/>设置
|
||||||
</div>
|
</div>
|
||||||
<a-dropdown placement="topCenter">
|
<a-dropdown placement="topCenter">
|
||||||
<a
|
<a class="ant-dropdown-link" href="#">
|
||||||
class="ant-dropdown-link"
|
<a-icon type="ellipsis"/>更多
|
||||||
href="#"
|
|
||||||
>
|
|
||||||
<a-icon type="ellipsis" />更多
|
|
||||||
</a>
|
</a>
|
||||||
<a-menu slot="overlay">
|
<a-menu slot="overlay">
|
||||||
<a-menu-item
|
<a-menu-item :key="1" :disabled="theme.activated">
|
||||||
:key="1"
|
|
||||||
:disabled="theme.activated"
|
|
||||||
>
|
|
||||||
<a-popconfirm
|
<a-popconfirm
|
||||||
v-if="!theme.activated"
|
v-if="!theme.activated"
|
||||||
:title="'确定删除【' + theme.name + '】主题?'"
|
:title="'确定删除【' + theme.name + '】主题?'"
|
||||||
|
@ -62,10 +36,10 @@
|
||||||
okText="确定"
|
okText="确定"
|
||||||
cancelText="取消"
|
cancelText="取消"
|
||||||
>
|
>
|
||||||
<a-icon type="delete" />删除
|
<a-icon type="delete"/>删除
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
<a-icon type="delete" />删除
|
<a-icon type="delete"/>删除
|
||||||
</span>
|
</span>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
|
@ -83,28 +57,11 @@
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
destroyOnClose
|
destroyOnClose
|
||||||
>
|
>
|
||||||
<a-row
|
<a-row :gutter="12" type="flex">
|
||||||
:gutter="12"
|
<a-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24">
|
||||||
type="flex"
|
<a-skeleton active :loading="optionLoading" :paragraph="{rows: 10}">
|
||||||
>
|
|
||||||
<a-col
|
|
||||||
:xl="12"
|
|
||||||
:lg="12"
|
|
||||||
:md="12"
|
|
||||||
:sm="24"
|
|
||||||
:xs="24"
|
|
||||||
>
|
|
||||||
<a-skeleton
|
|
||||||
active
|
|
||||||
:loading="optionLoading"
|
|
||||||
:paragraph="{rows: 10}"
|
|
||||||
>
|
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<img
|
<img :alt="themeProperty.name" :src="themeProperty.screenshots" slot="cover">
|
||||||
:alt="themeProperty.name"
|
|
||||||
:src="themeProperty.screenshots"
|
|
||||||
slot="cover"
|
|
||||||
>
|
|
||||||
<a-card-meta
|
<a-card-meta
|
||||||
:title="themeProperty.author.name"
|
:title="themeProperty.author.name"
|
||||||
:description="themeProperty.description"
|
:description="themeProperty.description"
|
||||||
|
@ -115,32 +72,15 @@
|
||||||
size="large"
|
size="large"
|
||||||
slot="avatar"
|
slot="avatar"
|
||||||
/>
|
/>
|
||||||
<a-avatar
|
<a-avatar v-else size="large" slot="avatar">{{ themeProperty.author.name }}</a-avatar>
|
||||||
v-else
|
|
||||||
size="large"
|
|
||||||
slot="avatar"
|
|
||||||
>{{ themeProperty.author.name }}</a-avatar>
|
|
||||||
</a-card-meta>
|
</a-card-meta>
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-skeleton>
|
</a-skeleton>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col
|
<a-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24">
|
||||||
:xl="12"
|
<a-skeleton active :loading="optionLoading" :paragraph="{rows: 20}">
|
||||||
:lg="12"
|
|
||||||
:md="12"
|
|
||||||
:sm="24"
|
|
||||||
:xs="24"
|
|
||||||
>
|
|
||||||
<a-skeleton
|
|
||||||
active
|
|
||||||
:loading="optionLoading"
|
|
||||||
:paragraph="{rows: 20}"
|
|
||||||
>
|
|
||||||
<div class="card-container">
|
<div class="card-container">
|
||||||
<a-tabs
|
<a-tabs type="card" defaultActiveKey="0">
|
||||||
type="card"
|
|
||||||
defaultActiveKey="0"
|
|
||||||
>
|
|
||||||
<a-tab-pane
|
<a-tab-pane
|
||||||
v-for="(group, index) in themeConfiguration"
|
v-for="(group, index) in themeConfiguration"
|
||||||
:key="index.toString()"
|
:key="index.toString()"
|
||||||
|
@ -189,10 +129,7 @@
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<a-button
|
<a-button type="primary" @click="saveSettings">保存</a-button>
|
||||||
type="primary"
|
|
||||||
@click="saveSettings"
|
|
||||||
>保存</a-button>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
@ -203,13 +140,7 @@
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
<div class="upload-button">
|
<div class="upload-button">
|
||||||
<a-button
|
<a-button type="primary" shape="circle" icon="plus" size="large" @click="showUploadModal"></a-button>
|
||||||
type="primary"
|
|
||||||
shape="circle"
|
|
||||||
icon="plus"
|
|
||||||
size="large"
|
|
||||||
@click="showUploadModal"
|
|
||||||
></a-button>
|
|
||||||
</div>
|
</div>
|
||||||
<a-modal
|
<a-modal
|
||||||
title="安装主题"
|
title="安装主题"
|
||||||
|
@ -218,10 +149,7 @@
|
||||||
:bodyStyle="{ padding: '0 24px 24px' }"
|
:bodyStyle="{ padding: '0 24px 24px' }"
|
||||||
>
|
>
|
||||||
<a-tabs defaultActiveKey="1">
|
<a-tabs defaultActiveKey="1">
|
||||||
<a-tab-pane
|
<a-tab-pane tab="本地上传" key="1">
|
||||||
tab="本地上传"
|
|
||||||
key="1"
|
|
||||||
>
|
|
||||||
<upload
|
<upload
|
||||||
name="file"
|
name="file"
|
||||||
multiple
|
multiple
|
||||||
|
@ -231,25 +159,19 @@
|
||||||
@success="handleUploadSuccess"
|
@success="handleUploadSuccess"
|
||||||
>
|
>
|
||||||
<p class="ant-upload-drag-icon">
|
<p class="ant-upload-drag-icon">
|
||||||
<a-icon type="inbox" />
|
<a-icon type="inbox"/>
|
||||||
</p>
|
</p>
|
||||||
<p class="ant-upload-text">点击选择主题或将主题拖拽到此处</p>
|
<p class="ant-upload-text">点击选择主题或将主题拖拽到此处</p>
|
||||||
<p class="ant-upload-hint">支持单个或批量上传,仅支持 ZIP 格式的文件</p>
|
<p class="ant-upload-hint">支持单个或批量上传,仅支持 ZIP 格式的文件</p>
|
||||||
</upload>
|
</upload>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane
|
<a-tab-pane tab="远程拉取" key="2">
|
||||||
tab="远程拉取"
|
|
||||||
key="2"
|
|
||||||
>
|
|
||||||
<a-form layout="vertical">
|
<a-form layout="vertical">
|
||||||
<a-form-item label="远程地址:">
|
<a-form-item label="远程地址:">
|
||||||
<a-input v-model="fetchingUrl" />
|
<a-input v-model="fetchingUrl"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<a-button
|
<a-button type="primary" @click="handleFetching">确定</a-button>
|
||||||
type="primary"
|
|
||||||
@click="handleFetching"
|
|
||||||
>确定</a-button>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
|
|
@ -4,42 +4,25 @@
|
||||||
<div class="table-page-search-wrapper">
|
<div class="table-page-search-wrapper">
|
||||||
<a-form layout="inline">
|
<a-form layout="inline">
|
||||||
<a-row :gutter="48">
|
<a-row :gutter="48">
|
||||||
<a-col
|
<a-col :md="6" :sm="24">
|
||||||
:md="6"
|
|
||||||
:sm="24"
|
|
||||||
>
|
|
||||||
<a-form-item label="关键词">
|
<a-form-item label="关键词">
|
||||||
<a-input v-model="queryParam.keyword" />
|
<a-input v-model="queryParam.keyword"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col
|
<a-col :md="6" :sm="24">
|
||||||
:md="6"
|
|
||||||
:sm="24"
|
|
||||||
>
|
|
||||||
<a-form-item label="文章状态">
|
<a-form-item label="文章状态">
|
||||||
<a-select
|
<a-select v-model="queryParam.status" placeholder="请选择文章状态">
|
||||||
v-model="queryParam.status"
|
|
||||||
placeholder="请选择文章状态"
|
|
||||||
>
|
|
||||||
<a-select-option
|
<a-select-option
|
||||||
v-for="status in Object.keys(postStatus)"
|
v-for="status in Object.keys(postStatus)"
|
||||||
:key="status"
|
:key="status"
|
||||||
:value="status"
|
:value="status"
|
||||||
>
|
>{{ postStatus[status].text }}</a-select-option>
|
||||||
{{ postStatus[status].text }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col
|
<a-col :md="6" :sm="24">
|
||||||
:md="6"
|
|
||||||
:sm="24"
|
|
||||||
>
|
|
||||||
<a-form-item label="分类目录">
|
<a-form-item label="分类目录">
|
||||||
<a-select
|
<a-select v-model="queryParam.categoryId" placeholder="请选择分类">
|
||||||
v-model="queryParam.categoryId"
|
|
||||||
placeholder="请选择分类"
|
|
||||||
>
|
|
||||||
<a-select-option
|
<a-select-option
|
||||||
v-for="category in categories"
|
v-for="category in categories"
|
||||||
:key="category.id"
|
:key="category.id"
|
||||||
|
@ -48,19 +31,10 @@
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
<a-col
|
<a-col :md="6" :sm="24">
|
||||||
:md="6"
|
|
||||||
:sm="24"
|
|
||||||
>
|
|
||||||
<span class="table-page-search-submitButtons">
|
<span class="table-page-search-submitButtons">
|
||||||
<a-button
|
<a-button type="primary" @click="loadPosts">查询</a-button>
|
||||||
type="primary"
|
<a-button style="margin-left: 8px;" @click="resetParam">重置</a-button>
|
||||||
@click="loadPosts"
|
|
||||||
>查询</a-button>
|
|
||||||
<a-button
|
|
||||||
style="margin-left: 8px;"
|
|
||||||
@click="resetParam"
|
|
||||||
>重置</a-button>
|
|
||||||
</span>
|
</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
@ -69,21 +43,20 @@
|
||||||
|
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<router-link :to="{name:'PostEdit'}">
|
<router-link :to="{name:'PostEdit'}">
|
||||||
<a-button
|
<a-button type="primary" icon="plus">写文章</a-button>
|
||||||
type="primary"
|
|
||||||
icon="plus"
|
|
||||||
>写文章</a-button>
|
|
||||||
</router-link>
|
</router-link>
|
||||||
<a-dropdown>
|
<a-dropdown>
|
||||||
<a-menu slot="overlay">
|
<a-menu slot="overlay">
|
||||||
<a-menu-item key="1">
|
<a-menu-item key="1">
|
||||||
<a-icon type="delete" />移到回收站 </a-menu-item>
|
<a-icon type="delete"/>移到回收站
|
||||||
|
</a-menu-item>
|
||||||
<a-menu-item key="2">
|
<a-menu-item key="2">
|
||||||
<a-icon type="delete" />永久删除 </a-menu-item>
|
<a-icon type="delete"/>永久删除
|
||||||
|
</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
<a-button style="margin-left: 8px;">
|
<a-button style="margin-left: 8px;">
|
||||||
批量操作
|
批量操作
|
||||||
<a-icon type="down" />
|
<a-icon type="down"/>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
@ -99,74 +72,34 @@
|
||||||
:loading="postsLoading"
|
:loading="postsLoading"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
>
|
>
|
||||||
|
<span slot="status" slot-scope="statusProperty">
|
||||||
<span
|
<a-badge :status="statusProperty.status"/>
|
||||||
slot="status"
|
{{ statusProperty.text }}
|
||||||
slot-scope="statusProperty"
|
|
||||||
>
|
|
||||||
<a-badge :status="statusProperty.status" />{{ statusProperty.text }}
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span
|
<span slot="categories" slot-scope="categoriesOfPost">
|
||||||
slot="categories"
|
|
||||||
slot-scope="categoriesOfPost"
|
|
||||||
>
|
|
||||||
<a-tag
|
<a-tag
|
||||||
v-for="(category,index) in categoriesOfPost"
|
v-for="(category,index) in categoriesOfPost"
|
||||||
:key="index"
|
:key="index"
|
||||||
color="blue"
|
color="blue"
|
||||||
>
|
>{{ category.name }}</a-tag>
|
||||||
{{ category.name }}
|
|
||||||
</a-tag>
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span
|
<span slot="tags" slot-scope="tags">
|
||||||
slot="tags"
|
<a-tag v-for="(tag, index) in tags" :key="index" color="green">{{ tag.name }}</a-tag>
|
||||||
slot-scope="tags"
|
|
||||||
>
|
|
||||||
<a-tag
|
|
||||||
v-for="(tag, index) in tags"
|
|
||||||
:key="index"
|
|
||||||
color="green"
|
|
||||||
>
|
|
||||||
{{ tag.name }}
|
|
||||||
</a-tag>
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span
|
<span slot="createTime" slot-scope="createTime">{{ createTime | timeAgo }}</span>
|
||||||
slot="createTime"
|
|
||||||
slot-scope="createTime"
|
|
||||||
>
|
|
||||||
{{ createTime | timeAgo }}
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span
|
<span slot="updateTime" slot-scope="updateTime">{{ updateTime | timeAgo }}</span>
|
||||||
slot="updateTime"
|
|
||||||
slot-scope="updateTime"
|
|
||||||
>
|
|
||||||
{{ updateTime | timeAgo }}
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span
|
<span slot="action" slot-scope="text, post">
|
||||||
slot="action"
|
<a href="javascript:;" @click="onEditClick(post)">编辑</a>
|
||||||
slot-scope="text, post"
|
<a-divider type="vertical"/>
|
||||||
>
|
<a href="javascript:;" @click="deletePost(post.id)">删除</a>
|
||||||
<a
|
|
||||||
href="javascript:;"
|
|
||||||
@click="onEditClick(post)"
|
|
||||||
>编辑</a>
|
|
||||||
<a-divider type="vertical" />
|
|
||||||
<a
|
|
||||||
href="javascript:;"
|
|
||||||
@click="deletePost(post.id)"
|
|
||||||
>删除</a>
|
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
<a-row
|
<a-row type="flex" justify="end" align="middle">
|
||||||
type="flex"
|
|
||||||
justify="end"
|
|
||||||
align="middle"
|
|
||||||
>
|
|
||||||
<a-pagination
|
<a-pagination
|
||||||
class="pagination"
|
class="pagination"
|
||||||
:total="pagination.total"
|
:total="pagination.total"
|
||||||
|
@ -234,11 +167,6 @@ export default {
|
||||||
title: '访问量',
|
title: '访问量',
|
||||||
dataIndex: 'visits'
|
dataIndex: 'visits'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '创建时间',
|
|
||||||
dataIndex: 'createTime',
|
|
||||||
scopedSlots: { customRender: 'createTime' }
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '更新时间',
|
title: '更新时间',
|
||||||
dataIndex: 'updateTime',
|
dataIndex: 'updateTime',
|
||||||
|
|
Loading…
Reference in New Issue