Skip to content

Commit f235a75

Browse files
committed
Add docs about default placeholders of slots in template
1 parent d80f82b commit f235a75

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/concepts/custom-templates.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ bricks:
101101
- brick: slot
102102
properties:
103103
name: extra
104+
# If no bricks is passed in for the slot, will use children of the slot instead
105+
# (only children of the default empty-named slots).
106+
children:
107+
- brick: p
108+
properties:
109+
textContent: I'm a default placeholder
104110
```
105111
106112
在 Storyboard 中使用:

i18n/zh/docusaurus-plugin-content-docs/current/concepts/custom-templates.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ bricks:
101101
- brick: slot
102102
properties:
103103
name: extra
104+
# 如果该插槽没有构件传递进来,将使用该插槽的子构件作为替代
105+
# (仅默认的名字为空的插槽的子构件)
106+
children:
107+
- brick: p
108+
properties:
109+
textContent: I'm a default placeholder
104110
```
105111
106112
在 Storyboard 中使用:

0 commit comments

Comments
 (0)