docs: update component registration guide

This commit is contained in:
chenjiahan
2020-08-20 23:32:07 +08:00
parent 9a86e9e6ca
commit d42b1b43c3
124 changed files with 450 additions and 303 deletions
+9 -3
View File
@@ -3,10 +3,11 @@
### Install
```js
import Vue from 'vue';
import { createApp } from 'vue';
import { Popup } from 'vant';
Vue.use(Popup);
const app = createApp();
app.use(Popup);
```
## Usage
@@ -72,7 +73,12 @@ Use `position` prop to set popup display position
### Round Corner
```html
<van-popup v-model:show="show" round position="bottom" :style="{ height: '30%' }" />
<van-popup
v-model:show="show"
round
position="bottom"
:style="{ height: '30%' }"
/>
```
### Get Container
+9 -3
View File
@@ -7,10 +7,11 @@
### 引入
```js
import Vue from 'vue';
import { createApp } from 'vue';
import { Popup } from 'vant';
Vue.use(Popup);
const app = createApp();
app.use(Popup);
```
## 代码演示
@@ -82,7 +83,12 @@ export default {
设置`round`属性后,弹窗会根据弹出位置添加不同的圆角样式
```html
<van-popup v-model:show="show" round position="bottom" :style="{ height: '30%' }" />
<van-popup
v-model:show="show"
round
position="bottom"
:style="{ height: '30%' }"
/>
```
### 指定挂载位置