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

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

View File

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

View File

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

View File

@ -7,9 +7,16 @@
destroyOnClose
@close="onClose"
>
<a-row type="flex" align="middle">
<a-row
type="flex"
align="middle"
>
<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">
<img :src="attachment.path">
</div>
@ -17,17 +24,33 @@
</a-col>
<a-divider />
<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-item>
<a-list-item-meta>
<template slot="description" v-if="editable">
<a-input v-model="attachment.name" @blur="updateAttachment"/>
<template
slot="description"
v-if="editable"
>
<a-input
v-model="attachment.name"
@blur="updateAttachment"
/>
</template>
<template slot="description" v-else>{{ attachment.name }}</template>
<template
slot="description"
v-else
>{{ attachment.name }}</template>
<span slot="title">
附件名
<a-icon type="edit" @click="handleEditName"/>
<a-icon
type="edit"
@click="handleEditName"
/>
</span>
</a-list-item-meta>
</a-list-item>
@ -66,7 +89,10 @@
<a-list-item-meta :description="attachment.path">
<span slot="title">
普通链接
<a-icon type="copy" @click="doCopyNormalLink"/>
<a-icon
type="copy"
@click="doCopyNormalLink"
/>
</span>
</a-list-item-meta>
</a-list-item>
@ -75,7 +101,10 @@
<span slot="description">![{{ attachment.name }}]({{ attachment.path }})</span>
<span slot="title">
Markdown 格式
<a-icon type="copy" @click="doCopyMarkdownLink"/>
<a-icon
type="copy"
@click="doCopyMarkdownLink"
/>
</span>
</a-list-item-meta>
</a-list-item>
@ -85,7 +114,12 @@
</a-row>
<a-divider />
<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-popconfirm>
</div>

View File

@ -8,21 +8,42 @@
destroyOnClose
@close="onClose"
>
<a-row type="flex" align="middle">
<a-input-search placeholder="搜索附件" enterButton/>
<a-row
type="flex"
align="middle"
>
<a-input-search
placeholder="搜索附件"
enterButton
/>
</a-row>
<a-divider />
<a-row type="flex" align="middle">
<a-skeleton active :loading="skeletonLoading" :paragraph="{ rows: 18 }">
<a-row
type="flex"
align="middle"
>
<a-skeleton
active
:loading="skeletonLoading"
:paragraph="{ rows: 18 }"
>
<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">
</div>
</a-col>
</a-skeleton>
</a-row>
<a-divider />
<a-row type="flex" justify="end">
<a-row
type="flex"
justify="end"
>
<a-pagination
:defaultPageSize="pagination.size"
:total="pagination.total"
@ -31,11 +52,18 @@
</a-row>
<a-divider />
<div class="bottom-control">
<a-button @click="showUploadModal" type="primary">上传附件</a-button>
<a-button
@click="showUploadModal"
type="primary"
>上传附件</a-button>
</div>
</a-drawer>
<a-modal title="上传附件" v-model="uploadVisible" :footer="null">
<a-modal
title="上传附件"
v-model="uploadVisible"
:footer="null"
>
<upload
name="file"
multiple

View File

@ -4,14 +4,23 @@
<div class="table-page-search-wrapper">
<a-form layout="inline">
<a-row :gutter="48">
<a-col :md="6" :sm="24">
<a-col
:md="6"
:sm="24"
>
<a-form-item label="关键词">
<a-input v-model="queryParam.keyword" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-col
:md="6"
:sm="24"
>
<a-form-item label="评论状态">
<a-select v-model="queryParam.status" placeholder="请选择评论状态">
<a-select
v-model="queryParam.status"
placeholder="请选择评论状态"
>
<a-select-option
v-for="status in Object.keys(commentStatus)"
:key="status"
@ -21,10 +30,19 @@
</a-form-item>
</a-col>
<a-col :md="12" :sm="24">
<a-col
:md="12"
:sm="24"
>
<span class="table-page-search-submitButtons">
<a-button type="primary" @click="loadComments"></a-button>
<a-button style="margin-left: 8px;" @click="resetParam"></a-button>
<a-button
type="primary"
@click="loadComments"
>查询</a-button>
<a-button
style="margin-left: 8px;"
@click="resetParam"
>重置</a-button>
</span>
</a-col>
</a-row>
@ -52,19 +70,43 @@
:loading="commentsLoading"
:pagination="false"
>
<span slot="status" slot-scope="statusProperty">
<span
slot="status"
slot-scope="statusProperty"
>
<a-badge :status="statusProperty.status" />
{{ statusProperty.text }}
</span>
<a slot="post" slot-scope="post" :href="post.url" target="_blank">{{ 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
slot="post"
slot-scope="post"
:href="post.url"
target="_blank"
>{{ 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>
<a
href="javascript:;"
@click="deleteComment(record.id)"
>删除</a>
</span>
</a-table>
<a-row type="flex" justify="end" align="middle">
<a-row
type="flex"
justify="end"
align="middle"
>
<a-pagination
class="pagination"
:total="pagination.total"

View File

@ -1,7 +1,13 @@
<template>
<page-view>
<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
:loading="postLoading"
:bordered="false"
@ -14,16 +20,28 @@
:dataSource="formattedPostData"
:pagination="false"
>
<span slot="status" slot-scope="status">
<span
slot="status"
slot-scope="status"
>
<a-badge :status="status.status" />
{{ status.text }}
</span>
<span slot="editTime" slot-scope="editTime">{{ editTime | timeAgo }}</span>
<span
slot="editTime"
slot-scope="editTime"
>{{ editTime | timeAgo }}</span>
</a-table>
</a-card>
</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
:loading="commentLoading"
:bordered="false"
@ -38,7 +56,13 @@
></a-table>
</a-card>
</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
:loading="commentLoading"
:bordered="false"

View File

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

View File

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

View File

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

View File

@ -7,7 +7,10 @@
<h1>{{ config[type].title }}</h1>
<div class="desc">{{ config[type].desc }}</div>
<div class="action">
<a-button type="primary" @click="handleToHome"></a-button>
<a-button
type="primary"
@click="handleToHome"
>返回首页</a-button>
</div>
</div>
</div>
@ -64,7 +67,7 @@ export default {
margin-bottom: 24px;
}
.desc {
color: rgba(0, 0, 0, .45);
color: rgba(0, 0, 0, 0.45);
font-size: 20px;
line-height: 28px;
margin-bottom: 16px;

View File

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

View File

@ -1,7 +1,13 @@
<template>
<div class="page-header-index-wide">
<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">
<a-input
v-model="postToStage.title"
@ -11,11 +17,21 @@
/>
</div>
<div id="editor">
<mavon-editor v-model="postToStage.originalContent" :boxShadow="false" :ishljs="true"/>
<mavon-editor
v-model="postToStage.originalContent"
:boxShadow="false"
:ishljs="true"
/>
</div>
</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
title="页面设置"
:width="isMobile()?'100%':'460'"
@ -35,17 +51,27 @@
<a-input v-model="postToStage.url" />
</a-form-item>
<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 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="true">关闭</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="自定义模板:">
<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-form-item>
</a-form>
@ -57,25 +83,39 @@
<h3 class="post-setting-drawer-title">缩略图</h3>
<div class="post-setting-drawer-item">
<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>
<a-divider />
</div>
<div class="postControl">
<a-button style="marginRight: 8px" @click="handleDraftClick">稿</a-button>
<a-button type="primary" @click="handlePublishClick">{{ publishText }}</a-button>
<a-button
style="marginRight: 8px"
@click="handleDraftClick"
>保存草稿</a-button>
<a-button
type="primary"
@click="handlePublishClick"
>{{ publishText }}</a-button>
</div>
</a-drawer>
</a-col>
</a-row>
<AttachmentDrawer v-model="attachmentDrawerVisible" />
<footer-tool-bar
:style="{ width: isSideMenu() && isDesktop() ? `calc(100% - ${sidebarOpened ? 256 : 80}px)` : '100%'}"
>
<a-button type="primary" @click="showDrawer"></a-button>
<a-button type="dashed" style="margin-left: 8px;" @click="showAttachDrawer"></a-button>
<footer-tool-bar :style="{ width: isSideMenu() && isDesktop() ? `calc(100% - ${sidebarOpened ? 256 : 80}px)` : '100%'}">
<a-button
type="primary"
@click="showDrawer"
>发布</a-button>
<a-button
type="dashed"
style="margin-left: 8px;"
@click="showAttachDrawer"
>附件库</a-button>
</footer-tool-bar>
</div>
</template>

View File

@ -1,7 +1,13 @@
<template>
<div class="page-header-index-wide">
<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">
<a-tabs type="card">
<a-tab-pane key="internal">
@ -10,9 +16,18 @@
</span>
<!-- TODO 移动端展示 -->
<a-collapse :bordered="false" v-if="isMobile()">
<a-collapse-panel v-for="(item,index) in internalPages" :key="index">
<a href="javascript:void(0);" slot="header"> {{ item.name }} </a>
<a-collapse
:bordered="false"
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>
访问路径{{ item.url }}
操作{{ item.url }}
@ -27,16 +42,31 @@
:rowKey="page => page.id"
v-else
>
<span slot="action" slot-scope="text, record">
<a href="javascript:;" @click="viewPage(record.id)"></a>
<span
slot="action"
slot-scope="text, record"
>
<a
href="javascript:;"
@click="viewPage(record.id)"
>查看</a>
<a-divider type="vertical" />
<router-link :to="{name:'LinkList'}" v-if="record.id==1">
<router-link
:to="{name:'LinkList'}"
v-if="record.id==1"
>
<a href="javascript:void(0);">编辑</a>
</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>
</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>
</router-link>
</span>

View File

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

View File

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

View File

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

View File

@ -7,17 +7,27 @@
:md="10"
:sm="24"
:xs="24"
:style="{ 'padding-bottom': '12px' }">
:style="{ 'padding-bottom': '12px' }"
>
<a-card title="添加标签">
<a-form layout="horizontal">
<a-form-item label="名称:" help="* 页面上所显示的名称">
<a-form-item
label="名称:"
help="* 页面上所显示的名称"
>
<a-input v-model="tagToCreate.name" />
</a-form-item>
<a-form-item label="路径名称:" help="* 这是文章路径上显示的名称,最好为英文">
<a-form-item
label="路径名称:"
help="* 这是文章路径上显示的名称,最好为英文"
>
<a-input v-model="tagToCreate.slugName" />
</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>
</a-card>
@ -28,13 +38,22 @@
:md="14"
:sm="24"
:xs="24"
:style="{ 'padding-bottom': '12px' }">
:style="{ 'padding-bottom': '12px' }"
>
<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">
<span>{{ tag.postCount }} 篇文章</span>
</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-card>
</a-col>

View File

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

View File

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

View File

@ -2,26 +2,52 @@
<div class="page-header-index-wide">
<div class="card-content">
<a-row :gutter="12">
<a-col :sm="24" :md="12" :lg="8">
<a-col
:sm="24"
:md="12"
:lg="8"
>
<div class="case">
<a-card title="Markdown 导入" :bordered="false">
<a-card
title="Markdown 导入"
:bordered="false"
>
<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>
</a-card>
</div>
</a-col>
<a-col :sm="24" :md="12" :lg="8">
<a-col
:sm="24"
:md="12"
:lg="8"
>
<div class="case">
<a-card title="WordPress 导入" :bordered="false">
<a-card
title="WordPress 导入"
:bordered="false"
>
<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>
</a-card>
</div>
</a-col>
</a-row>
<a-modal title="Markdown 文档导入" v-model="ishow" @ok="sure">
<a-modal
title="Markdown 文档导入"
v-model="ishow"
@ok="sure"
>
<a-upload-dragger
name="file"
:multiple="true"

View File

@ -5,14 +5,29 @@
</div>
<div class="loginBody animated">
<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-form-item>
<a-form-item class="animated fadeInUp" :style="{'animation-delay': '0.2s'}">
<a-input type="password" placeholder="密码"></a-input>
<a-form-item
class="animated fadeInUp"
:style="{'animation-delay': '0.2s'}"
>
<a-input
type="password"
placeholder="密码"
></a-input>
</a-form-item>
<a-form-item class="animated fadeInUp" :style="{'animation-delay': '0.3s'}">
<a-button type="primary" block="true">登录</a-button>
<a-form-item
class="animated fadeInUp"
:style="{'animation-delay': '0.3s'}"
>
<a-button
type="primary"
block="true"
>登录</a-button>
</a-form-item>
</a-form>
</div>

View File

@ -1,10 +1,21 @@
<template>
<div class="page-header-index-wide page-header-wrapper-grid-content-main">
<a-row :gutter="12">
<a-col :lg="10" :md="24" :style="{ 'padding-bottom': '12px' }">
<a-card :bodyStyle="{ padding: '16' }" :bordered="false">
<a-col
:lg="10"
:md="24"
:style="{ 'padding-bottom': '12px' }"
>
<a-card
:bodyStyle="{ padding: '16' }"
:bordered="false"
>
<div class="profile-center-avatarHolder">
<a-tooltip placement="right" :trigger="['hover']" title="点击可修改头像">
<a-tooltip
placement="right"
:trigger="['hover']"
title="点击可修改头像"
>
<template slot="title">
<span>prompt text</span>
</template>
@ -21,7 +32,10 @@
<div class="profile-center-detail">
<p>
<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>
<a-icon type="mail" />
@ -34,7 +48,10 @@
</div>
<a-divider />
<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.linkCount || 0 }} 个标签</a-list-item>
<a-list-item>累计获得了 {{ counts.commentCount || 0 }} 条评论</a-list-item>
@ -45,8 +62,16 @@
</div>
</a-card>
</a-col>
<a-col :lg="14" :md="24" :style="{ 'padding-bottom': '12px' }">
<a-card :bodyStyle="{ padding: '0' }" :bordered="false" title="个人资料">
<a-col
:lg="14"
:md="24"
:style="{ 'padding-bottom': '12px' }"
>
<a-card
:bodyStyle="{ padding: '0' }"
:bordered="false"
title="个人资料"
>
<div class="card-container">
<a-tabs type="card">
<a-tab-pane key="1">
@ -64,10 +89,17 @@
<a-input v-model="user.email" />
</a-form-item>
<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-button @click="updateProfile" type="primary">保存</a-button>
<a-button
@click="updateProfile"
type="primary"
>保存</a-button>
</a-form-item>
</a-form>
</a-tab-pane>
@ -77,13 +109,22 @@
</span>
<a-form layout="vertical">
<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 label="新密码:">
<a-input type="password" v-model="passwordParam.newPassword"/>
<a-input
type="password"
v-model="passwordParam.newPassword"
/>
</a-form-item>
<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-button
@ -100,7 +141,10 @@
</a-col>
</a-row>
<AttachmentSelectDrawer v-model="attachmentDrawerVisible" @listenToSelect="selectAvatar"/>
<AttachmentSelectDrawer
v-model="attachmentDrawerVisible"
@listenToSelect="selectAvatar"
/>
</div>
</template>