提交 6aff39bc authored 作者: matian's avatar matian

bug修复

上级 9d3ca8ad
......@@ -2,7 +2,7 @@
<app-card>
<el-button v-if="!treeList.length" type="primary" @click="centerDialogVisible = true">添加分类</el-button>
<div class="block">
<el-tree :data="treeList" node-key="id" default-expand-all :expand-on-click-node="true">
<el-tree :data="treeList" node-key="id" default-expand-all :expand-on-click-node="false">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
<span>
......@@ -59,9 +59,13 @@ export default {
category_name: this.treeParams.name || 'node'
}
if (this.treeParams.type === 'add') {
addQuestionCategory(data).then((res) => { res.code === 0 && init() })
addQuestionCategory(data).then(res => {
res.code === 0 && init()
})
} else {
updateQuestionCategory(data.pid, { category_name: data.category_name }).then((res) => { res.code === 0 && init() })
updateQuestionCategory(data.pid, { category_name: data.category_name }).then(res => {
res.code === 0 && init()
})
}
const _this = this
function init() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论