diff --git a/pages/SyntaxCase/index.uvue b/pages/SyntaxCase/index.uvue index 5781e1fd5612e0456f7611221c31b9fb7b72fb05..3e3905b8fb8c8ee569878c4eee7f73d7fd9a413e 100644 --- a/pages/SyntaxCase/index.uvue +++ b/pages/SyntaxCase/index.uvue @@ -1,396 +1,445 @@ \ No newline at end of file + } catch (e) {} + }, + // async testUtsClassAsync() { + // if (test != null) { + // this.testUtsClassConstructor() + // } + // this.testUtsClassAsyncResult.return = FALSE; + // this.testUtsClassAsyncResult.success = FALSE; + // // testUtsClassAsyncResult.fail = FALSE; + // this.testUtsClassAsyncResult.complete = FALSE; + // try { + // const res = await test.testClassAsync({ + // type: "success", + // success: (res) => { + // console.log("testAsync.success.callback", res); + // this.testUtsClassAsyncResult.success = TRUE; + // }, + // fail: (res) => { + // console.log("testAsync.fail.callback", res); + // }, + // complete: (res) => { + // console.log("testAsync.complete.callback", res); + // this.testUtsClassAsyncResult.complete = TRUE; + // }, + // }); + // console.log('res', res) + // if (res.name === "testAsync") { + // this.testUtsClassAsyncResult.return = TRUE; + // } + // } catch (e) { + // console.error(e) + // } + // }, + testUtsClassInstance() { + this.testUtsClassInstanceResult.prop = FALSE + this.testUtsClassInstanceResult.return = FALSE + this.testUtsClassInstanceResult.success = FALSE + // testUtsClassAsyncResult.fail = FALSE; + this.testUtsClassInstanceResult.complete = FALSE + this.testUtsClassInstanceResult.callback = FALSE + const url = 'https://dcloud.io/' + const task = request(url) + if (task != null) { + if (task.url === url && task.abort().url === url) { + this.testUtsClassInstanceResult.prop = TRUE + } + task.onCallback((res) => { + if (res === 'onCallback') { + this.testUtsClassInstanceResult.callback = TRUE + } + }) + const res = task.sync({ + success: (res) => { + console.log('task.sync.success.callback', res) + this.testUtsClassInstanceResult.success = TRUE + }, + fail: (res) => { + console.log('task.sync.fail.callback', res) + }, + complete: (res) => { + console.log('task.sync.complete.callback', res) + this.testUtsClassInstanceResult.complete = TRUE + }, + } as SyncOptions) + if (res === 'sync') { + this.testUtsClassInstanceResult.return = TRUE + } + } + }, + }, +} + diff --git a/pages/SyntaxCase/utsAndroid.uvue b/pages/SyntaxCase/utsAndroid.uvue index 084e0e7660ef75399c4b5bdd8032a86cbacc1376..2eb8636fb4ccfc5fcc0eee987f9aba0a2cce9b0e 100644 --- a/pages/SyntaxCase/utsAndroid.uvue +++ b/pages/SyntaxCase/utsAndroid.uvue @@ -1,238 +1,240 @@ \ No newline at end of file +.testButton { + width: 100%; +} + diff --git a/pages/index/basicTest.uvue b/pages/index/basicTest.uvue index b409578737c52838d6ca59df16cdc8e31297c66c..88d542703ccba55935feaf7a9cc7d0d35fa44522 100644 --- a/pages/index/basicTest.uvue +++ b/pages/index/basicTest.uvue @@ -1,66 +1,67 @@ - \ No newline at end of file +.result { + margin-bottom: 20rpx; +} +