From 39ca006cd857059cb8711bc921970c554c30c958 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 | 52 ++---
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(+), 335 deletions(-)
diff --git a/pages/API/compress-image/compress-image.uvue b/pages/API/compress-image/compress-image.uvue
index 916a1dba..cf1394eb 100644
--- a/pages/API/compress-image/compress-image.uvue
+++ b/pages/API/compress-image/compress-image.uvue
@@ -2,32 +2,34 @@
-
-
-
-
-
-
-
- 压缩前图片信息
-
- {{beforeCompressImageInfo}}
-
- 压缩后图片信息
-
- {{afterCompressImageInfo}}
-
-
-
-
-
+
+
+
+
+
+
+
+
+ 压缩前图片信息
+
+ {{beforeCompressImageInfo}}
+
+ 压缩后图片信息
+
+ {{afterCompressImageInfo}}
+
+
+
+
+
+
+
+
+
+
-
-
-
-
@@ -144,7 +146,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 }} 个页面,列表如下:
-
- index: {{ index }}, route: {{ page.route }}
-
+
+
+
+
+
+ 当前页面栈中 {{ pages.length }} 个页面,列表如下:
+
+ index: {{ index }}, route: {{ page.route }}
+
+
-
-
-
-
-
- {{item.key}}:
- {{currentPageStyle[item.key]}}
-
-
-
-
-
-
-
+
+
+
+
+ {{item.key}}:
+ {{currentPageStyle[item.key]}}
+
+
+
+
+
+
+
+
+
+
+ {{item2}}
+
+
+
-
-
- {{item2}}
-
-
-
-
+
+
+
@@ -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 @@
-
-
-
-
-
- rotate(20deg)
- 转变前位置
-
-
- rotateX(50deg)
- 转变前位置
-
-
- rotateY(50deg)
- 转变前位置
-
-
- rotateZ(50deg)
- 转变前位置
-
-
-
-
- rotate(20deg)
- 转变后位置
-
-
- rotateX(50deg)
- 转变后位置
-
-
- rotateY(50deg)
- 转变后位置
-
-
- rotateZ(50deg)
- 转变后位置
-
-
-
-
-
-
-
-
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 @@
-
-
-
-
- scaleX(0.6)
- 转变前位置
-
-
- scaleY(0.8)
- 转变前位置
-
-
- scale(0.8,0.8)
- 转变前位置
-
-
-
-
- scaleX(0.6)
- 转变后位置
-
-
- scaleY(0.6)
- 转变后位置
-
-
- scale(1.2,1.2)
- 转变后位置
-
-
-
- 通过scaleY(0.5)实现0.5px的线
-
-
-
-
-
-
-
-
-
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 @@
-
-
-
- translateX(80%)
- 转变前位置
-
-
- translateY(50px)
- 转变前位置
-
-
- translate(-50%,50%)
- 转变前位置
-
-
+
+
+
+
+
+
+ translateX(80%)
+ 转变前位置
+
+
+ translateY(50px)
+ 转变前位置
+
+
+ translate(-50%,50%)
+ 转变前位置
+
+
-
- translateX(80%)
- 转变后位置
-
-
- translateY(50px)
- 转变后位置
-
-
- translate(-50%,50%)
- 转变后位置
-
-
+
+ translateX(80%)
+ 转变后位置
+
+
+ translateY(50px)
+ 转变后位置
+
+
+ translate(-50%,50%)
+ 转变后位置
+
+
+
+
+
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