Skip to content

Commit

Permalink
feat(n-tabs): add n-tab-pane usage prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
jahnli committed Jan 24, 2025
1 parent abea5be commit 90b1ce8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 9 additions & 2 deletions src/tabs/demos/enUS/index.demo-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@

Switch contents in same area.

<n-alert type="warning" title="Note" :bordered="false">
<n-text code>n-tabs</n-text> will extract default tab value from default slot, so there would be a vue slot warning. If you don't want to see the warning, you should give component a <n-text code>default-value</n-text>.
<n-alert type="warning" title="注意" style="margin-bottom: 16px;" :bordered="false">
<n-ul align-text>
<li>
<n-text code>n-tabs</n-text> will extract default tab value from default slot, so there would be a vue slot warning. If you don't want to see the warning, you should give component a <n-text code>default-value</n-text>.
</li>
<li>
Due to technical limitation, <n-text code>n-tab-pane</n-text> can't be encapsulated in another component.
</li>
</n-ul>
</n-alert>

## Demos
Expand Down
11 changes: 9 additions & 2 deletions src/tabs/demos/zhCN/index.demo-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@

在同一块区域切换内容。

<n-alert type="warning" title="注意" :bordered="false">
<n-text code>n-tabs</n-text> 默认情况下会从 slot 获取默认展示的 tab 值,因此会产生一个 vue slot 的 warning。如果你不想看到这个 warning,请设定一个 <n-text code>default-value</n-text>。
<n-alert type="warning" title="注意" style="margin-bottom: 16px;" :bordered="false">
<n-ul align-text>
<li>
<n-text code>n-tabs</n-text> 默认情况下会从 slot 获取默认展示的 tab 值,因此会产生一个 vue slot 的 warning。如果你不想看到这个 warning,请设定一个 <n-text code>default-value</n-text>。
</li>
<li>
由于技术限制,<n-text code>n-tab-pane</n-text> 是无法被二次封装的。
</li>
</n-ul>
</n-alert>

## 演示
Expand Down

0 comments on commit 90b1ce8

Please sign in to comment.