types(Popup): position type (#8157)

This commit is contained in:
neverland 2021-02-14 18:41:34 +08:00 committed by GitHub
parent d8e7489081
commit 8d379e0f00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,8 @@ import { useLazyRender } from '../composables/use-lazy-render';
import Icon from '../icon';
import Overlay from '../overlay';
export type PopupPosition = 'top' | 'left' | 'bottom' | 'right' | 'center';
export type PopupCloseIconPosition =
| 'top-left'
| 'top-right'
@ -83,7 +85,7 @@ export default createComponent({
closeOnPopstate: Boolean,
safeAreaInsetBottom: Boolean,
position: {
type: String,
type: String as PropType<PopupPosition>,
default: 'center',
},
closeIcon: {