[Doc] new theme

This commit is contained in:
陈嘉涵
2019-05-15 20:53:04 +08:00
parent 3cae4288f2
commit d0f4169c86
130 changed files with 1460 additions and 1147 deletions
+9 -6
View File
@@ -1,21 +1,23 @@
## Layout
# Layout
### Intro
Quickly and easily create layouts with `van-row` and `van-col`
### Install
``` javascript
import { Row, Col } from 'vant';
Vue.use(Row).use(Col);
```
### Usage
## Usage
#### Basic Usage
### Basic Usage
Layout are based on 24-column. The attribute `span` in `Col` means the number of column the grid spans. Of course, You can use `offset` attribute to set number of spacing on the left side of the grid.
```html
<van-row>
<van-col span="8">span: 8</van-col>
@@ -35,7 +37,7 @@ Layout are based on 24-column. The attribute `span` in `Col` means the number of
```
#### Column Spacing
### Column Spacing
Set grid spacing using `gutter` attribute. The default value is 0
@@ -48,7 +50,7 @@ Set grid spacing using `gutter` attribute. The default value is 0
</van-row>
```
#### Flex Layout
### Flex Layout
Setting `type` to `flex` to enable flex layout
@@ -84,6 +86,7 @@ Setting `type` to `flex` to enable flex layout
</van-row>
```
## API
### Row Props
+13 -7
View File
@@ -1,17 +1,21 @@
## Layout 布局
# Layout 布局
提供了`van-row``van-col`两个组件来进行行列布局
### 介绍
Layout 提供了`van-row``van-col`两个组件来进行行列布局
### 引入
### 使用指南
``` javascript
import { Row, Col } from 'vant';
Vue.use(Row).use(Col);
```
### 代码演示
## 代码演示
#### 基本用法
### 基本用法
Layout 组件提供了`24列栅格`,通过在`Col`上添加`span`属性设置列所占的宽度百分比
此外,添加`offset`属性可以设置列的偏移宽度,计算方式与 span 相同
@@ -33,7 +37,7 @@ Layout 组件提供了`24列栅格`,通过在`Col`上添加`span`属性设置
</van-row>
```
#### 设置列元素间距
### 设置列元素间距
通过`gutter`属性可以设置列元素之间的间距,默认间距为 0
@@ -45,7 +49,7 @@ Layout 组件提供了`24列栅格`,通过在`Col`上添加`span`属性设置
</van-row>
```
#### Flex 布局
### Flex 布局
将 `type` 属性设置为 flex 可以启用 flex 布局,便于进行灵活的对齐
@@ -86,6 +90,8 @@ Layout 组件提供了`24列栅格`,通过在`Col`上添加`span`属性设置
</van-row>
```
## API
### Row Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |