fix: 学生管理左侧学校树字段映射修复

将 el-tree 的 label 属性从 'label' 改为 'name',
与后端 SchoolTreeNode 返回的字段名保持一致。
This commit is contained in:
神码-方晓辉 2026-02-02 19:49:12 +08:00
parent a9f57646fa
commit 9883fddb67
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@
<el-tree
ref="treeRef"
:data="schoolTree"
:props="{ label: 'label', children: 'children' }"
:props="{ label: 'name', children: 'children' }"
node-key="id"
highlight-current
:filter-node-method="filterNode"
@ -149,7 +149,7 @@ watch(treeFilterText, (val) => {
//
const filterNode = (value, data) => {
if (!value) return true
return data.label.includes(value)
return data.name?.includes(value)
}
//