|
@@ -6,6 +6,7 @@ import { yTDoubleConfirm } from '../components/ToastBuilders/YtDoubleConfirm';
|
|
|
import { agreePrivacy } from '../components/ToastBuilders/AgreePrivacy';
|
|
import { agreePrivacy } from '../components/ToastBuilders/AgreePrivacy';
|
|
|
import { LoginCollect } from '../models/LoginCollect';
|
|
import { LoginCollect } from '../models/LoginCollect';
|
|
|
import { loginToUse } from '../components/ToastBuilders/LoginToUse';
|
|
import { loginToUse } from '../components/ToastBuilders/LoginToUse';
|
|
|
|
|
+import { AlertToastBuilder } from '../components/ToastBuilders/AlertToastComp';
|
|
|
|
|
|
|
|
interface InitOption {
|
|
interface InitOption {
|
|
|
context?: UIContext;
|
|
context?: UIContext;
|
|
@@ -23,6 +24,12 @@ export class Params<T> implements BasicType<T> {
|
|
|
message?: string
|
|
message?: string
|
|
|
loginType?: LoginCollect
|
|
loginType?: LoginCollect
|
|
|
click?: () => void
|
|
click?: () => void
|
|
|
|
|
+ onConfirm?: (text: string) => void
|
|
|
|
|
+ onCancel?: () => void
|
|
|
|
|
+ messageAlignSelf?: ItemAlign
|
|
|
|
|
+ confirmMessage?: string
|
|
|
|
|
+ cancelMessage?: string
|
|
|
|
|
+ isShowClose?: boolean
|
|
|
|
|
|
|
|
constructor(item: BasicType = {}) {
|
|
constructor(item: BasicType = {}) {
|
|
|
this.src = item.src;
|
|
this.src = item.src;
|
|
@@ -33,6 +40,12 @@ export class Params<T> implements BasicType<T> {
|
|
|
this.message = item.message;
|
|
this.message = item.message;
|
|
|
this.acSrc = item.acSrc;
|
|
this.acSrc = item.acSrc;
|
|
|
this.loginType = item.loginType;
|
|
this.loginType = item.loginType;
|
|
|
|
|
+ this.onConfirm = item.onConfirm
|
|
|
|
|
+ this.onCancel = item.onCancel
|
|
|
|
|
+ this.messageAlignSelf = item.messageAlignSelf
|
|
|
|
|
+ this.confirmMessage = item.confirmMessage
|
|
|
|
|
+ this.cancelMessage = item.cancelMessage
|
|
|
|
|
+ this.isShowClose = item.isShowClose
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -101,7 +114,9 @@ export class YTToast {
|
|
|
loginToUse(item: BasicType = {}) {
|
|
loginToUse(item: BasicType = {}) {
|
|
|
this.openToast(wrapBuilder(loginToUse), item)
|
|
this.openToast(wrapBuilder(loginToUse), item)
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ alertToast(item: BasicType<undefined>) {
|
|
|
|
|
+ this.openToast(wrapBuilder(AlertToastBuilder), item)
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
hide() {
|
|
hide() {
|
|
|
try {
|
|
try {
|