docs(Overlay): add embedded content demo (#4982)
This commit is contained in:
@@ -29,6 +29,31 @@ export default {
|
||||
},
|
||||
```
|
||||
|
||||
### Embedded Content
|
||||
|
||||
```html
|
||||
<van-overlay :show="show" @click="show = false">
|
||||
<div class="wrapper" @click.stop>
|
||||
<div class="block" />
|
||||
</div>
|
||||
</van-overlay>
|
||||
|
||||
<style>
|
||||
.wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.block {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### Props
|
||||
|
||||
Reference in New Issue
Block a user