index.uts 414 字节
Newer Older
DCloud-yyl's avatar
DCloud-yyl 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13
import { ExitOptions, ExitFailCallback, ExitCompleteCallback, Exit} from "../interface.uts"
import { UniErrorSubject, UniErrors } from "../unierror.uts"


/**
 * 实现uni.exit
 * iOS平台不支持,触发错误回调
 */
export const exit : Exit = function (options: ExitOptions | null) {
	let err = new UniError(UniErrorSubject, 12001, UniErrors.get(12001)!);
	options?.fail?.(err)
	options?.complete?.(err)
}