1 Star 0 Fork 7

〓涩『果』〓 / 网易云tv版

forked from Rojer / 网易云tv版 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.d.ts 3.30 KB
一键复制 编辑 原始数据 按行查看 历史
Rojer 提交于 2021-07-23 12:30 . style: :lipstick:eslint
declare module 'react-native-image-animation';
declare module '@unsw-gsbme/react-native-keep-awake';
interface CallbackResult {
/** 错误信息 */
errMsg: string;
}
interface SuccessCallbackResult extends CallbackResult {
/** 为 true 时,表示用户点击了取消(用于 Android 系统区分点击蒙层关闭还是点击取消按钮关闭) */
cancel: boolean;
/** 为 true 时,表示用户点击了确定按钮 */
confirm: boolean;
/** 调用结果 */
errMsg: string;
}
interface ModalOption {
/** 取消按钮的文字颜色,必须是 16 进制格式的颜色字符串 */
cancelColor?: string;
/** 取消按钮的文字,最多 4 个字符 */
cancelText?: string;
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
complete?: (res: CallbackResult) => void;
/** 确认按钮的文字颜色,必须是 16 进制格式的颜色字符串 */
confirmColor?: string;
/** 确认按钮的文字,最多 4 个字符 */
confirmText?: string;
/** 提示的内容 */
content?: string;
/** 接口调用失败的回调函数 */
fail?: (res: CallbackResult) => void;
/** 是否显示取消按钮 */
showCancel?: boolean;
/** 接口调用成功的回调函数 */
success?: (result: SuccessCallbackResult) => void;
/** 提示的标题 */
title?: string;
}
interface ToastOption {
/** 提示的内容 */
title: string;
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
complete?: (res: CallbackResult) => void;
/** 提示的延迟时间 */
duration?: number;
/** 接口调用失败的回调函数 */
fail?: (res: CallbackResult) => void;
/** 图标
*
* 可选值:
* - 'success': 显示成功图标,此时 title 文本最多显示 7 个汉字长度;
* - 'loading': 显示加载图标,此时 title 文本最多显示 7 个汉字长度;
* - 'none': 不显示图标,此时 title 文本最多可显示两行 */
icon?: 'success' | 'loading' | 'none';
/** 自定义图标的本地路径,image 的优先级高于 icon */
image?: string;
/** 是否显示透明蒙层,防止触摸穿透 */
mask?: boolean;
/** 接口调用成功的回调函数 */
success?: (res: CallbackResult) => void;
}
interface ShowLoadingOption {
/** 提示的内容 */
title: string;
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
complete?: (res: CallbackResult) => void;
/** 接口调用失败的回调函数 */
fail?: (res: CallbackResult) => void;
/** 是否显示透明蒙层,防止触摸穿透 */
mask?: boolean;
/** 接口调用成功的回调函数 */
success?: (res: CallbackResult) => void;
}
interface HideToastOption {
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
complete?: (res: CallbackResult) => void;
/** 接口调用失败的回调函数 */
fail?: (res: CallbackResult) => void;
/** 接口调用成功的回调函数 */
success?: (res: CallbackResult) => void;
}
declare var showModal: (obj: ModalOption) => Promise<SuccessCallbackResult>;
declare var showToast: (options: ToastOption) => Promise<CallbackResult>;
declare var showLoading: (
options: ShowLoadingOption,
) => Promise<CallbackResult>;
declare var hideToast: (opts?: HideToastOption) => void;
declare var hideLoading: (opts?: HideToastOption) => void;
JavaScript
1
https://gitee.com/qi5000000/netease-cloud-music-tv-rn.git
git@gitee.com:qi5000000/netease-cloud-music-tv-rn.git
qi5000000
netease-cloud-music-tv-rn
网易云tv版
master

搜索帮助