From 326c71dd55d756531eed900f916bbcfc2d276f8d Mon Sep 17 00:00:00 2001 From: duqingquan Date: Tue, 9 Jul 2024 16:18:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E4=BF=AE=E6=94=B9=E8=AF=AD?= =?UTF-8?q?=E6=B3=95=E6=B5=8B=E8=AF=95=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/SyntaxCase/index.uvue | 41 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/pages/SyntaxCase/index.uvue b/pages/SyntaxCase/index.uvue index 06bbd73..73821e3 100644 --- a/pages/SyntaxCase/index.uvue +++ b/pages/SyntaxCase/index.uvue @@ -254,14 +254,13 @@ testUtsClassConstructor() { this.testUtsClassConstructorResult['callback'] = false id++ - let option = TestOptions( - 'name' + id, - (res) => { + test = new Test(id, { + name:'name' + id, + callback:(res) => { console.log(res) this.testUtsClassConstructorResult['callback'] = true } - ) - test = new Test(id, option) + } as TestOptions) }, testUtsClassStaticProp() { this.testUtsClassStaticPropResult = false @@ -338,23 +337,23 @@ this.testUtsClassSyncWithCallbackResult['return'] = false; this.testUtsClassSyncWithCallbackResult['success'] = false; this.testUtsClassSyncWithCallbackResult['complete'] = false; - let option = new AsyncOptions( - "success", - (res) => { - console.log("testSyncWithCallback.success.callback", res); - this.testUtsClassSyncWithCallbackResult['success'] = true; - }, - (res) => { - console.log("testSyncWithCallback.fail.callback", res); - // testUtsClassSyncWithCallbackResult.fail = true; - }, - (res) => { - console.log("testSyncWithCallback.complete.callback", res); - this.testUtsClassSyncWithCallbackResult['complete'] = true; - }, - ) + if ( - test!.testClassSyncWithCallback(option).name === "testSyncWithCallback" + test!.testClassSyncWithCallback({ + type:"success", + success:(res) => { + console.log("testSyncWithCallback.success.callback", res); + this.testUtsClassSyncWithCallbackResult['success'] = true; + }, + fail:(res) => { + console.log("testSyncWithCallback.fail.callback", res); + // testUtsClassSyncWithCallbackResult.fail = true; + }, + complete:(res) => { + console.log("testSyncWithCallback.complete.callback", res); + this.testUtsClassSyncWithCallbackResult['complete'] = true; + } + } as AsyncOptions).name === "testSyncWithCallback" ) { this.testUtsClassSyncWithCallbackResult['return'] = true; } -- GitLab