feat: support set summary for sheet.

pull/3445/head
ruibaby 2020-01-03 12:16:55 +08:00
parent a2bdc151b3
commit a7419dcec7
4 changed files with 76 additions and 13 deletions

View File

@ -437,6 +437,7 @@ const postColumns = [
{ {
title: '昵称', title: '昵称',
dataIndex: 'author', dataIndex: 'author',
width: '150px',
scopedSlots: { customRender: 'author' } scopedSlots: { customRender: 'author' }
}, },
{ {
@ -474,6 +475,7 @@ const sheetColumns = [
{ {
title: '昵称', title: '昵称',
dataIndex: 'author', dataIndex: 'author',
width: '150px',
scopedSlots: { customRender: 'author' } scopedSlots: { customRender: 'author' }
}, },
{ {

View File

@ -7,13 +7,19 @@
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-list itemLayout="horizontal"> <a-list itemLayout="horizontal">
<a-list-item> <a-list-item>
<a-list-item-meta> <a-list-item-meta>
<template slot="description"> <template slot="description">
<p v-html="description" class="comment-drawer-content"></p> <p
v-html="description"
class="comment-drawer-content"
></p>
</template> </template>
<h3 slot="title">{{ title }}</h3> <h3 slot="title">{{ title }}</h3>
</a-list-item-meta> </a-list-item-meta>
@ -51,13 +57,21 @@
destroyOnClose destroyOnClose
> >
<template slot="footer"> <template slot="footer">
<a-button key="submit" type="primary" @click="handleCreateClick"> <a-button
key="submit"
type="primary"
@click="handleCreateClick"
>
回复 回复
</a-button> </a-button>
</template> </template>
<a-form layout="vertical"> <a-form layout="vertical">
<a-form-item> <a-form-item>
<a-input type="textarea" :autosize="{ minRows: 8 }" v-model="replyComment.content" /> <a-input
type="textarea"
:autosize="{ minRows: 8 }"
v-model="replyComment.content"
/>
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-modal> </a-modal>

View File

@ -2,11 +2,17 @@
<div> <div>
<a-comment> <a-comment>
<template slot="actions"> <template slot="actions">
<a-dropdown :trigger="['click']" v-if="comment.status === 'AUDITING'"> <a-dropdown
:trigger="['click']"
v-if="comment.status === 'AUDITING'"
>
<span href="javascript:void(0);">通过</span> <span href="javascript:void(0);">通过</span>
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item key="1"> <a-menu-item key="1">
<span href="javascript:void(0);" @click="handleEditStatusClick('PUBLISHED')"></span> <span
href="javascript:void(0);"
@click="handleEditStatusClick('PUBLISHED')"
>通过</span>
</a-menu-item> </a-menu-item>
<a-menu-item key="2"> <a-menu-item key="2">
<span href="javascript:void(0);">通过并回复</span> <span href="javascript:void(0);">通过并回复</span>
@ -14,7 +20,10 @@
</a-menu> </a-menu>
</a-dropdown> </a-dropdown>
<span v-else-if="comment.status === 'PUBLISHED'" @click="handleReplyClick"></span> <span
v-else-if="comment.status === 'PUBLISHED'"
@click="handleReplyClick"
>回复</span>
<a-popconfirm <a-popconfirm
v-else-if="comment.status === 'RECYCLE'" v-else-if="comment.status === 'RECYCLE'"
@ -36,16 +45,37 @@
<span>回收站</span> <span>回收站</span>
</a-popconfirm> </a-popconfirm>
<a-popconfirm :title="'你确定要永久删除该评论?'" @confirm="handleDeleteClick" okText="确定" cancelText="取消"> <a-popconfirm
:title="'你确定要永久删除该评论?'"
@confirm="handleDeleteClick"
okText="确定"
cancelText="取消"
>
<span>删除</span> <span>删除</span>
</a-popconfirm> </a-popconfirm>
</template> </template>
<a slot="author" :href="comment.authorUrl" target="_blank"> <a
<a-icon type="user" v-if="comment.isAdmin" style="margin-right: 3px;" /> slot="author"
{{ comment.author }}-->{{ comment.id }} :href="comment.authorUrl"
target="_blank"
>
<a-icon
type="user"
v-if="comment.isAdmin"
style="margin-right: 3px;"
/>
{{ comment.author }}
</a> </a>
<a-avatar size="large" slot="avatar" :src="avatar" :alt="comment.author" /> <a-avatar
<p slot="content" v-html="content"></p> size="large"
slot="avatar"
:src="avatar"
:alt="comment.author"
/>
<p
slot="content"
v-html="content"
></p>
<a-tooltip slot="datetime"> <a-tooltip slot="datetime">
<span slot="title">{{ comment.createTime | moment }}</span> <span slot="title">{{ comment.createTime | moment }}</span>
<span>{{ comment.createTime | timeAgo }}</span> <span>{{ comment.createTime | timeAgo }}</span>

View File

@ -67,6 +67,23 @@
</div> </div>
<a-divider /> <a-divider />
<div :style="{ marginBottom: '16px' }">
<h3 class="post-setting-drawer-title">摘要</h3>
<div class="post-setting-drawer-item">
<a-form layout="vertical">
<a-form-item>
<a-input
type="textarea"
:autosize="{ minRows: 5 }"
v-model="selectedSheet.summary"
placeholder="不填写则会自动生成"
/>
</a-form-item>
</a-form>
</div>
</div>
<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">