|
|
|
@ -73,7 +73,7 @@ |
|
|
|
|
placeholder="请输入作者" |
|
|
|
|
v-model.trim="form.author" |
|
|
|
|
clearable |
|
|
|
|
maxlength="15" |
|
|
|
|
maxlength="200" |
|
|
|
|
class="inline-input" |
|
|
|
|
@change="nameChange" |
|
|
|
|
></el-input> |
|
|
|
@ -242,7 +242,7 @@ |
|
|
|
|
</el-form> |
|
|
|
|
<div class="btns"> |
|
|
|
|
<el-button type="primary" @click="submit(1)">发布</el-button> |
|
|
|
|
<el-button @click="preview">预览</el-button> |
|
|
|
|
<el-button v-if="$route.query.id" @click="preview">预览</el-button> |
|
|
|
|
<el-button @click="submit(0)">保存草稿</el-button> |
|
|
|
|
<el-button @click="back">取消</el-button> |
|
|
|
|
</div> |
|
|
|
@ -323,6 +323,7 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import Setting from '@/setting' |
|
|
|
|
import util from '@/libs/util' |
|
|
|
|
import ColumnConst from '@/const/column' |
|
|
|
|
import { mapState } from 'vuex' |
|
|
|
@ -364,7 +365,7 @@ export default { |
|
|
|
|
file: '', |
|
|
|
|
isRelease: 0, |
|
|
|
|
mainBody: '', |
|
|
|
|
releaseTime: '', |
|
|
|
|
releaseTime: new Date(), |
|
|
|
|
source: '', |
|
|
|
|
summary : '', |
|
|
|
|
title: '', |
|
|
|
@ -787,7 +788,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 预览 |
|
|
|
|
preview() { |
|
|
|
|
|
|
|
|
|
window.open((Setting.isDev ? `http://${location.hostname}:8095` : 'http://192.168.31.136') + `/#/article?id=${this.form.id}&siteId=${this.form.siteId}`) |
|
|
|
|
}, |
|
|
|
|
// 返回 |
|
|
|
|
back() { |
|
|
|
|