管理端新增文章时删除全部选项

master
lemon橪 2021-10-06 17:01:30 +08:00
parent 4f2f6e8d20
commit 47da7d3b16
1 changed files with 5 additions and 2 deletions

View File

@ -48,12 +48,13 @@
<Input v-model="form.title" clearable style="width: 40%" />
</FormItem>
<FormItem label="文章分类" prop="categoryId">
<Select v-model="treeValue" placeholder="请选择" clearable style="width: 180px">
<Option :value="treeValue" style="display: none">{{
treeValue
}}
</Option>
<Tree :data="treeData" @on-select-change="handleCheckChange"></Tree>
<Tree :data="treeDataDefault" @on-select-change="handleCheckChange"></Tree>
</Select>
</FormItem>
<FormItem label="文章排序" prop="sort">
@ -108,7 +109,7 @@ export default {
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
treeDataDefault:"",
searchForm: {
//
pageNumber: 1, //
@ -308,6 +309,7 @@ export default {
this.loading = false;
if (res.success) {
this.treeData = this.getTree(res.result);
this.treeDataDefault = this.getTree(res.result);
this.treeData.unshift({
title: "全部",
level: 0,
@ -388,6 +390,7 @@ export default {
this.modalType = 0;
this.modalTitle = "添加文章";
this.treeValue = '';
this.form = {
sort: 1,
content:''