Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrimeVue Bug: Tree 组件 nodeicon slot 无法使用 node 数据 #23

Open
zjp-CN opened this issue Aug 9, 2024 · 1 comment
Open

PrimeVue Bug: Tree 组件 nodeicon slot 无法使用 node 数据 #23

zjp-CN opened this issue Aug 9, 2024 · 1 comment
Labels
非本仓库 bug 来自框架、依赖等不属于本仓库能解决的 bug

Comments

@zjp-CN
Copy link
Member

zjp-CN commented Aug 9, 2024

已在 nodetoggleicon 和 nodeicon 上试验过:如果 slot 内为纯字符串,那么文件节点正常展开,如果 slot 使用 node 数据,则无法展开,并出现以下 vue 错误:

截图_20240809224454

@zjp-CN zjp-CN added the 非本仓库 bug 来自框架、依赖等不属于本仓库能解决的 bug label Aug 9, 2024
@zjp-CN
Copy link
Member Author

zjp-CN commented Aug 9, 2024

<Tree :value="nodes" class="packageFileTree" filterMode="strict" selectionMode="single" :selectionKeys="selectedKey"
  @update:selectionKeys="$emit('update:selectedKey', $event)">
  <!-- 这应该是 primevue 的 bug:使用 node 的数据,导致节点无法展开 -->
  <!-- primevue 的 bug2:这段注释甚至不能放进 Tree tag 里面,因为会无法显示节点 label -->
  <!-- <template #nodetoggleicon="{ node: { data: { total } } }"> -->
  <!--   <span> -->
  <!--     {{ total }} -->
  <!--   </span> -->
  <!-- </template> -->
</Tree>

截图_20240810072745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
非本仓库 bug 来自框架、依赖等不属于本仓库能解决的 bug
Projects
None yet
Development

No branches or pull requests

1 participant