[Doc] add build-in style document (#633)

This commit is contained in:
neverland
2018-02-09 16:38:44 +08:00
committed by GitHub
parent 6ac8a8d2c0
commit 6f52b59d50
15 changed files with 216 additions and 33 deletions
+47
View File
@@ -0,0 +1,47 @@
## 内置样式
Vant 中默认包含了一些常用样式,可以直接通过 className 的方式使用。
### 文字省略
当文本内容长度超过容器最大宽度时,自动省略多余的文本。
```html
<div class="van-ellipsis">这是一段宽度限制 250px 的文字,后面的内容会省略</div>
```
### 1px 边框
为元素添加 Retina 屏幕下的 1px 边框(即 hairline),基于伪类 transform 实现。
```html
<!-- 上边框 -->
<div class="van-hairline--top"></div>
<!-- 下边框 -->
<div class="van-hairline--bottom"></div>
<!-- 左边框 -->
<div class="van-hairline--left"></div>
<!-- 右边框 -->
<div class="van-hairline--right"></div>
<!-- 上下边框 -->
<div class="van-hairline--top-bottom"></div>
<!-- 全边框 -->
<div class="van-hairline--surround"></div>
```
### 动画
可以通过 `transition` 组件使用内置的动画
```html
<!-- 淡入 -->
<transition name="van-fade">
<div v-show="visible">Fade</div>
</transition>
<!-- 下滑 -->
<transition name="van-slide-bottom">
<div v-show="visible">Fade</div>
</transition>
```
+2 -3
View File
@@ -110,8 +110,7 @@ export default {
| discount | 折扣(0为满减券)88=>8.8折 | `Number` |
| denominations | 面值(0为折扣券)单位分 | `Number` |
| origin_condition | 满减条件(0为无门槛,满XX元可用)单位分 | `Number` |
| start_at | 卡有效开始时间 | `Number` |
| end_at | 卡失效日期 | `Number` |
| start_at | 卡有效开始时间 (时间戳, 单位秒) | `Number` |
| end_at | 卡失效日期 (时间戳, 单位秒) | `Number` |
| reason | 不可用原因 | `String` |
| value | 订单优惠金额,单位分 | `Number` |