[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
+8 -5
View File
@@ -1,4 +1,4 @@
## Lazyload
# Lazyload
### Install
@@ -9,9 +9,9 @@ import { Lazyload } from 'vant';
Vue.use(Lazyload, options);
```
### Usage
## Usage
#### Basic Usage
### Basic Usage
```html
<img v-for="img in imageList" v-lazy="img" >
@@ -30,14 +30,15 @@ export default {
}
```
#### Lazyload Background Image
### Lazyload Background Image
Use `v-lazy:background-image` to set background url, and declare the height of the container.
```html
<div v-for="img in imageList" v-lazy:background-image="img" />
```
#### Lazyload Component
### Lazyload Component
```html
<lazy-component>
@@ -45,6 +46,8 @@ Use `v-lazy:background-image` to set background url, and declare the height of t
</lazy-component>
```
## API
### Options
| Attribute | Description | Type | Default |
+9 -6
View File
@@ -1,6 +1,6 @@
## Lazyload 图片懒加载
# Lazyload 图片懒加载
### 使用指南
### 引入
`Lazyload``Vue` 指令,使用前需要对指令进行注册
@@ -12,9 +12,10 @@ import { Lazyload } from 'vant';
Vue.use(Lazyload, options);
```
### 代码演示
## 代码演示
### 基础用法
#### 基础用法
`v-lazy`指令的值设置为你需要懒加载的图片
```html
@@ -34,7 +35,7 @@ export default {
}
```
#### 背景图懒加载
### 背景图懒加载
和图片懒加载不同,背景图懒加载需要使用`v-lazy:background-image`,值设置为背景图片的地址,需要注意的是必须声明容器高度。
@@ -42,7 +43,7 @@ export default {
<div v-for="img in imageList" v-lazy:background-image="img" />
```
#### 懒加载模块
### 懒加载模块
懒加载模块需要使用到`lazy-component`,将需要懒加载的内容放在`lazy-component`中即可。
@@ -52,6 +53,8 @@ export default {
</lazy-component>
```
## API
### Options
| 参数 | 说明 | 类型 | 默认值 | 版本 |