Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
282951bc
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6067
Star
93
Fork
166
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
282951bc
编写于
11月 12, 2024
作者:
H
hdx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(overflow-visible-event): 代码警告问题
上级
0bec2cfe
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
36 deletion
+28
-36
pages/CSS/overflow/overflow-visible-event.uvue
pages/CSS/overflow/overflow-visible-event.uvue
+26
-34
pages/component/canvas/canvas-context.uvue
pages/component/canvas/canvas-context.uvue
+2
-2
未找到文件。
pages/CSS/overflow/overflow-visible-event.uvue
浏览文件 @
282951bc
...
...
@@ -99,14 +99,12 @@
},
async jest_getRect() {
const rect = await uni.getElementById('child')!.getBoundingClientRectAsync()
if (rect != null) {
let ratio = 1
if (uni.getSystemInfoSync().platform == 'android'){
ratio = uni.getSystemInfoSync().devicePixelRatio
}
this.jest_click_x = rect.x * ratio + 30
this.jest_click_y = rect.bottom * ratio - 30
}
let ratio = 1
if (uni.getSystemInfoSync().platform == 'android'){
ratio = uni.getSystemInfoSync().devicePixelRatio
}
this.jest_click_x = rect.x * ratio + 30
this.jest_click_y = rect.bottom * ratio - 30
},
jest_getParentRect() {
const transform = uni.getElementById('parent')?.style.getPropertyValue("transform")
...
...
@@ -122,37 +120,31 @@
},
async jest_getAbsoluteViewRect() {
const rect = await uni.getElementById('absolute-view')!.getBoundingClientRectAsync()
if (rect != null) {
const systemInfo = uni.getSystemInfoSync()
const titleBarHeight = systemInfo.screenHeight - systemInfo.windowHeight
let ratio = 1
if (uni.getSystemInfoSync().platform == 'android'){
ratio = uni.getSystemInfoSync().devicePixelRatio
}
this.jest_click_x = rect.x * ratio + 30
this.jest_click_y = (rect.top + titleBarHeight) * ratio + 30
const systemInfo = uni.getSystemInfoSync()
const titleBarHeight = systemInfo.screenHeight - systemInfo.windowHeight
let ratio = 1
if (uni.getSystemInfoSync().platform == 'android'){
ratio = uni.getSystemInfoSync().devicePixelRatio
}
this.jest_click_x = rect.x * ratio + 30
this.jest_click_y = (rect.top + titleBarHeight) * ratio + 30
},
async jest_scrollToDeepOverflow() {
const scrollView = uni.getElementById('scroll-view') as UniScrollViewElement
const rect = await uni.getElementById('deep-overflow')!.getBoundingClientRectAsync()
if (rect != null) {
scrollView.scrollTo(0, rect.top)
setTimeout(() => {
const systemInfo = uni.getSystemInfoSync()
let ratio = 1
if (uni.getSystemInfoSync().platform == 'android'){
ratio = uni.getSystemInfoSync().devicePixelRatio
}
const titleBarHeight = systemInfo.screenHeight - systemInfo.windowHeight
uni.getElementById('deep-overflow')!.getBoundingClientRectAsync().then((afterRect: DOMRect) => {
if (afterRect != null) {
this.jest_click_x = afterRect.x * ratio + 30
this.jest_click_y = (afterRect.top + titleBarHeight) * ratio + 30
}
})
}, 200)
}
scrollView.scrollTo(0, rect.top)
setTimeout(() => {
const systemInfo = uni.getSystemInfoSync()
let ratio = 1
if (uni.getSystemInfoSync().platform == 'android'){
ratio = uni.getSystemInfoSync().devicePixelRatio
}
const titleBarHeight = systemInfo.screenHeight - systemInfo.windowHeight
uni.getElementById('deep-overflow')!.getBoundingClientRectAsync().then((afterRect: DOMRect) => {
this.jest_click_x = afterRect.x * ratio + 30
this.jest_click_y = (afterRect.top + titleBarHeight) * ratio + 30
})
}, 200)
}
}
}
...
...
pages/component/canvas/canvas-context.uvue
浏览文件 @
282951bc
...
...
@@ -799,12 +799,12 @@
const x4 = x1 + wavelength;
const y4 = y1;
context.moveTo(x1, y1);
path2D
!
.bezierCurveTo(x2, y2, x3, y3, x4, y4);
path2D.bezierCurveTo(x2, y2, x3, y3, x4, y4);
}
context.stroke(path2D);
const path2DRect = this.canvasContext!.createPath2D();
path2DRect
!
.rect(10, 10, 100, 20);
path2DRect.rect(10, 10, 100, 20);
context.fill(path2DRect);
},
fontTTF() {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录