包含在找不到查询结果时用于渲染内容的块元素。
块关系
祖先 块:
– core/query
属性
通过 block.json 中的 attributes 属性定义。
此块没有自定义属性。
支持
通过 block.json 中的 supports 属性定义。
anchor:truealign:truereusable:falsehtml:falsebackground:backgroundImage:truebackgroundSize:truegradients:true
color:dimensions:minHeight:trueminWidth:true
spacing:padding:truemargin:true
typography:fontSize:truelineHeight:true
interactivity:clientNavigation:true
shadow:true
上下文
通过 block.json 中的 usesContext 和 providesContext 属性定义。
使用的上下文:
queryIdquery
块标记
这是一个 混合块。它保存静态标记,服务器在渲染时可能会对其进行增强。
<!-- wp:query-no-results -->
<!-- wp:paragraph {"placeholder":"Add a text or blocks that will display when the query returns no results."} -->
<p></p>
<!-- /wp:paragraph -->
<!-- /wp:query-no-results -->
来源
- block.json (参考)
- 源代码目录 — 浏览
edit和save源文件、index.php等。