docs: update README

This commit is contained in:
Amour1688 2020-12-07 23:17:45 +08:00
parent 5b6323f22a
commit a0a60ee46d
2 changed files with 34 additions and 0 deletions

View File

@ -213,6 +213,23 @@ const App = {
return () => <A v-slots={slots} />;
}
};
// or
const App = {
setup() {
return () => (
<>
<A>
{
default: () => <div>A</div>,
foo: () => <span>B</span>
}
</A>
<B>{() => 'foo'}</B>
</>
);
}
}
```
### 在 TypeSript 中使用

View File

@ -213,6 +213,23 @@ const App = {
return () => <A v-slots={slots} />;
}
};
// or
const App = {
setup() {
return () => (
<>
<A>
{
default: () => <div>A</div>,
foo: () => <span>B</span>
}
</A>
<B>{() => 'foo'}</B>
</>
);
}
}
```
### In TypeScript