aframe - 使用 bind-for 创建的项目在从绑定数组/列表中删除时不会消失
问题描述
当我更新列表时,在前一个列表中有键的项目变得不可见,但它们仍然占用空间。如果它发生变化,是否可以强制 aframe 完全重新构建列表?
我的代码:
<a-entity id="menuDifficulties" bind-for="for: item; in: menuDifficulties; key: id; updateInPlace: true; pool: 10"
bind__visible="!!menuSelectedChallenge.id" layout="type: box; columns: 1; marginRow: -0.2;" position="0 0.34 0"
menu-difficulty-select>
{% raw %}
<template>
<!-- Item is a string representing the difficulty. -->
<a-entity class="difficultyOption" bind-item__data-id="item.id">
<!-- Text and UI -->
</a-entity>
</template>
{% endraw %}
</a-entity>
我认为这个问题是由 引起的updateInPlace: true
,但是将其设置为false
列表时根本不会呈现。bind-for
我在官方文档中找不到任何信息。
解决方案
推荐阅读
- python - SageMaker 使用对象检测算法管理 Spot 训练
- php - 为什么我的代码在选择后没有在输入字段中显示日期(dd-M-yy 格式)?
- oracle - Oracle中如何选择外键?
- asp.net-core - plesk 上的 Asp.Net core 2.2.6 部署问题
- python - 单击按钮时如何显示/隐藏整个列?
- python - 当应该为假时返回真的布尔语句(使用和&或)
- google-cloud-storage - Google AutoML Vision 不接受图像导入
- c++ - C++ 17 有静态反射吗?
- mysql - 将 Access SQL 内部联接查询转换为 mySQL 查询的问题
- unity3d - 在 Unity with AR Foundation 中检测时如何获取跟踪图片的位置?