types(Dialog): dialog fn use ts (#8114)

This commit is contained in:
neverland
2021-02-09 21:03:11 +08:00
committed by GitHub
parent 9c3dbfc0b6
commit 89b65077d3
3 changed files with 47 additions and 11 deletions
+2 -1
View File
@@ -13,6 +13,7 @@ import ActionBarButton from '../action-bar-button';
const [createComponent, bem, t] = createNamespace('dialog');
export type DialogTheme = 'default' | 'round-button';
export type DialogAction = 'confirm' | 'cancel';
export type DialogMessageAlign = 'left' | 'center' | 'right';
@@ -26,7 +27,7 @@ export default createComponent({
props: {
...popupSharedProps,
title: String,
theme: String,
theme: String as PropType<DialogTheme>,
width: [Number, String],
message: String,
callback: Function as PropType<(action?: DialogAction) => void>,