doc: add load transiton on demand, fixed #4758

This commit is contained in:
qingwei.li 2017-05-09 10:15:43 +08:00 committed by 杨奕
parent afb6625d7c
commit 627c29cc69
2 changed files with 24 additions and 0 deletions

View File

@ -142,6 +142,18 @@ For collapse effect, use the `el-collapse-transition` component.
```
:::
### On demand
```js
// fade/zoom
import 'element-ui/lib/theme-defaut/base.css';
// collapse
import CollapseTransition from 'element-ui/lib/transitions/collapse-transition';
import Vue from 'vue'
Vue.component(CollapseTransition.name, CollapseTransition)
```
<script>
module.exports = {
data: () => ({

View File

@ -142,6 +142,18 @@ Element 内应用在部分组件的过渡动画,你也可以直接使用。在
```
:::
### 按需引入
```js
// fade/zoom 等
import 'element-ui/lib/theme-defaut/base.css';
// collapse 展开折叠
import CollapseTransition from 'element-ui/lib/transitions/collapse-transition';
import Vue from 'vue'
Vue.component(CollapseTransition.name, CollapseTransition)
```
<style>
.transition-box {
margin-bottom: 10px;