修改文章发布菜单

This commit is contained in:
不做码农
2021-12-28 21:46:29 +08:00
parent 19eaa91b8d
commit 2af0d48722
4 changed files with 26 additions and 27 deletions

View File

@@ -43,7 +43,7 @@
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" width="110"> </el-table-column>
<el-table-column prop="createTime" label="创建时间" width="128" :show-overflow-tooltip="true"> </el-table-column>
<el-table-column label="操作" align="center" width="200">
<template slot-scope="scope">
<!-- <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)">查看</el-button> -->

View File

@@ -18,7 +18,8 @@
<el-tag size="large" :key="tag" v-for="tag in form.dynamicTags" closable :disable-transitions="false" @close="handleCloseTag(tag)">
{{tag}}
</el-tag>
<el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm">
<el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small"
@keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm">
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showInput">+ 文章标签</el-button>
</el-form-item>
@@ -144,14 +145,11 @@ export default {
this.$refs["form"].validate((valid) => {
if (valid) {
console.log(JSON.stringify(this.form));
if (this.form.cid != undefined) {
updateArticle(this.form).then((res) => {
if (res.code == 200) {
this.msgSuccess("修改文章成功");
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.push({ path: "/article/manager" });
this.$tab.closeOpenPage({ path: '/tool/article/index' });
} else {
this.msgError("修改文章失败");
}
@@ -160,8 +158,7 @@ export default {
addArticle(this.form).then((res) => {
if (res.code == 200) {
this.msgSuccess("发布文章成功");
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.push({ path: "/article/manager" });
this.$tab.closeOpenPage({ path: '/tool/article/index' });
} else {
this.msgError("发布文章失败");
}