docs: add teleport link (#9176)
This commit is contained in:
@@ -98,24 +98,8 @@ Use `teleport` prop to specify mount location.
|
||||
|
||||
<!-- teleport to #app -->
|
||||
<van-popup v-model:show="show" teleport="#app" />
|
||||
|
||||
<!-- teleport to Element -->
|
||||
<van-popup v-model:show="show" :teleport="myContainer" />
|
||||
```
|
||||
|
||||
```js
|
||||
export default {
|
||||
setup() {
|
||||
const myContainer = document.querySelector('.my-container');
|
||||
return {
|
||||
myContainer,
|
||||
};
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
> Tips: The teleport prop cannot be used on the root node
|
||||
|
||||
## API
|
||||
|
||||
### Props
|
||||
|
||||
Reference in New Issue
Block a user