Skip to content

Commit eaa1dee

Browse files
author
陈华狄
committed
readme
1 parent e394906 commit eaa1dee

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

README.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
11
# vue-imagefill
2-
>vue图片填充指令,支持vue2.0以上
2+
>A Vue.js 2.0 images fill directives
33
4-
>现在还是测试版,请勿使用,有空再修
5-
## 安装
6-
7-
**npm:**
4+
## Install
85

96
```shell
107
$ npm install vue-imagefill
118
```
9+
10+
## Usage
11+
```html
12+
<template>
13+
<div>
14+
<div class="image-wrap" v-flex="1">
15+
<img v-center="img">
16+
</div>
17+
</div>
18+
</template>
19+
```
20+
21+
```javascript
22+
import Vue from 'vue'
23+
import vueImagefill from 'vue-imagefill'
24+
Vue.use(vueImagefill)
25+
```
26+
27+
```style
28+
.image-wrap {
29+
width: 200px;
30+
overflow: hidden;
31+
margin: 150px auto;
32+
}
33+
img {
34+
width: 100%;
35+
}
36+
```

0 commit comments

Comments
 (0)