研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
blockly > 回收站 > emptyContents
Trashcan.emptyContents() 方法
清空垃圾箱中的内容。如果内容浮出控件当前处于打开状态,那么它将被关闭。
Signature:
emptyContents(): void;
返回:
void
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-12。
[null,null,["最后更新时间 (UTC):2024-09-12。"],[[["`emptyContents()` is a method within the `Trashcan` class of Blockly that clears out all items held within the trashcan."],["Executing this method will also automatically close the contents-flyout if it happens to be open at the time."],["The method does not return any value (void)."]]],["The `emptyContents()` method within the Trashcan class clears the trashcan's contents. It also closes the trashcan's flyout if it is currently displayed. This method does not return any value, as indicated by the `void` return type. The method's sole action is to empty the trashcan and, if needed, to close the related flyout.\n"]]