[new feature] add overlay component

This commit is contained in:
陈嘉涵
2019-07-06 15:18:37 +08:00
parent 22c1b14bc2
commit f6e69f3caa
11 changed files with 280 additions and 16 deletions
+12 -9
View File
@@ -7,11 +7,11 @@ import { CreateElement, RenderContext } from 'vue/types';
import { DefaultSlots } from '../utils/types';
export type OverlayProps = {
zIndex?: number;
show?: boolean;
zIndex?: number | string;
duration: number | string | null;
className?: any;
visible?: boolean;
duration: number | null;
customStyle?: object;
customStyle?: any;
};
export type OverlayEvents = {
@@ -42,7 +42,7 @@ function Overlay(
return (
<transition name="van-fade">
<div
vShow={props.visible}
vShow={props.show}
style={style}
class={[bem(), props.className]}
onTouchmove={preventTouchMove}
@@ -53,12 +53,15 @@ function Overlay(
}
Overlay.props = {
zIndex: Number,
show: Boolean,
className: null as any,
visible: Boolean,
customStyle: Object,
customStyle: null as any,
zIndex: {
type: [Number, String],
default: 1
},
duration: {
type: Number,
type: [Number, String],
default: null
}
};