Fommat code.

pull/9/head
ruibaby 2019-04-24 11:14:44 +08:00
parent 9da6b782a6
commit 540388bbaf
25 changed files with 1226 additions and 403 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<a-locale-provider :locale="locale"> <a-locale-provider :locale="locale">
<div id="app"> <div id="app">
<router-view/> <router-view />
</div> </div>
</a-locale-provider> </a-locale-provider>
</template> </template>

View File

@ -11,5 +11,4 @@ export default {
</script> </script>
<style scoped> <style scoped>
</style> </style>

View File

@ -3,9 +3,7 @@
</template> </template>
<script> <script>
</script> </script>
<style scoped> <style scoped>
</style> </style>

View File

@ -1,17 +1,30 @@
<template> <template>
<page-view> <page-view>
<a-row :gutter="12" type="flex" align="middle"> <a-row
<a-col :span="24" class="search-box"> :gutter="12"
type="flex"
align="middle"
>
<a-col
:span="24"
class="search-box"
>
<a-card :bordered="false"> <a-card :bordered="false">
<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 :md="6" :sm="24"> <a-col
: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 :md="6" :sm="24"> <a-col
:md="6"
:sm="24"
>
<a-form-item label="存储位置"> <a-form-item label="存储位置">
<a-select v-model="queryParam.attachmentType"> <a-select v-model="queryParam.attachmentType">
<a-select-option <a-select-option
@ -22,7 +35,10 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="24"> <a-col
:md="6"
:sm="24"
>
<a-form-item label="文件类型"> <a-form-item label="文件类型">
<a-select v-model="queryParam.mediaType"> <a-select v-model="queryParam.mediaType">
<a-select-option <a-select-option
@ -33,17 +49,30 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="24"> <a-col
:md="6"
:sm="24"
>
<span class="table-page-search-submitButtons"> <span class="table-page-search-submitButtons">
<a-button type="primary" @click="loadAttachments(true)"></a-button> <a-button
<a-button style="margin-left: 8px;" @click="resetParam"></a-button> type="primary"
@click="loadAttachments(true)"
>查询</a-button>
<a-button
style="margin-left: 8px;"
@click="resetParam"
>重置</a-button>
</span> </span>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
<div class="table-operator"> <div class="table-operator">
<a-button type="primary" icon="plus" @click="showUploadModal"></a-button> <a-button
type="primary"
icon="plus"
@click="showUploadModal"
>上传</a-button>
</div> </div>
</a-card> </a-card>
</a-col> </a-col>
@ -52,20 +81,35 @@
:grid="{ gutter: 12, xs: 1, sm: 2, md: 4, lg: 6, xl: 6, xxl: 6 }" :grid="{ gutter: 12, xs: 1, sm: 2, md: 4, lg: 6, xl: 6, xxl: 6 }"
:dataSource="formattedDatas" :dataSource="formattedDatas"
> >
<a-list-item slot="renderItem" slot-scope="item, index" :key="index"> <a-list-item
<a-card :bodyStyle="{ padding: 0 }" hoverable @click="showDetailDrawer(item)"> slot="renderItem"
slot-scope="item, index"
:key="index"
>
<a-card
:bodyStyle="{ padding: 0 }"
hoverable
@click="showDetailDrawer(item)"
>
<div class="attach-thumb"> <div class="attach-thumb">
<img :src="item.thumbPath"> <img :src="item.thumbPath">
</div> </div>
<a-card-meta> <a-card-meta>
<ellipsis :length="isMobile()?36:18" tooltip slot="description">{{ item.name }}</ellipsis> <ellipsis
:length="isMobile()?36:18"
tooltip
slot="description"
>{{ item.name }}</ellipsis>
</a-card-meta> </a-card-meta>
</a-card> </a-card>
</a-list-item> </a-list-item>
</a-list> </a-list>
</a-col> </a-col>
</a-row> </a-row>
<a-row type="flex" justify="end"> <a-row
type="flex"
justify="end"
>
<a-pagination <a-pagination
:total="pagination.total" :total="pagination.total"
:defaultPageSize="pagination.size" :defaultPageSize="pagination.size"
@ -75,10 +119,19 @@
@showSizeChange="handlePaginationChange" @showSizeChange="handlePaginationChange"
/> />
</a-row> </a-row>
<a-modal title="上传附件" v-model="uploadVisible" :footer="null"> <a-modal
<upload name="file" multiple :uploadHandler="uploadHandler" @success="handleUploadSuccess"> title="上传附件"
v-model="uploadVisible"
:footer="null"
>
<upload
name="file"
multiple
:uploadHandler="uploadHandler"
@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">支持单个或批量上传</p> <p class="ant-upload-hint">支持单个或批量上传</p>

View File

@ -7,27 +7,50 @@
destroyOnClose destroyOnClose
@close="onClose" @close="onClose"
> >
<a-row type="flex" align="middle"> <a-row
type="flex"
align="middle"
>
<a-col :span="24"> <a-col :span="24">
<a-skeleton active :loading="detailLoading" :paragraph="{rows: 8}"> <a-skeleton
active
:loading="detailLoading"
:paragraph="{rows: 8}"
>
<div class="attach-detail-img"> <div class="attach-detail-img">
<img :src="attachment.path"> <img :src="attachment.path">
</div> </div>
</a-skeleton> </a-skeleton>
</a-col> </a-col>
<a-divider/> <a-divider />
<a-col :span="24"> <a-col :span="24">
<a-skeleton active :loading="detailLoading" :paragraph="{rows: 8}"> <a-skeleton
active
:loading="detailLoading"
:paragraph="{rows: 8}"
>
<a-list itemLayout="horizontal"> <a-list itemLayout="horizontal">
<a-list-item> <a-list-item>
<a-list-item-meta> <a-list-item-meta>
<template slot="description" v-if="editable"> <template
<a-input v-model="attachment.name" @blur="updateAttachment"/> slot="description"
v-if="editable"
>
<a-input
v-model="attachment.name"
@blur="updateAttachment"
/>
</template> </template>
<template slot="description" v-else>{{ attachment.name }}</template> <template
slot="description"
v-else
>{{ attachment.name }}</template>
<span slot="title"> <span slot="title">
附件名 附件名
<a-icon type="edit" @click="handleEditName"/> <a-icon
type="edit"
@click="handleEditName"
/>
</span> </span>
</a-list-item-meta> </a-list-item-meta>
</a-list-item> </a-list-item>
@ -66,7 +89,10 @@
<a-list-item-meta :description="attachment.path"> <a-list-item-meta :description="attachment.path">
<span slot="title"> <span slot="title">
普通链接 普通链接
<a-icon type="copy" @click="doCopyNormalLink"/> <a-icon
type="copy"
@click="doCopyNormalLink"
/>
</span> </span>
</a-list-item-meta> </a-list-item-meta>
</a-list-item> </a-list-item>
@ -75,7 +101,10 @@
<span slot="description">![{{ attachment.name }}]({{ attachment.path }})</span> <span slot="description">![{{ attachment.name }}]({{ attachment.path }})</span>
<span slot="title"> <span slot="title">
Markdown 格式 Markdown 格式
<a-icon type="copy" @click="doCopyMarkdownLink"/> <a-icon
type="copy"
@click="doCopyMarkdownLink"
/>
</span> </span>
</a-list-item-meta> </a-list-item-meta>
</a-list-item> </a-list-item>
@ -83,9 +112,14 @@
</a-skeleton> </a-skeleton>
</a-col> </a-col>
</a-row> </a-row>
<a-divider/> <a-divider />
<div class="bottom-control"> <div class="bottom-control">
<a-popconfirm title="你确定要删除该附件?" @confirm="deleteAttachment" okText="确定" cancelText="取消"> <a-popconfirm
title="你确定要删除该附件?"
@confirm="deleteAttachment"
okText="确定"
cancelText="取消"
>
<a-button type="danger">删除</a-button> <a-button type="danger">删除</a-button>
</a-popconfirm> </a-popconfirm>
</div> </div>

View File

@ -57,7 +57,7 @@
:attachment="selectedAttachment" :attachment="selectedAttachment"
@delete="handleDelete" @delete="handleDelete"
/> />
<a-divider/> <a-divider />
<div class="bottom-control"> <div class="bottom-control">
<a-button <a-button
@click="showUploadModal" @click="showUploadModal"

View File

@ -8,34 +8,62 @@
destroyOnClose destroyOnClose
@close="onClose" @close="onClose"
> >
<a-row type="flex" align="middle"> <a-row
<a-input-search placeholder="搜索附件" enterButton/> type="flex"
align="middle"
>
<a-input-search
placeholder="搜索附件"
enterButton
/>
</a-row> </a-row>
<a-divider/> <a-divider />
<a-row type="flex" align="middle"> <a-row
<a-skeleton active :loading="skeletonLoading" :paragraph="{ rows: 18 }"> type="flex"
align="middle"
>
<a-skeleton
active
:loading="skeletonLoading"
:paragraph="{ rows: 18 }"
>
<a-col :span="24"> <a-col :span="24">
<div class="attach-item" v-for="(item, index) in attachments" :key="index" @click="selectAttachment(item)"> <div
class="attach-item"
v-for="(item, index) in attachments"
:key="index"
@click="selectAttachment(item)"
>
<img :src="item.thumbPath"> <img :src="item.thumbPath">
</div> </div>
</a-col> </a-col>
</a-skeleton> </a-skeleton>
</a-row> </a-row>
<a-divider/> <a-divider />
<a-row type="flex" justify="end"> <a-row
type="flex"
justify="end"
>
<a-pagination <a-pagination
:defaultPageSize="pagination.size" :defaultPageSize="pagination.size"
:total="pagination.total" :total="pagination.total"
@change="handlePaginationChange" @change="handlePaginationChange"
></a-pagination> ></a-pagination>
</a-row> </a-row>
<a-divider/> <a-divider />
<div class="bottom-control"> <div class="bottom-control">
<a-button @click="showUploadModal" type="primary">上传附件</a-button> <a-button
@click="showUploadModal"
type="primary"
>上传附件</a-button>
</div> </div>
</a-drawer> </a-drawer>
<a-modal title="上传附件" v-model="uploadVisible" :footer="null"> <a-modal
title="上传附件"
v-model="uploadVisible"
:footer="null"
>
<upload <upload
name="file" name="file"
multiple multiple
@ -44,7 +72,7 @@
@success="handleAttachmentUploadSuccess" @success="handleAttachmentUploadSuccess"
> >
<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">支持单个或批量上传</p> <p class="ant-upload-hint">支持单个或批量上传</p>

View File

@ -4,14 +4,23 @@
<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 :md="6" :sm="24"> <a-col
: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 :md="6" :sm="24"> <a-col
:md="6"
:sm="24"
>
<a-form-item label="评论状态"> <a-form-item label="评论状态">
<a-select v-model="queryParam.status" placeholder="请选择评论状态"> <a-select
v-model="queryParam.status"
placeholder="请选择评论状态"
>
<a-select-option <a-select-option
v-for="status in Object.keys(commentStatus)" v-for="status in Object.keys(commentStatus)"
:key="status" :key="status"
@ -21,10 +30,19 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="12" :sm="24"> <a-col
:md="12"
:sm="24"
>
<span class="table-page-search-submitButtons"> <span class="table-page-search-submitButtons">
<a-button type="primary" @click="loadComments"></a-button> <a-button
<a-button style="margin-left: 8px;" @click="resetParam"></a-button> type="primary"
@click="loadComments"
>查询</a-button>
<a-button
style="margin-left: 8px;"
@click="resetParam"
>重置</a-button>
</span> </span>
</a-col> </a-col>
</a-row> </a-row>
@ -35,12 +53,12 @@
<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-icon type="delete" />回收站
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
<a-button> <a-button>
批量操作 批量操作
<a-icon type="down"/> <a-icon type="down" />
</a-button> </a-button>
</a-dropdown> </a-dropdown>
</div> </div>
@ -52,19 +70,43 @@
:loading="commentsLoading" :loading="commentsLoading"
:pagination="false" :pagination="false"
> >
<span slot="status" slot-scope="statusProperty"> <span
<a-badge :status="statusProperty.status"/> slot="status"
slot-scope="statusProperty"
>
<a-badge :status="statusProperty.status" />
{{ statusProperty.text }} {{ statusProperty.text }}
</span> </span>
<a slot="post" slot-scope="post" :href="post.url" target="_blank">{{ post.title }}</a> <a
<span slot="createTime" slot-scope="createTime">{{ createTime | timeAgo }}</span> slot="post"
<span slot="action" slot-scope="text, record"> slot-scope="post"
<a href="javascript:;" @click="editComment(record.id)"></a> :href="post.url"
<a-divider type="vertical"/> target="_blank"
<a href="javascript:;" @click="deleteComment(record.id)"></a> >{{ post.title }}</a>
<span
slot="createTime"
slot-scope="createTime"
>{{ createTime | timeAgo }}</span>
<span
slot="action"
slot-scope="text, record"
>
<a
href="javascript:;"
@click="editComment(record.id)"
>通过</a>
<a-divider type="vertical" />
<a
href="javascript:;"
@click="deleteComment(record.id)"
>删除</a>
</span> </span>
</a-table> </a-table>
<a-row type="flex" justify="end" align="middle"> <a-row
type="flex"
justify="end"
align="middle"
>
<a-pagination <a-pagination
class="pagination" class="pagination"
:total="pagination.total" :total="pagination.total"

View File

@ -1,7 +1,13 @@
<template> <template>
<page-view> <page-view>
<a-row :gutter="12"> <a-row :gutter="12">
<a-col :xl="8" :lg="8" :md="12" :sm="24" :xs="24"> <a-col
:xl="8"
:lg="8"
:md="12"
:sm="24"
:xs="24"
>
<a-card <a-card
:loading="postLoading" :loading="postLoading"
:bordered="false" :bordered="false"
@ -14,16 +20,28 @@
:dataSource="formattedPostData" :dataSource="formattedPostData"
:pagination="false" :pagination="false"
> >
<span slot="status" slot-scope="status"> <span
<a-badge :status="status.status"/> slot="status"
slot-scope="status"
>
<a-badge :status="status.status" />
{{ status.text }} {{ status.text }}
</span> </span>
<span slot="editTime" slot-scope="editTime">{{ editTime | timeAgo }}</span> <span
slot="editTime"
slot-scope="editTime"
>{{ editTime | timeAgo }}</span>
</a-table> </a-table>
</a-card> </a-card>
</a-col> </a-col>
<a-col :xl="8" :lg="8" :md="12" :sm="24" :xs="24"> <a-col
:xl="8"
:lg="8"
:md="12"
:sm="24"
:xs="24"
>
<a-card <a-card
:loading="commentLoading" :loading="commentLoading"
:bordered="false" :bordered="false"
@ -38,7 +56,13 @@
></a-table> ></a-table>
</a-card> </a-card>
</a-col> </a-col>
<a-col :xl="8" :lg="8" :md="12" :sm="24" :xs="24"> <a-col
:xl="8"
:lg="8"
:md="12"
:sm="24"
:xs="24"
>
<a-card <a-card
:loading="commentLoading" :loading="commentLoading"
:bordered="false" :bordered="false"

View File

@ -13,5 +13,4 @@ export default {
</script> </script>
<style scoped> <style scoped>
</style> </style>

View File

@ -13,5 +13,4 @@ export default {
</script> </script>
<style scoped> <style scoped>
</style> </style>

View File

@ -13,5 +13,4 @@ export default {
</script> </script>
<style scoped> <style scoped>
</style> </style>

View File

@ -1,13 +1,16 @@
<template> <template>
<div class="exception"> <div class="exception">
<div class="img"> <div class="img">
<img :src="config[type].img"/> <img :src="config[type].img" />
</div> </div>
<div class="content"> <div class="content">
<h1>{{ config[type].title }}</h1> <h1>{{ config[type].title }}</h1>
<div class="desc">{{ config[type].desc }}</div> <div class="desc">{{ config[type].desc }}</div>
<div class="action"> <div class="action">
<a-button type="primary" @click="handleToHome"></a-button> <a-button
type="primary"
@click="handleToHome"
>返回首页</a-button>
</div> </div>
</div> </div>
</div> </div>
@ -38,51 +41,51 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.exception {
min-height: 500px;
height: 80%;
align-items: center;
text-align: center;
margin-top: 150px;
.img {
display: inline-block;
padding-right: 52px;
zoom: 1;
img {
height: 360px;
max-width: 430px;
}
}
.content {
display: inline-block;
flex: auto;
h1 {
color: #434e59;
font-size: 72px;
font-weight: 600;
line-height: 72px;
margin-bottom: 24px;
}
.desc {
color: rgba(0, 0, 0, 0.45);
font-size: 20px;
line-height: 28px;
margin-bottom: 16px;
}
}
}
.mobile {
.exception { .exception {
min-height: 500px; margin-top: 30px;
height: 80%;
align-items: center;
text-align: center;
margin-top: 150px;
.img { .img {
display: inline-block; padding-right: unset;
padding-right: 52px;
zoom: 1;
img { img {
height: 360px; height: 40%;
max-width: 430px; max-width: 80%;
}
}
.content {
display: inline-block;
flex: auto;
h1 {
color: #434e59;
font-size: 72px;
font-weight: 600;
line-height: 72px;
margin-bottom: 24px;
}
.desc {
color: rgba(0, 0, 0, .45);
font-size: 20px;
line-height: 28px;
margin-bottom: 16px;
}
}
}
.mobile {
.exception {
margin-top: 30px;
.img {
padding-right: unset;
img {
height: 40%;
max-width: 80%;
}
} }
} }
} }
}
</style> </style>

View File

@ -7,14 +7,21 @@
:md="10" :md="10"
:sm="24" :sm="24"
:xs="24" :xs="24"
:style="{ 'padding-bottom': '12px' }"> :style="{ 'padding-bottom': '12px' }"
>
<a-card title="添加菜单"> <a-card title="添加菜单">
<a-form layout="horizontal"> <a-form layout="horizontal">
<a-form-item label="名称:" help="* 页面上所显示的名称"> <a-form-item
<a-input v-model="menuToCreate.name"/> label="名称:"
help="* 页面上所显示的名称"
>
<a-input v-model="menuToCreate.name" />
</a-form-item> </a-form-item>
<a-form-item label="路径:" help="* 菜单的路径"> <a-form-item
<a-input v-model="menuToCreate.url"/> label="路径:"
help="* 菜单的路径"
>
<a-input v-model="menuToCreate.url" />
</a-form-item> </a-form-item>
<a-form-item label="上级菜单:"> <a-form-item label="上级菜单:">
<a-select v-model="menuToCreate.parentId"> <a-select v-model="menuToCreate.parentId">
@ -26,22 +33,41 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="排序编号:"> <a-form-item label="排序编号:">
<a-input type="number" v-model="menuToCreate.sort"/> <a-input
type="number"
v-model="menuToCreate.sort"
/>
</a-form-item> </a-form-item>
<a-form-item label="图标:" help="* 请根据主题的支持选填" :style="{ display: fieldExpand ? 'block' : 'none' }"> <a-form-item
<a-input v-model="menuToCreate.icon"/> label="图标:"
help="* 请根据主题的支持选填"
:style="{ display: fieldExpand ? 'block' : 'none' }"
>
<a-input v-model="menuToCreate.icon" />
</a-form-item> </a-form-item>
<a-form-item label="打开方式:" :style="{ display: fieldExpand ? 'block' : 'none' }"> <a-form-item
<a-select defaultValue="_self" v-model="menuToCreate.target"> label="打开方式:"
:style="{ display: fieldExpand ? 'block' : 'none' }"
>
<a-select
defaultValue="_self"
v-model="menuToCreate.target"
>
<a-select-option value="_self">当前窗口</a-select-option> <a-select-option value="_self">当前窗口</a-select-option>
<a-select-option value="_blank">新窗口</a-select-option> <a-select-option value="_blank">新窗口</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-button type="primary" @click="createMenu"></a-button> <a-button
<a :style="{ marginLeft: '8px'}" @click="toggleExpand"> type="primary"
@click="createMenu"
>保存</a-button>
<a
:style="{ marginLeft: '8px'}"
@click="toggleExpand"
>
更多选项 更多选项
<a-icon :type="fieldExpand ? 'up' : 'down'"/> <a-icon :type="fieldExpand ? 'up' : 'down'" />
</a> </a>
</a-form-item> </a-form-item>
</a-form> </a-form>
@ -53,7 +79,8 @@
:md="14" :md="14"
:sm="24" :sm="24"
:xs="24" :xs="24"
:style="{ 'padding-bottom': '12px' }"> :style="{ 'padding-bottom': '12px' }"
>
<a-card title="所有菜单"> <a-card title="所有菜单">
<a-table <a-table
:columns="columns" :columns="columns"
@ -61,10 +88,21 @@
:loading="loading" :loading="loading"
:rowKey="menu => menu.id" :rowKey="menu => menu.id"
> >
<ellipsis :length="30" tooltip slot="name" slot-scope="text">{{ text }}</ellipsis> <ellipsis
<span slot="action" slot-scope="text, record"> :length="30"
<a href="javascript:;" @click="editMenu(record.id)"></a> tooltip
<a-divider type="vertical"/> slot="name"
slot-scope="text"
>{{ text }}</ellipsis>
<span
slot="action"
slot-scope="text, record"
>
<a
href="javascript:;"
@click="editMenu(record.id)"
>编辑</a>
<a-divider type="vertical" />
<a-popconfirm <a-popconfirm
:title="'你确定要删除【' + record.name + '】菜单?'" :title="'你确定要删除【' + record.name + '】菜单?'"
@confirm="deleteMenu(record.id)" @confirm="deleteMenu(record.id)"

View File

@ -1,7 +1,13 @@
<template> <template>
<div class="page-header-index-wide"> <div class="page-header-index-wide">
<a-row :gutter="12"> <a-row :gutter="12">
<a-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24"> <a-col
:xl="24"
:lg="24"
:md="24"
:sm="24"
:xs="24"
>
<div style="margin-bottom: 16px"> <div style="margin-bottom: 16px">
<a-input <a-input
v-model="postToStage.title" v-model="postToStage.title"
@ -11,11 +17,21 @@
/> />
</div> </div>
<div id="editor"> <div id="editor">
<mavon-editor v-model="postToStage.originalContent" :boxShadow="false" :ishljs="true"/> <mavon-editor
v-model="postToStage.originalContent"
:boxShadow="false"
:ishljs="true"
/>
</div> </div>
</a-col> </a-col>
<a-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24"> <a-col
:xl="24"
:lg="24"
:md="24"
:sm="24"
:xs="24"
>
<a-drawer <a-drawer
title="页面设置" title="页面设置"
:width="isMobile()?'100%':'460'" :width="isMobile()?'100%':'460'"
@ -32,50 +48,74 @@
label="页面路径:" label="页面路径:"
:help="'https://localhost:8090/p/'+ (postToStage.url ? postToStage.url : '{auto_generate}')" :help="'https://localhost:8090/p/'+ (postToStage.url ? postToStage.url : '{auto_generate}')"
> >
<a-input v-model="postToStage.url"/> <a-input v-model="postToStage.url" />
</a-form-item> </a-form-item>
<a-form-item label="页面密码:"> <a-form-item label="页面密码:">
<a-input type="password" v-model="postToStage.password"/> <a-input
type="password"
v-model="postToStage.password"
/>
</a-form-item> </a-form-item>
<a-form-item label="是否关闭评论:"> <a-form-item label="是否关闭评论:">
<a-radio-group v-model="postToStage.disallowComment" :defaultValue="false"> <a-radio-group
v-model="postToStage.disallowComment"
:defaultValue="false"
>
<a-radio :value="false">开启</a-radio> <a-radio :value="false">开启</a-radio>
<a-radio :value="true">关闭</a-radio> <a-radio :value="true">关闭</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item label="自定义模板:"> <a-form-item label="自定义模板:">
<a-select v-model="postToStage.template"> <a-select v-model="postToStage.template">
<a-select-option v-for="tpl in customTpls" :key="tpl" :value="tpl">{{ tpl }}</a-select-option> <a-select-option
v-for="tpl in customTpls"
:key="tpl"
:value="tpl"
>{{ tpl }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>
</div> </div>
<a-divider/> <a-divider />
<div :style="{ marginBottom: '16px' }"> <div :style="{ marginBottom: '16px' }">
<h3 class="post-setting-drawer-title">缩略图</h3> <h3 class="post-setting-drawer-title">缩略图</h3>
<div class="post-setting-drawer-item"> <div class="post-setting-drawer-item">
<div class="post-thum"> <div class="post-thum">
<img class="img" src="https://os.alipayobjects.com/rmsportal/mgesTPFxodmIwpi.png"> <img
class="img"
src="https://os.alipayobjects.com/rmsportal/mgesTPFxodmIwpi.png"
>
</div> </div>
</div> </div>
</div> </div>
<a-divider/> <a-divider />
</div> </div>
<div class="postControl"> <div class="postControl">
<a-button style="marginRight: 8px" @click="handleDraftClick">稿</a-button> <a-button
<a-button type="primary" @click="handlePublishClick">{{ publishText }}</a-button> style="marginRight: 8px"
@click="handleDraftClick"
>保存草稿</a-button>
<a-button
type="primary"
@click="handlePublishClick"
>{{ publishText }}</a-button>
</div> </div>
</a-drawer> </a-drawer>
</a-col> </a-col>
</a-row> </a-row>
<AttachmentDrawer v-model="attachmentDrawerVisible"/> <AttachmentDrawer v-model="attachmentDrawerVisible" />
<footer-tool-bar <footer-tool-bar :style="{ width: isSideMenu() && isDesktop() ? `calc(100% - ${sidebarOpened ? 256 : 80}px)` : '100%'}">
:style="{ width: isSideMenu() && isDesktop() ? `calc(100% - ${sidebarOpened ? 256 : 80}px)` : '100%'}" <a-button
> type="primary"
<a-button type="primary" @click="showDrawer"></a-button> @click="showDrawer"
<a-button type="dashed" style="margin-left: 8px;" @click="showAttachDrawer"></a-button> >发布</a-button>
<a-button
type="dashed"
style="margin-left: 8px;"
@click="showAttachDrawer"
>附件库</a-button>
</footer-tool-bar> </footer-tool-bar>
</div> </div>
</template> </template>

View File

@ -1,18 +1,33 @@
<template> <template>
<div class="page-header-index-wide"> <div class="page-header-index-wide">
<a-row> <a-row>
<a-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24"> <a-col
:xl="24"
:lg="24"
:md="24"
:sm="24"
:xs="24"
>
<div class="card-container"> <div class="card-container">
<a-tabs type="card"> <a-tabs type="card">
<a-tab-pane key="internal"> <a-tab-pane key="internal">
<span slot="tab"> <span slot="tab">
<a-icon type="pushpin"/>内置页面 <a-icon type="pushpin" />内置页面
</span> </span>
<!-- TODO 移动端展示 --> <!-- TODO 移动端展示 -->
<a-collapse :bordered="false" v-if="isMobile()"> <a-collapse
<a-collapse-panel v-for="(item,index) in internalPages" :key="index"> :bordered="false"
<a href="javascript:void(0);" slot="header"> {{ item.name }} </a> v-if="isMobile()"
>
<a-collapse-panel
v-for="(item,index) in internalPages"
:key="index"
>
<a
href="javascript:void(0);"
slot="header"
> {{ item.name }} </a>
<div> <div>
访问路径{{ item.url }} 访问路径{{ item.url }}
操作{{ item.url }} 操作{{ item.url }}
@ -27,16 +42,31 @@
:rowKey="page => page.id" :rowKey="page => page.id"
v-else v-else
> >
<span slot="action" slot-scope="text, record"> <span
<a href="javascript:;" @click="viewPage(record.id)"></a> slot="action"
<a-divider type="vertical"/> slot-scope="text, record"
<router-link :to="{name:'LinkList'}" v-if="record.id==1"> >
<a
href="javascript:;"
@click="viewPage(record.id)"
>查看</a>
<a-divider type="vertical" />
<router-link
:to="{name:'LinkList'}"
v-if="record.id==1"
>
<a href="javascript:void(0);">编辑</a> <a href="javascript:void(0);">编辑</a>
</router-link> </router-link>
<router-link :to="{name:'GalleryList'}" v-if="record.id==2"> <router-link
:to="{name:'GalleryList'}"
v-if="record.id==2"
>
<a href="javascript:void(0);">编辑</a> <a href="javascript:void(0);">编辑</a>
</router-link> </router-link>
<router-link :to="{name:'JournalList'}" v-if="record.id==3"> <router-link
:to="{name:'JournalList'}"
v-if="record.id==3"
>
<a href="javascript:void(0);">编辑</a> <a href="javascript:void(0);">编辑</a>
</router-link> </router-link>
</span> </span>
@ -44,7 +74,7 @@
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="custom"> <a-tab-pane key="custom">
<span slot="tab"> <span slot="tab">
<a-icon type="fork"/>内置页面 <a-icon type="fork" />内置页面
</span> </span>
自定义页面 自定义页面
</a-tab-pane> </a-tab-pane>

View File

@ -1,17 +1,29 @@
<template> <template>
<div class="page-header-index-wide"> <div class="page-header-index-wide">
<a-row> <a-row>
<a-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24"> <a-col
:xl="24"
:lg="24"
:md="24"
:sm="24"
:xs="24"
>
<a-card :bordered="false"> <a-card :bordered="false">
<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 :md="6" :sm="24"> <a-col
:md="6"
:sm="24"
>
<a-form-item label="关键词"> <a-form-item label="关键词">
<a-input/> <a-input />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="24"> <a-col
:md="6"
:sm="24"
>
<a-form-item label="年月份"> <a-form-item label="年月份">
<a-select placeholder="请选择年月"> <a-select placeholder="请选择年月">
<a-select-option value="2019-01">2019-01</a-select-option> <a-select-option value="2019-01">2019-01</a-select-option>
@ -20,7 +32,10 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="24"> <a-col
:md="6"
:sm="24"
>
<a-form-item label="状态"> <a-form-item label="状态">
<a-select placeholder="请选择状态"> <a-select placeholder="请选择状态">
<a-select-option value="1">公开</a-select-option> <a-select-option value="1">公开</a-select-option>
@ -28,7 +43,10 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="24"> <a-col
:md="6"
:sm="24"
>
<span class="table-page-search-submitButtons"> <span class="table-page-search-submitButtons">
<a-button type="primary">查询</a-button> <a-button type="primary">查询</a-button>
<a-button style="margin-left: 8px;">重置</a-button> <a-button style="margin-left: 8px;">重置</a-button>
@ -38,17 +56,39 @@
</a-form> </a-form>
</div> </div>
<div class="table-operator"> <div class="table-operator">
<a-button type="primary" icon="plus" @click="handleNew"></a-button> <a-button
type="primary"
icon="plus"
@click="handleNew"
>写日志</a-button>
</div> </div>
<a-divider/> <a-divider />
<div style="margin-top:15px"> <div style="margin-top:15px">
<a-list itemLayout="vertical" :pagination="pagination" :dataSource="listData"> <a-list
<a-list-item slot="renderItem" slot-scope="item, index" :key="index"> itemLayout="vertical"
<a slot="actions" @click="handleEdit(item)"></a> :pagination="pagination"
:dataSource="listData"
>
<a-list-item
slot="renderItem"
slot-scope="item, index"
:key="index"
>
<a
slot="actions"
@click="handleEdit(item)"
>编辑</a>
<a slot="actions">删除</a> <a slot="actions">删除</a>
<a-list-item-meta :description="item.description"> <a-list-item-meta :description="item.description">
<a slot="title" :href="item.href">{{ item.title }}</a> <a
<a-avatar slot="avatar" :src="item.avatar" size="large"/> slot="title"
:href="item.href"
>{{ item.title }}</a>
<a-avatar
slot="avatar"
:src="item.avatar"
size="large"
/>
</a-list-item-meta> </a-list-item-meta>
{{ item.content }} {{ item.content }}
</a-list-item> </a-list-item>
@ -58,10 +98,13 @@
</a-col> </a-col>
</a-row> </a-row>
<a-modal title="新建" v-model="visible"> <a-modal
title="新建"
v-model="visible"
>
<a-form layout="vertical"> <a-form layout="vertical">
<a-form-item label="标题:"> <a-form-item label="标题:">
<a-input v-model="journal.title"/> <a-input v-model="journal.title" />
</a-form-item> </a-form-item>
<a-form-item label="内容:"> <a-form-item label="内容:">
<a-input <a-input

View File

@ -7,29 +7,51 @@
:md="10" :md="10"
:sm="24" :sm="24"
:xs="24" :xs="24"
:style="{ 'padding-bottom': '12px' }"> :style="{ 'padding-bottom': '12px' }"
>
<a-card :title="title"> <a-card :title="title">
<a-form layout="horizontal"> <a-form layout="horizontal">
<a-form-item label="网站名称:"> <a-form-item label="网站名称:">
<a-input v-model="link.name"/> <a-input v-model="link.name" />
</a-form-item> </a-form-item>
<a-form-item label="网站地址:" help="* 需要加上 http://"> <a-form-item
<a-input v-model="link.url"/> label="网站地址:"
help="* 需要加上 http://"
>
<a-input v-model="link.url" />
</a-form-item> </a-form-item>
<a-form-item label="Logo"> <a-form-item label="Logo">
<a-input v-model="link.logo"/> <a-input v-model="link.logo" />
</a-form-item> </a-form-item>
<a-form-item label="分组:" help="* 非必填"> <a-form-item
<a-input v-model="link.team"/> label="分组:"
help="* 非必填"
>
<a-input v-model="link.team" />
</a-form-item> </a-form-item>
<a-form-item label="描述:"> <a-form-item label="描述:">
<a-input type="textarea" :autosize="{ minRows: 5 }" v-model="link.description"/> <a-input
type="textarea"
:autosize="{ minRows: 5 }"
v-model="link.description"
/>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-button type="primary" @click="handleSaveClick" v-if="formType==='create'"></a-button> <a-button
type="primary"
@click="handleSaveClick"
v-if="formType==='create'"
>保存</a-button>
<a-button-group v-else> <a-button-group v-else>
<a-button type="primary" @click="handleSaveClick"></a-button> <a-button
<a-button type="dashed" @click="addLink" v-if="formType==='update'"></a-button> type="primary"
@click="handleSaveClick"
>更新</a-button>
<a-button
type="dashed"
@click="addLink"
v-if="formType==='update'"
>返回添加</a-button>
</a-button-group> </a-button-group>
</a-form-item> </a-form-item>
</a-form> </a-form>
@ -41,7 +63,8 @@
:md="14" :md="14"
:sm="24" :sm="24"
:xs="24" :xs="24"
:style="{ 'padding-bottom': '12px' }"> :style="{ 'padding-bottom': '12px' }"
>
<a-card title="所有友情链接"> <a-card title="所有友情链接">
<a-table <a-table
:columns="columns" :columns="columns"
@ -49,13 +72,30 @@
:loading="loading" :loading="loading"
:rowKey="link => link.id" :rowKey="link => link.id"
> >
<template slot="url" slot-scope="text"> <template
<a target="_blank" :href="text">{{ text }}</a> slot="url"
slot-scope="text"
>
<a
target="_blank"
:href="text"
>{{ text }}</a>
</template> </template>
<ellipsis :length="15" tooltip slot="name" slot-scope="text">{{ text }}</ellipsis> <ellipsis
<span slot="action" slot-scope="text, record"> :length="15"
<a href="javascript:;" @click="editLink(record.id)"></a> tooltip
<a-divider type="vertical"/> slot="name"
slot-scope="text"
>{{ text }}</ellipsis>
<span
slot="action"
slot-scope="text, record"
>
<a
href="javascript:;"
@click="editLink(record.id)"
>编辑</a>
<a-divider type="vertical" />
<a-popconfirm <a-popconfirm
:title="'你确定要删除【' + record.name + '】链接?'" :title="'你确定要删除【' + record.name + '】链接?'"
@confirm="deleteLink(record.id)" @confirm="deleteLink(record.id)"

View File

@ -4,14 +4,23 @@
<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 :md="6" :sm="24"> <a-col
: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 :md="6" :sm="24"> <a-col
:md="6"
:sm="24"
>
<a-form-item label="文章状态"> <a-form-item label="文章状态">
<a-select v-model="queryParam.status" placeholder="请选择文章状态"> <a-select
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"
@ -20,9 +29,15 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="24"> <a-col
:md="6"
:sm="24"
>
<a-form-item label="分类目录"> <a-form-item label="分类目录">
<a-select v-model="queryParam.categoryId" placeholder="请选择分类"> <a-select
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"
@ -31,10 +46,19 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="24"> <a-col
:md="6"
:sm="24"
>
<span class="table-page-search-submitButtons"> <span class="table-page-search-submitButtons">
<a-button type="primary" @click="loadPosts"></a-button> <a-button
<a-button style="margin-left: 8px;" @click="resetParam"></a-button> type="primary"
@click="loadPosts"
>查询</a-button>
<a-button
style="margin-left: 8px;"
@click="resetParam"
>重置</a-button>
</span> </span>
</a-col> </a-col>
</a-row> </a-row>
@ -43,20 +67,23 @@
<div class="table-operator"> <div class="table-operator">
<router-link :to="{name:'PostEdit'}"> <router-link :to="{name:'PostEdit'}">
<a-button type="primary" icon="plus">写文章</a-button> <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-icon type="delete" />移到回收站
</a-menu-item> </a-menu-item>
<a-menu-item key="2"> <a-menu-item key="2">
<a-icon type="delete"/>永久删除 <a-icon type="delete" />永久删除
</a-menu-item> </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>
@ -72,12 +99,18 @@
:loading="postsLoading" :loading="postsLoading"
:pagination="false" :pagination="false"
> >
<span slot="status" slot-scope="statusProperty"> <span
<a-badge :status="statusProperty.status"/> slot="status"
slot-scope="statusProperty"
>
<a-badge :status="statusProperty.status" />
{{ statusProperty.text }} {{ statusProperty.text }}
</span> </span>
<span slot="categories" slot-scope="categoriesOfPost"> <span
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"
@ -85,21 +118,47 @@
>{{ category.name }}</a-tag> >{{ category.name }}</a-tag>
</span> </span>
<span slot="tags" slot-scope="tags"> <span
<a-tag v-for="(tag, index) in tags" :key="index" color="green">{{ tag.name }}</a-tag> slot="tags"
slot-scope="tags"
>
<a-tag
v-for="(tag, index) in tags"
:key="index"
color="green"
>{{ tag.name }}</a-tag>
</span> </span>
<span slot="createTime" slot-scope="createTime">{{ createTime | timeAgo }}</span> <span
slot="createTime"
slot-scope="createTime"
>{{ createTime | timeAgo }}</span>
<span slot="updateTime" slot-scope="updateTime">{{ updateTime | timeAgo }}</span> <span
slot="updateTime"
slot-scope="updateTime"
>{{ updateTime | timeAgo }}</span>
<span slot="action" slot-scope="text, post"> <span
<a href="javascript:;" @click="onEditClick(post)"></a> slot="action"
<a-divider type="vertical"/> slot-scope="text, post"
<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 type="flex" justify="end" align="middle"> <a-row
type="flex"
justify="end"
align="middle"
>
<a-pagination <a-pagination
class="pagination" class="pagination"
:total="pagination.total" :total="pagination.total"

View File

@ -7,17 +7,27 @@
:md="10" :md="10"
:sm="24" :sm="24"
:xs="24" :xs="24"
:style="{ 'padding-bottom': '12px' }"> :style="{ 'padding-bottom': '12px' }"
>
<a-card title="添加标签"> <a-card title="添加标签">
<a-form layout="horizontal"> <a-form layout="horizontal">
<a-form-item label="名称:" help="* 页面上所显示的名称"> <a-form-item
label="名称:"
help="* 页面上所显示的名称"
>
<a-input v-model="tagToCreate.name" /> <a-input v-model="tagToCreate.name" />
</a-form-item> </a-form-item>
<a-form-item label="路径名称:" help="* 这是文章路径上显示的名称,最好为英文"> <a-form-item
label="路径名称:"
help="* 这是文章路径上显示的名称,最好为英文"
>
<a-input v-model="tagToCreate.slugName" /> <a-input v-model="tagToCreate.slugName" />
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-button type="primary" @click="createTag"></a-button> <a-button
type="primary"
@click="createTag"
>保存</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-card> </a-card>
@ -28,13 +38,22 @@
:md="14" :md="14"
:sm="24" :sm="24"
:xs="24" :xs="24"
:style="{ 'padding-bottom': '12px' }"> :style="{ 'padding-bottom': '12px' }"
>
<a-card title="所有标签"> <a-card title="所有标签">
<a-tooltip placement="topLeft" v-for="tag in tags" :key="tag.id"> <a-tooltip
placement="topLeft"
v-for="tag in tags"
:key="tag.id"
>
<template slot="title"> <template slot="title">
<span>{{ tag.postCount }} 篇文章</span> <span>{{ tag.postCount }} 篇文章</span>
</template> </template>
<a-tag closable @close="deleteTag(tag.id)" color="blue">{{ tag.name }}</a-tag> <a-tag
closable
@close="deleteTag(tag.id)"
color="blue"
>{{ tag.name }}</a-tag>
</a-tooltip> </a-tooltip>
</a-card> </a-card>
</a-col> </a-col>

View File

@ -4,48 +4,102 @@
<a-tabs type="card"> <a-tabs type="card">
<a-tab-pane key="1"> <a-tab-pane key="1">
<span slot="tab"> <span slot="tab">
<a-icon type="folder"/>资源文件备份 <a-icon type="folder" />资源文件备份
</span> </span>
<a-table :columns="columns" :dataSource="ResourcesData"> <a-table
<span slot="action" slot-scope="text, record"> :columns="columns"
<a href="javascript:;" @click="downResources('ResourcesData',record.id)"></a> :dataSource="ResourcesData"
<a-divider type="vertical"/> >
<a href="javascript:;" @click="sendResources('ResourcesData',record.id)"></a> <span
<a-divider type="vertical"/> slot="action"
<a href="javascript:;" @click="deleteResources('ResourcesData',record.id)"></a> slot-scope="text, record"
>
<a
href="javascript:;"
@click="downResources('ResourcesData',record.id)"
>下载</a>
<a-divider type="vertical" />
<a
href="javascript:;"
@click="sendResources('ResourcesData',record.id)"
>发送到邮箱</a>
<a-divider type="vertical" />
<a
href="javascript:;"
@click="deleteResources('ResourcesData',record.id)"
>删除</a>
</span> </span>
</a-table> </a-table>
<a-button type="primary" @click="backupData('ResourcesData')"></a-button> <a-button
type="primary"
@click="backupData('ResourcesData')"
>备份</a-button>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="2"> <a-tab-pane key="2">
<span slot="tab"> <span slot="tab">
<a-icon type="database"/>资源文件备份 <a-icon type="database" />资源文件备份
</span> </span>
<a-table :columns="columns" :dataSource="DataBaseData"> <a-table
<span slot="action" slot-scope="text, record"> :columns="columns"
<a href="javascript:;" @click="downResources('DataBaseData',record.id)"></a> :dataSource="DataBaseData"
<a-divider type="vertical"/> >
<a href="javascript:;" @click="sendResources('DataBaseData',record.id)"></a> <span
<a-divider type="vertical"/> slot="action"
<a href="javascript:;" @click="deleteResources('DataBaseData',record.id)"></a> slot-scope="text, record"
>
<a
href="javascript:;"
@click="downResources('DataBaseData',record.id)"
>下载</a>
<a-divider type="vertical" />
<a
href="javascript:;"
@click="sendResources('DataBaseData',record.id)"
>发送到邮箱</a>
<a-divider type="vertical" />
<a
href="javascript:;"
@click="deleteResources('DataBaseData',record.id)"
>删除</a>
</span> </span>
</a-table> </a-table>
<a-button type="primary" @click="backupData('DataBaseData')"></a-button> <a-button
type="primary"
@click="backupData('DataBaseData')"
>备份</a-button>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="3"> <a-tab-pane key="3">
<span slot="tab"> <span slot="tab">
<a-icon type="read"/>文章备份 <a-icon type="read" />文章备份
</span> </span>
<a-table :columns="columns" :dataSource="FileData"> <a-table
<span slot="action" slot-scope="text, record"> :columns="columns"
<a href="javascript:;" @click="downResources('FileData',record.id)"></a> :dataSource="FileData"
<a-divider type="vertical"/> >
<a href="javascript:;" @click="sendResources('FileData',record.id)"></a> <span
<a-divider type="vertical"/> slot="action"
<a href="javascript:;" @click="deleteResources('FileData',record.id)"></a> slot-scope="text, record"
>
<a
href="javascript:;"
@click="downResources('FileData',record.id)"
>下载</a>
<a-divider type="vertical" />
<a
href="javascript:;"
@click="sendResources('FileData',record.id)"
>发送到邮箱</a>
<a-divider type="vertical" />
<a
href="javascript:;"
@click="deleteResources('FileData',record.id)"
>删除</a>
</span> </span>
</a-table> </a-table>
<a-button type="primary" @click="backupData('FileData')"></a-button> <a-button
type="primary"
@click="backupData('FileData')"
>备份</a-button>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</div> </div>

View File

@ -1,7 +1,13 @@
<template> <template>
<div class="page-header-index-wide"> <div class="page-header-index-wide">
<a-row> <a-row>
<a-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24"> <a-col
:xl="24"
:lg="24"
:md="24"
:sm="24"
:xs="24"
>
<div class="card-container"> <div class="card-container">
<a-tabs type="card"> <a-tabs type="card">
<a-tab-pane key="general"> <a-tab-pane key="general">
@ -9,19 +15,34 @@
<a-icon type="tool" />常规设置 <a-icon type="tool" />常规设置
</span> </span>
<a-form layout="vertical"> <a-form layout="vertical">
<a-form-item label="博客标题:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.blog_title"/> label="博客标题:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.blog_title" />
</a-form-item> </a-form-item>
<a-form-item label="博客地址:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.blog_url"/> label="博客地址:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.blog_url" />
</a-form-item> </a-form-item>
<a-form-item label="LOGO" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.blog_logo"/> label="LOGO"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.blog_logo" />
</a-form-item> </a-form-item>
<a-form-item label="Favicon" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.blog_favicon"/> label="Favicon"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.blog_favicon" />
</a-form-item> </a-form-item>
<a-form-item label="页脚信息:" :wrapper-col="wrapperCol"> <a-form-item
label="页脚信息:"
:wrapper-col="wrapperCol"
>
<a-input <a-input
type="textarea" type="textarea"
:autosize="{ minRows: 5 }" :autosize="{ minRows: 5 }"
@ -29,7 +50,10 @@
/> />
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-button type="primary" @click="saveOptions"></a-button> <a-button
type="primary"
@click="saveOptions"
>保存</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-tab-pane> </a-tab-pane>
@ -38,31 +62,59 @@
<a-icon type="global" />SEO设置 <a-icon type="global" />SEO设置
</span> </span>
<a-form layout="vertical"> <a-form layout="vertical">
<a-form-item label="关键词: " :wrapper-col="wrapperCol"> <a-form-item
<a-tooltip :trigger="['focus']" placement="right" title="多个关键词以英文逗号隔开"> label="关键词: "
<a-input v-model="options.seo_keywords"/> :wrapper-col="wrapperCol"
>
<a-tooltip
:trigger="['focus']"
placement="right"
title="多个关键词以英文逗号隔开"
>
<a-input v-model="options.seo_keywords" />
</a-tooltip> </a-tooltip>
</a-form-item> </a-form-item>
<a-form-item label="博客描述:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.seo_description"/> label="博客描述:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.seo_description" />
</a-form-item> </a-form-item>
<a-form-item label="百度推送 Token " :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.seo_baidu_token"/> label="百度推送 Token "
:wrapper-col="wrapperCol"
>
<a-input v-model="options.seo_baidu_token" />
</a-form-item> </a-form-item>
<a-form-item label="百度站点验证:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.seo_verification_baidu"/> label="百度站点验证:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.seo_verification_baidu" />
</a-form-item> </a-form-item>
<a-form-item label="Google 站点验证:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.seo_verification_google"/> label="Google 站点验证:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.seo_verification_google" />
</a-form-item> </a-form-item>
<a-form-item label="Bing 站点验证:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.seo_verification_bing"/> label="Bing 站点验证:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.seo_verification_bing" />
</a-form-item> </a-form-item>
<a-form-item label="360 站点验证:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.seo_verification_qihu"/> label="360 站点验证:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.seo_verification_qihu" />
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-button type="primary" @click="saveOptions"></a-button> <a-button
type="primary"
@click="saveOptions"
>保存</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-tab-pane> </a-tab-pane>
@ -71,17 +123,41 @@
<a-icon type="form" />文章设置 <a-icon type="form" />文章设置
</span> </span>
<a-form layout="vertical"> <a-form layout="vertical">
<a-form-item label="首页显示条数:" :wrapper-col="wrapperCol"> <a-form-item
<a-input type="number" defaultValue="10" v-model="options.post_index_page_size"/> label="首页显示条数:"
:wrapper-col="wrapperCol"
>
<a-input
type="number"
defaultValue="10"
v-model="options.post_index_page_size"
/>
</a-form-item> </a-form-item>
<a-form-item label="RSS 显示条数:" :wrapper-col="wrapperCol"> <a-form-item
<a-input type="number" defaultValue="10" v-model="options.rss_page_size"/> label="RSS 显示条数:"
:wrapper-col="wrapperCol"
>
<a-input
type="number"
defaultValue="10"
v-model="options.rss_page_size"
/>
</a-form-item> </a-form-item>
<a-form-item label="文章摘要字数:" :wrapper-col="wrapperCol"> <a-form-item
<a-input type="number" defaultValue="200" v-model="options.post_summary_length"/> label="文章摘要字数:"
:wrapper-col="wrapperCol"
>
<a-input
type="number"
defaultValue="200"
v-model="options.post_summary_length"
/>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-button type="primary" @click="saveOptions"></a-button> <a-button
type="primary"
@click="saveOptions"
>保存</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-tab-pane> </a-tab-pane>
@ -90,8 +166,14 @@
<a-icon type="message" />评论设置 <a-icon type="message" />评论设置
</span> </span>
<a-form layout="vertical"> <a-form layout="vertical">
<a-form-item label="评论者头像:" :wrapper-col="wrapperCol"> <a-form-item
<a-select defaultValue="mm" v-model="options.comment_gavatar_default"> label="评论者头像:"
:wrapper-col="wrapperCol"
>
<a-select
defaultValue="mm"
v-model="options.comment_gavatar_default"
>
<a-select-option value="mm">默认</a-select-option> <a-select-option value="mm">默认</a-select-option>
<a-select-option value="identicon">抽象几何图形</a-select-option> <a-select-option value="identicon">抽象几何图形</a-select-option>
<a-select-option value="monsterid">小怪物</a-select-option> <a-select-option value="monsterid">小怪物</a-select-option>
@ -101,7 +183,10 @@
<a-select-option value="blank">不显示头像</a-select-option> <a-select-option value="blank">不显示头像</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="评论审核后才显示:" :wrapper-col="wrapperCol"> <a-form-item
label="评论审核后才显示:"
:wrapper-col="wrapperCol"
>
<a-radio-group <a-radio-group
v-decorator="['radio-group']" v-decorator="['radio-group']"
defaultValue="true" defaultValue="true"
@ -111,7 +196,10 @@
<a-radio value="false">禁用</a-radio> <a-radio value="false">禁用</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item label="新评论通知:" :wrapper-col="wrapperCol"> <a-form-item
label="新评论通知:"
:wrapper-col="wrapperCol"
>
<a-radio-group <a-radio-group
v-decorator="['radio-group']" v-decorator="['radio-group']"
defaultValue="true" defaultValue="true"
@ -121,7 +209,10 @@
<a-radio value="false">禁用</a-radio> <a-radio value="false">禁用</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item label="评论审核通过通知对方:" :wrapper-col="wrapperCol"> <a-form-item
label="评论审核通过通知对方:"
:wrapper-col="wrapperCol"
>
<a-radio-group <a-radio-group
v-decorator="['radio-group']" v-decorator="['radio-group']"
defaultValue="false" defaultValue="false"
@ -131,7 +222,10 @@
<a-radio value="false">禁用</a-radio> <a-radio value="false">禁用</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item label="评论回复通知对方:" :wrapper-col="wrapperCol"> <a-form-item
label="评论回复通知对方:"
:wrapper-col="wrapperCol"
>
<a-radio-group <a-radio-group
v-decorator="['radio-group']" v-decorator="['radio-group']"
defaultValue="false" defaultValue="false"
@ -141,7 +235,10 @@
<a-radio value="false">禁用</a-radio> <a-radio value="false">禁用</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item label="API 评论开关:" :wrapper-col="wrapperCol"> <a-form-item
label="API 评论开关:"
:wrapper-col="wrapperCol"
>
<a-radio-group <a-radio-group
v-decorator="['radio-group']" v-decorator="['radio-group']"
defaultValue="false" defaultValue="false"
@ -151,13 +248,26 @@
<a-radio value="false">禁用</a-radio> <a-radio value="false">禁用</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item label="每页显示条数: " :wrapper-col="wrapperCol"> <a-form-item
<a-input type="number" defaultValue="10" v-model="options.comment_page_size"/> label="每页显示条数: "
:wrapper-col="wrapperCol"
>
<a-input
type="number"
defaultValue="10"
v-model="options.comment_page_size"
/>
</a-form-item> </a-form-item>
<a-form-item label="占位提示:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.comment_content_placeholder"/> label="占位提示:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.comment_content_placeholder" />
</a-form-item> </a-form-item>
<a-form-item label="自定义样式:" :wrapper-col="wrapperCol"> <a-form-item
label="自定义样式:"
:wrapper-col="wrapperCol"
>
<a-input <a-input
type="textarea" type="textarea"
:autosize="{ minRows: 5 }" :autosize="{ minRows: 5 }"
@ -165,7 +275,10 @@
/> />
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-button type="primary" @click="saveOptions"></a-button> <a-button
type="primary"
@click="saveOptions"
>保存</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-tab-pane> </a-tab-pane>
@ -174,7 +287,10 @@
<a-icon type="picture" />附件设置 <a-icon type="picture" />附件设置
</span> </span>
<a-form layout="vertical"> <a-form layout="vertical">
<a-form-item label="存储位置:" :wrapper-col="wrapperCol"> <a-form-item
label="存储位置:"
:wrapper-col="wrapperCol"
>
<a-select <a-select
defaultValue="local" defaultValue="local"
@change="handleAttachChange" @change="handleAttachChange"
@ -187,35 +303,65 @@
<a-select-option value="aliyun">阿里云</a-select-option> <a-select-option value="aliyun">阿里云</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<div class="upyunForm" v-show="upyunFormHidden"> <div
<a-form-item label="域名:" :wrapper-col="wrapperCol"> class="upyunForm"
v-show="upyunFormHidden"
>
<a-form-item
label="域名:"
:wrapper-col="wrapperCol"
>
<a-tooltip <a-tooltip
:trigger="['focus']" :trigger="['focus']"
placement="right" placement="right"
title="需要加上 http:// 或者 https://" title="需要加上 http:// 或者 https://"
> >
<a-input v-model="options.oss_upyun_domain"/> <a-input v-model="options.oss_upyun_domain" />
</a-tooltip> </a-tooltip>
</a-form-item> </a-form-item>
<a-form-item label="空间名称:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.oss_upyun_bucket"/> label="空间名称:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_upyun_bucket" />
</a-form-item> </a-form-item>
<a-form-item label="操作员名称:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.oss_upyun_operator"/> label="操作员名称:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_upyun_operator" />
</a-form-item> </a-form-item>
<a-form-item label="操作员密码:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.oss_upyun_password"/> label="操作员密码:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_upyun_password" />
</a-form-item> </a-form-item>
<a-form-item label="文件目录:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.oss_upyun_source"/> label="文件目录:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_upyun_source" />
</a-form-item> </a-form-item>
<a-form-item label="处理策略:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.oss_upyun_small_url"/> label="处理策略:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_upyun_small_url" />
</a-form-item> </a-form-item>
</div> </div>
<div class="qnyunForm" v-show="qnyunFormHidden"> <div
<a-form-item label="区域:" :wrapper-col="wrapperCol"> class="qnyunForm"
<a-select defaultValue="auto" v-model="options.oss_qiniu_zone"> v-show="qnyunFormHidden"
>
<a-form-item
label="区域:"
:wrapper-col="wrapperCol"
>
<a-select
defaultValue="auto"
v-model="options.oss_qiniu_zone"
>
<a-select-option value="auto">自动选择</a-select-option> <a-select-option value="auto">自动选择</a-select-option>
<a-select-option value="z0">华东</a-select-option> <a-select-option value="z0">华东</a-select-option>
<a-select-option value="z1">华北</a-select-option> <a-select-option value="z1">华北</a-select-option>
@ -224,50 +370,83 @@
<a-select-option value="as0">东南亚</a-select-option> <a-select-option value="as0">东南亚</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="域名:" :wrapper-col="wrapperCol"> <a-form-item
label="域名:"
:wrapper-col="wrapperCol"
>
<a-tooltip <a-tooltip
:trigger="['focus']" :trigger="['focus']"
placement="right" placement="right"
title="需要加上 http:// 或者 https://" title="需要加上 http:// 或者 https://"
> >
<a-input v-model="options.oss_qiniu_domain"/> <a-input v-model="options.oss_qiniu_domain" />
</a-tooltip> </a-tooltip>
</a-form-item> </a-form-item>
<a-form-item label="Access Key" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.oss_qiniu_access_key"/> label="Access Key"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_qiniu_access_key" />
</a-form-item> </a-form-item>
<a-form-item label="Secret Key" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.oss_qiniu_secret_key"/> label="Secret Key"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_qiniu_secret_key" />
</a-form-item> </a-form-item>
<a-form-item label="Bucket" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.oss_qiniu_bucket"/> label="Bucket"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_qiniu_bucket" />
</a-form-item> </a-form-item>
<a-form-item label="处理策略:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.oss_qiniu_small_url"/> label="处理策略:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_qiniu_small_url" />
</a-form-item> </a-form-item>
</div> </div>
<div class="aliyunForm" v-show="aliyunFormHidden"> <div
<a-form-item label="域名:" :wrapper-col="wrapperCol"> class="aliyunForm"
v-show="aliyunFormHidden"
>
<a-form-item
label="域名:"
:wrapper-col="wrapperCol"
>
<a-tooltip <a-tooltip
:trigger="['focus']" :trigger="['focus']"
placement="right" placement="right"
title="需要加上 http:// 或者 https://" title="需要加上 http:// 或者 https://"
> >
<a-input v-model="options.oss_aliyun_endpoint"/> <a-input v-model="options.oss_aliyun_endpoint" />
</a-tooltip> </a-tooltip>
</a-form-item> </a-form-item>
<a-form-item label="Access Key" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.oss_aliyun_access_key"/> label="Access Key"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_aliyun_access_key" />
</a-form-item> </a-form-item>
<a-form-item label="Access Secret" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.oss_aliyun_access_secret"/> label="Access Secret"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_aliyun_access_secret" />
</a-form-item> </a-form-item>
<a-form-item label="Bucket" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.oss_aliyun_bucket_name"/> label="Bucket"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_aliyun_bucket_name" />
</a-form-item> </a-form-item>
</div> </div>
<a-form-item> <a-form-item>
<a-button type="primary" @click="saveOptions"></a-button> <a-button
type="primary"
@click="saveOptions"
>保存</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-tab-pane> </a-tab-pane>
@ -276,9 +455,15 @@
<a-icon type="mail" />SMTP 服务 <a-icon type="mail" />SMTP 服务
</span> </span>
<a-tabs defaultActiveKey="1"> <a-tabs defaultActiveKey="1">
<a-tab-pane tab="发信设置" key="1"> <a-tab-pane
tab="发信设置"
key="1"
>
<a-form layout="vertical"> <a-form layout="vertical">
<a-form-item label="是否启用:" :wrapper-col="wrapperCol"> <a-form-item
label="是否启用:"
:wrapper-col="wrapperCol"
>
<a-radio-group <a-radio-group
v-decorator="['radio-group']" v-decorator="['radio-group']"
defaultValue="false" defaultValue="false"
@ -288,41 +473,81 @@
<a-radio value="false">禁用</a-radio> <a-radio value="false">禁用</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item label="SMTP 地址:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.email_host"/> label="SMTP 地址:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.email_host" />
</a-form-item> </a-form-item>
<a-form-item label="发送协议:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.email_protocol"/> label="发送协议:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.email_protocol" />
</a-form-item> </a-form-item>
<a-form-item label="SSL 端口:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.email_ssl_port"/> label="SSL 端口:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.email_ssl_port" />
</a-form-item> </a-form-item>
<a-form-item label="邮箱账号:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.email_username"/> label="邮箱账号:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.email_username" />
</a-form-item> </a-form-item>
<a-form-item label="邮箱密码:" :wrapper-col="wrapperCol"> <a-form-item
<a-tooltip :trigger="['focus']" placement="right" title="部分邮箱可能是授权码"> label="邮箱密码:"
<a-input v-model="options.email_password"/> :wrapper-col="wrapperCol"
>
<a-tooltip
:trigger="['focus']"
placement="right"
title="部分邮箱可能是授权码"
>
<a-input v-model="options.email_password" />
</a-tooltip> </a-tooltip>
</a-form-item> </a-form-item>
<a-form-item label="发件人:" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.email_from_name"/> label="发件人:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.email_from_name" />
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-button type="primary" @click="saveOptions"></a-button> <a-button
type="primary"
@click="saveOptions"
>保存</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-tab-pane> </a-tab-pane>
<a-tab-pane tab="发送测试" key="2"> <a-tab-pane
tab="发送测试"
key="2"
>
<a-form layout="vertical"> <a-form layout="vertical">
<a-form-item label="收件人:" :wrapper-col="wrapperCol"> <a-form-item
<a-input/> label="收件人:"
:wrapper-col="wrapperCol"
>
<a-input />
</a-form-item> </a-form-item>
<a-form-item label="主题:" :wrapper-col="wrapperCol"> <a-form-item
<a-input/> label="主题:"
:wrapper-col="wrapperCol"
>
<a-input />
</a-form-item> </a-form-item>
<a-form-item label="内容:" :wrapper-col="wrapperCol"> <a-form-item
<a-input type="textarea" :autosize="{ minRows: 5 }"/> label="内容:"
:wrapper-col="wrapperCol"
>
<a-input
type="textarea"
:autosize="{ minRows: 5 }"
/>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-button type="primary">发送</a-button> <a-button type="primary">发送</a-button>
@ -336,7 +561,10 @@
<a-icon type="align-left" />其他设置 <a-icon type="align-left" />其他设置
</span> </span>
<a-form layout="vertical"> <a-form layout="vertical">
<a-form-item label="API服务" :wrapper-col="wrapperCol"> <a-form-item
label="API服务"
:wrapper-col="wrapperCol"
>
<a-radio-group <a-radio-group
v-decorator="['radio-group']" v-decorator="['radio-group']"
defaultValue="false" defaultValue="false"
@ -346,10 +574,16 @@
<a-radio value="false">禁用</a-radio> <a-radio value="false">禁用</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
<a-form-item label="Access key" :wrapper-col="wrapperCol"> <a-form-item
<a-input v-model="options.blog_api_access_key"/> label="Access key"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.blog_api_access_key" />
</a-form-item> </a-form-item>
<a-form-item label="统计代码:" :wrapper-col="wrapperCol"> <a-form-item
label="统计代码:"
:wrapper-col="wrapperCol"
>
<a-input <a-input
type="textarea" type="textarea"
:autosize="{ minRows: 5 }" :autosize="{ minRows: 5 }"
@ -357,7 +591,10 @@
/> />
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-button type="primary" @click="saveOptions"></a-button> <a-button
type="primary"
@click="saveOptions"
>保存</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-tab-pane> </a-tab-pane>

View File

@ -2,26 +2,52 @@
<div class="page-header-index-wide"> <div class="page-header-index-wide">
<div class="card-content"> <div class="card-content">
<a-row :gutter="12"> <a-row :gutter="12">
<a-col :sm="24" :md="12" :lg="8"> <a-col
:sm="24"
:md="12"
:lg="8"
>
<div class="case"> <div class="case">
<a-card title="Markdown 导入" :bordered="false"> <a-card
title="Markdown 导入"
:bordered="false"
>
<span style="font-size:18px">Markdown 文档导入</span> <span style="font-size:18px">Markdown 文档导入</span>
<a-button type="primary" style="float:right" @click="importMarkDown"></a-button> <a-button
type="primary"
style="float:right"
@click="importMarkDown"
>导入</a-button>
<p>支持 Hexo/Jekyll 导入并解析元数据</p> <p>支持 Hexo/Jekyll 导入并解析元数据</p>
</a-card> </a-card>
</div> </div>
</a-col> </a-col>
<a-col :sm="24" :md="12" :lg="8"> <a-col
:sm="24"
:md="12"
:lg="8"
>
<div class="case"> <div class="case">
<a-card title="WordPress 导入" :bordered="false"> <a-card
title="WordPress 导入"
:bordered="false"
>
<span style="font-size:18px">WordPress 数据导入</span> <span style="font-size:18px">WordPress 数据导入</span>
<a-button type="primary" style="float:right" @click="importWordPress"></a-button> <a-button
type="primary"
style="float:right"
@click="importWordPress"
>导入</a-button>
<p>尽请期待</p> <p>尽请期待</p>
</a-card> </a-card>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-modal title="Markdown 文档导入" v-model="ishow" @ok="sure"> <a-modal
title="Markdown 文档导入"
v-model="ishow"
@ok="sure"
>
<a-upload-dragger <a-upload-dragger
name="file" name="file"
:multiple="true" :multiple="true"
@ -29,7 +55,7 @@
@change="handleChange" @change="handleChange"
> >
<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">拖拽或点击选择MarkDown文件到此处</p> <p class="ant-upload-text">拖拽或点击选择MarkDown文件到此处</p>
</a-upload-dragger> </a-upload-dragger>

View File

@ -5,14 +5,29 @@
</div> </div>
<div class="loginBody animated"> <div class="loginBody animated">
<a-form layout="vertical"> <a-form layout="vertical">
<a-form-item class="animated fadeInUp" :style="{'animation-delay': '0.1s'}"> <a-form-item
class="animated fadeInUp"
:style="{'animation-delay': '0.1s'}"
>
<a-input placeholder="用户名/邮箱"></a-input> <a-input placeholder="用户名/邮箱"></a-input>
</a-form-item> </a-form-item>
<a-form-item class="animated fadeInUp" :style="{'animation-delay': '0.2s'}"> <a-form-item
<a-input type="password" placeholder="密码"></a-input> class="animated fadeInUp"
:style="{'animation-delay': '0.2s'}"
>
<a-input
type="password"
placeholder="密码"
></a-input>
</a-form-item> </a-form-item>
<a-form-item class="animated fadeInUp" :style="{'animation-delay': '0.3s'}"> <a-form-item
<a-button type="primary" block="true">登录</a-button> class="animated fadeInUp"
:style="{'animation-delay': '0.3s'}"
>
<a-button
type="primary"
block="true"
>登录</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>

View File

@ -1,10 +1,21 @@
<template> <template>
<div class="page-header-index-wide page-header-wrapper-grid-content-main"> <div class="page-header-index-wide page-header-wrapper-grid-content-main">
<a-row :gutter="12"> <a-row :gutter="12">
<a-col :lg="10" :md="24" :style="{ 'padding-bottom': '12px' }"> <a-col
<a-card :bodyStyle="{ padding: '16' }" :bordered="false"> :lg="10"
:md="24"
:style="{ 'padding-bottom': '12px' }"
>
<a-card
:bodyStyle="{ padding: '16' }"
:bordered="false"
>
<div class="profile-center-avatarHolder"> <div class="profile-center-avatarHolder">
<a-tooltip placement="right" :trigger="['hover']" title="点击可修改头像"> <a-tooltip
placement="right"
:trigger="['hover']"
title="点击可修改头像"
>
<template slot="title"> <template slot="title">
<span>prompt text</span> <span>prompt text</span>
</template> </template>
@ -20,21 +31,27 @@
</div> </div>
<div class="profile-center-detail"> <div class="profile-center-detail">
<p> <p>
<a-icon type="link"/> <a-icon type="link" />
<a href="http://localhost:8090" target="method">http://localhost:8090</a> <a
href="http://localhost:8090"
target="method"
>http://localhost:8090</a>
</p> </p>
<p> <p>
<a-icon type="mail"/> <a-icon type="mail" />
{{ user.email }} {{ user.email }}
</p> </p>
<p> <p>
<a-icon type="calendar"/> <a-icon type="calendar" />
{{ counts.establishDays || 0 }} {{ counts.establishDays || 0 }}
</p> </p>
</div> </div>
<a-divider/> <a-divider />
<div class="general-profile"> <div class="general-profile">
<a-list :loading="countsLoading" itemLayout="horizontal"> <a-list
:loading="countsLoading"
itemLayout="horizontal"
>
<a-list-item>累计发表了 {{ counts.postCount || 0 }} 篇文章</a-list-item> <a-list-item>累计发表了 {{ counts.postCount || 0 }} 篇文章</a-list-item>
<a-list-item>累计创建了 {{ counts.linkCount || 0 }} 个标签</a-list-item> <a-list-item>累计创建了 {{ counts.linkCount || 0 }} 个标签</a-list-item>
<a-list-item>累计获得了 {{ counts.commentCount || 0 }} 条评论</a-list-item> <a-list-item>累计获得了 {{ counts.commentCount || 0 }} 条评论</a-list-item>
@ -45,45 +62,69 @@
</div> </div>
</a-card> </a-card>
</a-col> </a-col>
<a-col :lg="14" :md="24" :style="{ 'padding-bottom': '12px' }"> <a-col
<a-card :bodyStyle="{ padding: '0' }" :bordered="false" title="个人资料"> :lg="14"
:md="24"
:style="{ 'padding-bottom': '12px' }"
>
<a-card
:bodyStyle="{ padding: '0' }"
:bordered="false"
title="个人资料"
>
<div class="card-container"> <div class="card-container">
<a-tabs type="card"> <a-tabs type="card">
<a-tab-pane key="1"> <a-tab-pane key="1">
<span slot="tab"> <span slot="tab">
<a-icon type="idcard"/>基本资料 <a-icon type="idcard" />基本资料
</span> </span>
<a-form layout="vertical"> <a-form layout="vertical">
<a-form-item label="用户名:"> <a-form-item label="用户名:">
<a-input v-model="user.username"/> <a-input v-model="user.username" />
</a-form-item> </a-form-item>
<a-form-item label="昵称:"> <a-form-item label="昵称:">
<a-input v-model="user.nickname"/> <a-input v-model="user.nickname" />
</a-form-item> </a-form-item>
<a-form-item label="邮箱:"> <a-form-item label="邮箱:">
<a-input v-model="user.email"/> <a-input v-model="user.email" />
</a-form-item> </a-form-item>
<a-form-item label="个人说明:"> <a-form-item label="个人说明:">
<a-input :autosize="{ minRows: 5 }" type="textarea" v-model="user.description"/> <a-input
:autosize="{ minRows: 5 }"
type="textarea"
v-model="user.description"
/>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-button @click="updateProfile" type="primary">保存</a-button> <a-button
@click="updateProfile"
type="primary"
>保存</a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="2"> <a-tab-pane key="2">
<span slot="tab"> <span slot="tab">
<a-icon type="lock"/>密码 <a-icon type="lock" />密码
</span> </span>
<a-form layout="vertical"> <a-form layout="vertical">
<a-form-item label="原密码:"> <a-form-item label="原密码:">
<a-input type="password" v-model="passwordParam.oldPassword"/> <a-input
type="password"
v-model="passwordParam.oldPassword"
/>
</a-form-item> </a-form-item>
<a-form-item label="新密码:"> <a-form-item label="新密码:">
<a-input type="password" v-model="passwordParam.newPassword"/> <a-input
type="password"
v-model="passwordParam.newPassword"
/>
</a-form-item> </a-form-item>
<a-form-item label="确认密码:"> <a-form-item label="确认密码:">
<a-input type="password" v-model="passwordParam.confirmPassword"/> <a-input
type="password"
v-model="passwordParam.confirmPassword"
/>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-button <a-button
@ -100,7 +141,10 @@
</a-col> </a-col>
</a-row> </a-row>
<AttachmentSelectDrawer v-model="attachmentDrawerVisible" @listenToSelect="selectAvatar"/> <AttachmentSelectDrawer
v-model="attachmentDrawerVisible"
@listenToSelect="selectAvatar"
/>
</div> </div>
</template> </template>