el-tree组件懒加载禁用未触发什么原因?
<el-tree
ref="tree"
id="fixtree"
:props="defaultProps"
node-key="unifiedId"
:check-on-click-node="true"
:load="loadNode"
:filter-node-method="filterNode"
:check-strictly="true"
:default-checked-keys="peoples"
lazy
@check-change="getChecked">
<span class="custom-tree-node" slot-scope="{ data, node}">
<span v-if="data.type === false">
<img class="organization-img" src="../assets/images/zu.png" alt="">
<span>{{ data.name }}</span>
</span>
<span v-if="data.type === true">
<img v-if="data.name" class="organization-img" src="../assets/images/user.png" alt="">
<span>{{ data.name }}</span>
<span
v-if="node.checked && data.name"
class="el-icon-check SiteTree"
></span>
</span>
</span>
</el-tree>
defaultProps: {
label: 'name',
children: 'children',
disabled: 'choiceStatus', //判断禁用
isLeaf: 'hasChildren'
},
回复
1个回答

test
2024-07-14
找不到问题所在那就另辟奚斤吧
<img v-if="data.choiceStatus === false" class="organization-img" src="../assets/images/zu.png" alt="" />
<img v-else class="organization-img" src="../assets/images/zus.png" alt="" />
<span :style="data.choiceStatus === true ? 'color: #C9CACB;' : ''">{{ data.name }}</span>
回复

适合作为回答的
- 经过验证的有效解决办法
- 自己的经验指引,对解决问题有帮助
- 遵循 Markdown 语法排版,代码语义正确
不该作为回答的
- 询问内容细节或回复楼层
- 与题目无关的内容
- “赞”“顶”“同问”“看手册”“解决了没”等毫无意义的内容