From 8d379e0f000a8c35bcc19cc80c1695442fb97d14 Mon Sep 17 00:00:00 2001 From: neverland Date: Sun, 14 Feb 2021 18:41:34 +0800 Subject: [PATCH] types(Popup): position type (#8157) --- src/popup/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/popup/index.tsx b/src/popup/index.tsx index ada985899..2509a0d29 100644 --- a/src/popup/index.tsx +++ b/src/popup/index.tsx @@ -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, default: 'center', }, closeIcon: {