修改文章发布菜单
This commit is contained in:
@@ -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> -->
|
||||
|
||||
@@ -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("发布文章失败");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user