Merge branch '2.x' into dev
This commit is contained in:
@@ -127,6 +127,7 @@ export default {
|
||||
| close-icon | Close icon name | _string_ | `cross` |
|
||||
| close-icon-position | Close Icon Position,can be set to `top-left` `bottom-left` `bottom-right` | _string_ | `top-right` |
|
||||
| transition | Transition, equivalent to `name` prop of [transtion](https://v3.vuejs.org/api/built-in-components.html#transition) | _string_ | - |
|
||||
| transition-appear `v2.10.14` | Whether to apply transition on initial render | _boolean_ | `false` |
|
||||
| teleport | Return the mount node for Popup | _string \| Element_ | - |
|
||||
| safe-area-inset-bottom `v2.2.1` | Whether to enable bottom safe area adaptation | _boolean_ | `false` |
|
||||
|
||||
|
||||
@@ -137,6 +137,7 @@ export default {
|
||||
| close-icon | 关闭图标名称或图片链接 | _string_ | `cross` |
|
||||
| close-icon-position | 关闭图标位置,可选值为`top-left`<br>`bottom-left` `bottom-right` | _string_ | `top-right` |
|
||||
| transition | 动画类名,等价于 [transtion](https://v3.cn.vuejs.org/api/built-in-components.html#transition) 的`name`属性 | _string_ | - |
|
||||
| transition-appear `v2.10.14` | 是否在初始渲染时启用过渡动画 | _boolean_ | `false` |
|
||||
| teleport | 指定挂载的节点 | _string \| Element_ | - |
|
||||
| safe-area-inset-bottom | 是否开启[底部安全区适配](#/zh-CN/advanced-usage#di-bu-an-quan-qu-gua-pei) | _boolean_ | `false` |
|
||||
|
||||
|
||||
+4
-1
@@ -45,6 +45,8 @@ export const popupSharedProps = {
|
||||
overlayStyle: Object,
|
||||
// overlay custom class name
|
||||
overlayClass: String,
|
||||
// Initial rendering animation
|
||||
transitionAppear: Boolean,
|
||||
// whether to show overlay
|
||||
overlay: {
|
||||
type: Boolean,
|
||||
@@ -208,13 +210,14 @@ export default createComponent({
|
||||
});
|
||||
|
||||
const renderTransition = () => {
|
||||
const { position, transition } = props;
|
||||
const { position, transition, transitionAppear } = props;
|
||||
const name =
|
||||
position === 'center' ? 'van-fade' : `van-popup-slide-${position}`;
|
||||
|
||||
return (
|
||||
<Transition
|
||||
name={transition || name}
|
||||
transitionAppear={transitionAppear}
|
||||
onAfterEnter={onOpened}
|
||||
onAfterLeave={onClosed}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user