From a54fc1114ca5cfad64ba040d2e79fd3f0665f07a Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Thu, 15 Aug 2024 21:52:15 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E9=83=A8?= =?UTF-8?q?=E5=88=86=E7=A4=BA=E4=BE=8B=E5=8F=8A=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/compress-image/compress-image.uvue | 54 +++--- pages/API/compress-video/compress-video.uvue | 46 ++--- .../get-current-pages/get-current-pages.uvue | 77 ++++---- ...-page-style-disable-pull-down-refresh.uvue | 54 +++--- .../CSS/overflow/overflow-visible-event.uvue | 8 +- pages/CSS/transform/rotate.uvue | 180 ++++++++++-------- pages/CSS/transform/scale.uvue | 161 ++++++++-------- pages/CSS/transform/translate.uvue | 145 +++++++------- pages/pages.test.js | 3 +- 9 files changed, 391 insertions(+), 337 deletions(-) diff --git a/pages/API/compress-image/compress-image.uvue b/pages/API/compress-image/compress-image.uvue index 2044a88f..07cf8278 100644 --- a/pages/API/compress-image/compress-image.uvue +++ b/pages/API/compress-image/compress-image.uvue @@ -2,34 +2,34 @@ - - - - - - - - 压缩前图片信息 - - {{beforeCompressImageInfo}} - - 压缩后图片信息 - - {{afterCompressImageInfo}} - - - - - + + + + + + + + + 压缩前图片信息 + + {{beforeCompressImageInfo}} + + 压缩后图片信息 + + {{afterCompressImageInfo}} + + + + + + + + + + - - - - - @@ -156,7 +156,7 @@ uni.getImageInfo({ src: res.tempFilePath, success: (_res) => { - let beforeCompressSize: number, afterComoressSize: number; + let beforeCompressSize : number, afterComoressSize : number; // #ifdef APP-ANDROID beforeCompressSize = new FileInputStream(UTSAndroid.convert2AbsFullPath(this.imageSrcForTest)).available(); afterComoressSize = new FileInputStream(res.tempFilePath.substring("file://".length)).available(); diff --git a/pages/API/compress-video/compress-video.uvue b/pages/API/compress-video/compress-video.uvue index 306ebbc6..b06d526e 100644 --- a/pages/API/compress-video/compress-video.uvue +++ b/pages/API/compress-video/compress-video.uvue @@ -3,27 +3,29 @@ - - - - 压缩前视频信息 - - {{beforeCompressVideoInfo}} - - - 压缩后视频信息 - - {{afterCompressVideoInfo}} - - - - - - - - - 相对于原视频的分辨率比例,取值范围(0, 1] - + + + + + 压缩前视频信息 + + {{beforeCompressVideoInfo}} + + + 压缩后视频信息 + + {{afterCompressVideoInfo}} + + + + + + + + + 相对于原视频的分辨率比例,取值范围(0, 1] + + @@ -116,7 +118,7 @@ this.resolution = event.detail.value; }, testCompressVideo() { - let beforeCompressSize: number, afterComoressSize: number; + let beforeCompressSize : number, afterComoressSize : number; uni.compressVideo({ src: this.videoSrcForTest, quality: 'medium', diff --git a/pages/API/get-current-pages/get-current-pages.uvue b/pages/API/get-current-pages/get-current-pages.uvue index 34f2ab59..82fa34f7 100644 --- a/pages/API/get-current-pages/get-current-pages.uvue +++ b/pages/API/get-current-pages/get-current-pages.uvue @@ -2,40 +2,44 @@ - - - - - 当前页面栈中 {{ pages.length }} 个页面,列表如下: - + + + + + + 当前页面栈中 {{ pages.length }} 个页面,列表如下: + + - - - + + @@ -117,6 +121,11 @@ const currentPage = pages[pages.length - 1]; currentPage.$setPageStyle(style); }, + goSetDisablePullDownRefresh() { + uni.navigateTo({ + url: '/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh' + }); + } // getCurrentPage(): Page { // const pages = getCurrentPages(); // const currentPage = pages[pages.length - 1]; @@ -163,7 +172,7 @@ flex-direction: row; } - .radio-value { - margin-left: 10px; + .radio-value { + margin-left: 10px; } - + diff --git a/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh.uvue b/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh.uvue index f9853ea7..f190e74e 100644 --- a/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh.uvue +++ b/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh.uvue @@ -3,12 +3,12 @@ - + 当前 PageStyle - {{pageStyleText}} - 状态: - - enablePullDownRefresh: {{enablePullDownRefreshStatus}} + {{pageStyleText}} + 状态: + + enablePullDownRefresh: {{enablePullDownRefreshStatus}} 当前版本仅支持设置属性 enablePullDownRefresh @@ -25,8 +25,8 @@ return { checked: false, pages: [] as Page[], - currentPageStyle: {} as UTSJSONObject, - // TODO + currentPageStyle: {} as UTSJSONObject, + // TODO enablePullDownRefreshStatus: true } }, @@ -52,11 +52,11 @@ const currentPage = pages[pages.length - 1]; currentPage.$setPageStyle({ enablePullDownRefresh: enable - }); + }); this.enablePullDownRefreshStatus = enable - }, - startPullDownRefresh() { - uni.startPullDownRefresh() + }, + startPullDownRefresh() { + uni.startPullDownRefresh() } }, } @@ -66,28 +66,28 @@ diff --git a/pages/CSS/transform/rotate.uvue b/pages/CSS/transform/rotate.uvue index c2fe9333..3492b45f 100644 --- a/pages/CSS/transform/rotate.uvue +++ b/pages/CSS/transform/rotate.uvue @@ -1,84 +1,98 @@ - - - - - diff --git a/pages/CSS/transform/scale.uvue b/pages/CSS/transform/scale.uvue index 0ed5e5ca..da8fad84 100644 --- a/pages/CSS/transform/scale.uvue +++ b/pages/CSS/transform/scale.uvue @@ -1,77 +1,86 @@ - - - - - diff --git a/pages/CSS/transform/translate.uvue b/pages/CSS/transform/translate.uvue index c9031cd1..5c1cd932 100644 --- a/pages/CSS/transform/translate.uvue +++ b/pages/CSS/transform/translate.uvue @@ -1,74 +1,89 @@ diff --git a/pages/pages.test.js b/pages/pages.test.js index 4cab72cd..a87f7c0c 100755 --- a/pages/pages.test.js +++ b/pages/pages.test.js @@ -80,7 +80,8 @@ const pages = [ // '/pages/component/unicloud-db/unicloud-db/contacts/edit', // 动态内容 // '/pages/component/unicloud-db/unicloud-db/contacts/detail', - '/pages/component/unicloud-db/unicloud-db/mixin-datacom/mixin-datacom', + // 动态内容 + // '/pages/component/unicloud-db/unicloud-db/mixin-datacom/mixin-datacom', // 单独测试例截图 // '/pages/component/global-properties/global-properties', '/pages/component/global-events/global-events', -- GitLab