管理端新增文章时删除全部选项
parent
4f2f6e8d20
commit
47da7d3b16
|
@ -48,12 +48,13 @@
|
||||||
<Input v-model="form.title" clearable style="width: 40%" />
|
<Input v-model="form.title" clearable style="width: 40%" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="文章分类" prop="categoryId">
|
<FormItem label="文章分类" prop="categoryId">
|
||||||
|
|
||||||
<Select v-model="treeValue" placeholder="请选择" clearable style="width: 180px">
|
<Select v-model="treeValue" placeholder="请选择" clearable style="width: 180px">
|
||||||
<Option :value="treeValue" style="display: none">{{
|
<Option :value="treeValue" style="display: none">{{
|
||||||
treeValue
|
treeValue
|
||||||
}}
|
}}
|
||||||
</Option>
|
</Option>
|
||||||
<Tree :data="treeData" @on-select-change="handleCheckChange"></Tree>
|
<Tree :data="treeDataDefault" @on-select-change="handleCheckChange"></Tree>
|
||||||
</Select>
|
</Select>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="文章排序" prop="sort">
|
<FormItem label="文章排序" prop="sort">
|
||||||
|
@ -108,7 +109,7 @@ export default {
|
||||||
modalType: 0, // 添加或编辑标识
|
modalType: 0, // 添加或编辑标识
|
||||||
modalVisible: false, // 添加或编辑显示
|
modalVisible: false, // 添加或编辑显示
|
||||||
modalTitle: "", // 添加或编辑标题
|
modalTitle: "", // 添加或编辑标题
|
||||||
|
treeDataDefault:"",
|
||||||
searchForm: {
|
searchForm: {
|
||||||
// 搜索框初始化对象
|
// 搜索框初始化对象
|
||||||
pageNumber: 1, // 当前页数
|
pageNumber: 1, // 当前页数
|
||||||
|
@ -308,6 +309,7 @@ export default {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.treeData = this.getTree(res.result);
|
this.treeData = this.getTree(res.result);
|
||||||
|
this.treeDataDefault = this.getTree(res.result);
|
||||||
this.treeData.unshift({
|
this.treeData.unshift({
|
||||||
title: "全部",
|
title: "全部",
|
||||||
level: 0,
|
level: 0,
|
||||||
|
@ -388,6 +390,7 @@ export default {
|
||||||
this.modalType = 0;
|
this.modalType = 0;
|
||||||
this.modalTitle = "添加文章";
|
this.modalTitle = "添加文章";
|
||||||
this.treeValue = '';
|
this.treeValue = '';
|
||||||
|
|
||||||
this.form = {
|
this.form = {
|
||||||
sort: 1,
|
sort: 1,
|
||||||
content:''
|
content:''
|
||||||
|
|
Loading…
Reference in New Issue