✏️ 修正类型错误

This commit is contained in:
目棃
2024-10-22 20:46:13 +08:00
parent e5a917b07b
commit 0d37f4e82b
3 changed files with 7 additions and 7 deletions

View File

@@ -38,7 +38,6 @@ let confirmInstance: VNode;
/**
* @function showConfirm
* @since Beta v0.3.9
* @todo 重载重构
* @description 弹出 confirm
* @param {TGApp.Component.Confirm.Params} props confirm 的参数
* @return {Promise<string | boolean | undefined>} 点击确认返回 true点击取消返回 false点击外部返回 undefined

View File

@@ -35,7 +35,6 @@ const renderBox = (props: TGApp.Component.Snackbar.Params): VNode => {
let snackbarInstance: VNode;
// todo 参数重构
function showSnackbar(props: TGApp.Component.Snackbar.Params): void {
if (snackbarInstance !== undefined) {
const boxVue = <SnackbarInstance>snackbarInstance.component;

View File

@@ -153,7 +153,7 @@ class TGClient {
/**
* @func handleCallback
* @since Beta v0.6.0
* @since Beta v0.6.1
* @desc 处理米游社客户端的 callback
* @param {Event<string>} arg - 事件参数
* @returns {Promise<void>} - 返回值
@@ -237,7 +237,7 @@ class TGClient {
break;
case "openSystemBrowser":
await this.openSystemBrowser(
<TGApp.Plugins.JSBrigde.Arg<TGApp.Plugins.JSBridge.OpenSystemBrowserPayload>>argParse,
<TGApp.Plugins.JSBridge.Arg<TGApp.Plugins.JSBridge.OpenSystemBrowserPayload>>argParse,
);
break;
case "pushPage":
@@ -763,14 +763,16 @@ class TGClient {
/**
* @func openSystemBrowser
* @since Beta v0.6.0
* @since Beta v0.6.1
* @desc 打开系统浏览器
* @param {TGApp.Plugins.JSBridge.Arg<TGApp.Plugins.JSBridge.OpenSystemBrowserPayload>} arg - 方法参数
* @returns {Promise<void>}
*/
async openSystemBrowser(arg: TGApp.Plugins.JSBridge.OpenSystemBrowserPayload): Promise<void> {
async openSystemBrowser(
arg: TGApp.Plugins.JSBridge.Arg<TGApp.Plugins.JSBridge.OpenSystemBrowserPayload>,
): Promise<void> {
console.log(`[openSystemBrowser] ${JSON.stringify(arg)}`);
const url = arg.open_url;
const url = arg.payload.open_url;
window.open(url);
}