本文整理汇总了TypeScript中@skyux/modals.SkyConfirmService类的典型用法代码示例。如果您正苦于以下问题:TypeScript SkyConfirmService类的具体用法?TypeScript SkyConfirmService怎么用?TypeScript SkyConfirmService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SkyConfirmService类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: openYesNoCancelConfirm
public openYesNoCancelConfirm() {
const dialog: SkyConfirmInstance = this.confirmService.open({
message: 'Do you wish to continue?',
type: SkyConfirmType.YesNoCancel
});
dialog.closed.subscribe((result: any) => {
this.selectedAction = result.action;
});
}
示例2: openYesCancelConfirmWithBody
public openYesCancelConfirmWithBody() {
const dialog: SkyConfirmInstance = this.confirmService.open({
message: 'Do you wish to continue?',
body: 'This could be dangerous!',
type: SkyConfirmType.YesCancel
});
dialog.closed.subscribe((result: any) => {
this.selectedAction = result.action;
});
}
示例3: openCustomConfirm
public openCustomConfirm() {
const dialog: SkyConfirmInstance = this.confirmService.open({
message: 'What option are you going to select?',
type: SkyConfirmType.Custom,
buttons: [
{ text: '1', action: 'foo', styleType: 'primary' },
{ text: '2', action: 'bar' },
{ text: '3', action: 'baz', autofocus: true }
]
});
dialog.closed.subscribe((result: any) => {
this.selectedAction = result.action;
});
}