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