mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-03 04:39:09 +08:00
doc: add load transiton on demand, fixed #4758
This commit is contained in:
parent
afb6625d7c
commit
627c29cc69
@ -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: () => ({
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user