From 1f760b5089a8597a640f772fe44d0502b810dddf Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Sat, 12 Aug 2023 16:31:18 +0800 Subject: [PATCH] feat(App): add scroll-view --- pages/SyntaxCase/index.uvue | 787 ++++++++++++++++--------------- pages/SyntaxCase/utsAndroid.uvue | 460 +++++++++--------- pages/index/basicTest.uvue | 111 ++--- 3 files changed, 705 insertions(+), 653 deletions(-) diff --git a/pages/SyntaxCase/index.uvue b/pages/SyntaxCase/index.uvue index 5781e1f..3e3905b 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 084e0e7..2eb8636 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 b409578..88d5427 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; +} + -- GitLab