docs: update slot's description (#116)

* docs: update slot's description
This commit is contained in:
hangzou 2020-09-24 17:19:00 +08:00 committed by GitHub
parent 0e2253b6a8
commit 4318ca17e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 0 deletions

View File

@ -186,7 +186,24 @@ const App = {
### 插槽 ### 插槽
> 注意: 在 `jsx` 中,应该使用 **`v-slots`** 代替 *`v-slot`*
```jsx ```jsx
const App = {
setup() {
const slots = {
foo: () => <span>B</span>
};
return () => (
<A v-slots={slots}>
<div>A</div>
</A>
);
}
};
// or
const App = { const App = {
setup() { setup() {
const slots = { const slots = {

View File

@ -186,7 +186,24 @@ const App = {
### Slot ### Slot
> Note: In `jsx`, *`v-slot`* should be replace with **`v-slots`**
```jsx ```jsx
const App = {
setup() {
const slots = {
foo: () => <span>B</span>
};
return () => (
<A v-slots={slots}>
<div>A</div>
</A>
);
}
};
// or
const App = { const App = {
setup() { setup() {
const slots = { const slots = {