You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`name` - string, Used to automatically generate transition CSS class names. e.g. `name: 'fade'`will auto expand to `.fade-enter`, `.fade-enter-active`, etc. Defaults to `"v"`.
1659
-
-`appear` - boolean, Whether to apply transition on initial render. Defaults to `false`.
1660
-
-`css` - boolean, Whether to apply CSS transition classes. Defaults to `true`. If set to `false`, will only trigger JavaScript hooks registered via component events.
1661
-
-`type` - string, Specify the type of transition events to wait for to determine transition end timing. Available values are `"transition"`and`"animation"`. By default, it will automatically detect the type that has a longer duration.
1662
-
-`mode` - string, Controls the timing sequence of leaving/entering transitions. Available modes are `"out-in"`and`"in-out"`; defaults to simultaneous.
`<transition>`serve as transition effects for **single** element/component. The `<transition>`does not render an extra DOM element, nor does it show up in the inspected component hierarchy. It simply applies the transition behavior to the wrapped content inside.
1682
+
`<transition>`元素作为单个元素/组件的过渡效果。`<transition>`不会渲染额外的 DOM 元素,也不会出现在检测过的组件层级中。它只是将内容包裹在其中,简单的运用过渡行为。
1684
1683
1685
1684
```html
1686
-
<!--simple element-->
1685
+
<!--简单元素-->
1687
1686
<transition>
1688
1687
<divv-if="ok">toggled content</div>
1689
1688
</transition>
1690
1689
1691
-
<!--dynamic component-->
1690
+
<!--动态组件-->
1692
1691
<transitionname="fade"mode="out-in"appear>
1693
1692
<component:is="view"></component>
1694
1693
</transition>
1695
1694
1696
-
<!--event hooking-->
1695
+
<!--事件钩子-->
1697
1696
<divid="transition-demo">
1698
1697
<transition@after-enter="transitionComplete">
1699
1698
<divv-show="ok">toggled content</div>
@@ -1706,32 +1705,32 @@ type: api
1706
1705
...
1707
1706
methods: {
1708
1707
transitionComplete:function (el) {
1709
-
//for passed 'el' that DOM element as the argument, something ...
1708
+
//传入 'el' 这个 DOM 元素作为参数。
1710
1709
}
1711
1710
}
1712
1711
...
1713
1712
}).$mount('#transition-demo')
1714
1713
```
1715
1714
1716
-
-**See also:**[Transitions: Entering, Leaving, and Lists](/guide/transitions.html)
1715
+
-**另见:**[过渡:进入,离开和列表](/guide/transitions.html)
1717
1716
1718
1717
### transition-group
1719
1718
1720
-
-**Props:**
1721
-
-`tag` - string, defaults to `span`.
1722
-
-`move-class` - overwrite CSS class applied during moving transition.
1723
-
-exposes the same props as `<transition>`except `mode`.
1719
+
-**特性:**
1720
+
-`tag` - string, 默认为 `span`
1721
+
-`move-class` - 覆盖移动过渡期间应用的 CSS 类。
1722
+
-除了 `mode`,其他特性和 `<transition>`相同。
1724
1723
1725
-
-**Events:**
1726
-
-exposes the same events as `<transition>`.
1724
+
-**事件:**
1725
+
-事件和 `<transition>` 相同.
1727
1726
1728
-
-**Usage:**
1727
+
-**用法:**
1729
1728
1730
-
`<transition-group>`serve as transition effects for **multiple** elements/components. The `<transition-group>`renders a real DOM element. By default it renders a `<span>`, and you can configure what element is should render via the `tag`attribute.
1729
+
`<transition-group>`元素作为多个元素/组件的过渡效果。`<transition-group>`渲染一个真实的 DOM 元素。默认渲染 `<span>`,可以通过 `tag`属性配置哪个元素应该被渲染。
1731
1730
1732
-
Note every child in a `<transition-group>`must be **uniquely keyed**for the animations to work properly.
`<transition-group>`supports moving transitions via CSS transform. When a child's position on screen has changed after an updated, it will get applied a moving CSS class (auto generated from the `name`attribute or configured with the `move-class`attribute). If the CSS `transform`property is "transition-able" when the moving class is applied, the element will be smoothly animated to its destination using the [FLIP technique](https://aerotwist.com/blog/flip-your-animations/).
-**See also:**[Transitions: Entering, Leaving, and Lists](/guide/transitions.html)
1743
+
-**另见:**[过渡:进入,离开和列表](/guide/transitions.html)
1745
1744
1746
1745
### keep-alive
1747
1746
1748
-
-**Usage:**
1747
+
-**用法:**
1749
1748
1750
-
When wrapped around a dynamic component, `<keep-alive>`caches the inactive component instances without destroying them. Similar to `<transition>`, `<keep-alive>`is an abstract component: it doesn't render a DOM element itself, and doesn't show up in the component parent chain.
1749
+
`<keep-alive>`包裹动态组件时,会缓存不活动的组件实例,而不是销毁它们。和 `<transition>` 相似,`<keep-alive>`是一个抽象组件:它自身不会渲染一个 DOM 元素,也不会出现在父组件链中。
1751
1750
1752
-
When a component is toggled inside `<keep-alive>`, its`activated`and`deactivated`lifecycle hooks will be invoked accordingly.
0 commit comments