Skip to content

Commit 086dfe9

Browse files
committed
fix(Dialog): fixed update button attribute not reset opentype
1 parent b3466bc commit 086dfe9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dialog/dialog.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export default class Dialog extends SuperComponent {
5757
class: [...cls, `${classPrefix}__button--${key}`],
5858
externalClass: [...externalCls, `${prefix}-class-${key}`],
5959
variant: rect.buttonVariant,
60+
openType: '',
6061
};
6162

6263
if (key === 'cancel' && rect.buttonVariant === 'base') {
@@ -95,7 +96,7 @@ export default class Dialog extends SuperComponent {
9596
}
9697
}
9798

98-
const hasOpenType = 'openType' in button;
99+
const hasOpenType = !!button.openType;
99100
if (!hasOpenType && ['confirm', 'cancel'].includes(type)) {
100101
this[toCamel(`on-${type}`)]?.(type);
101102
}

0 commit comments

Comments
 (0)