Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
3db69b1a
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
5382
Star
74
Fork
144
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
6
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
6
Issue
6
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
3db69b1a
编写于
4月 17, 2024
作者:
taohebin@dcloud.io
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: overflow:visible 超出部分点击测试例
上级
54fcd4b6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
105 addition
and
1 deletion
+105
-1
pages.json
pages.json
+7
-0
pages/CSS/overflow/overflow-visible-event.test.js
pages/CSS/overflow/overflow-visible-event.test.js
+33
-0
pages/CSS/overflow/overflow-visible-event.uvue
pages/CSS/overflow/overflow-visible-event.uvue
+60
-0
pages/tabBar/CSS.uvue
pages/tabBar/CSS.uvue
+5
-1
未找到文件。
pages.json
浏览文件 @
3db69b1a
...
@@ -1288,6 +1288,13 @@
...
@@ -1288,6 +1288,13 @@
{
{
"navigationBarTitleText"
:
"resize0bserver"
"navigationBarTitleText"
:
"resize0bserver"
}
}
},
{
"path"
:
"pages/CSS/overflow/overflow-visible-event"
,
"style"
:
{
"navigationBarTitleText"
:
"overflow-visible-event"
}
}
}
//
#endif
//
#endif
],
],
...
...
pages/CSS/overflow/overflow-visible-event.test.js
0 → 100644
浏览文件 @
3db69b1a
// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/
describe
(
'
/pages/CSS/overflow/overflow-visible-event.uvue
'
,
()
=>
{
if
(
!
process
.
env
.
uniTestPlatformInfo
.
startsWith
(
'
android
'
))
{
it
(
'
dummyTest
'
,
async
()
=>
{
expect
(
1
).
toBe
(
1
)
})
return
}
let
page
;
let
res
;
beforeAll
(
async
()
=>
{
page
=
await
program
.
reLaunch
(
'
/pages/CSS/overflow/overflow-visible-event
'
)
await
page
.
waitFor
(
600
);
})
beforeEach
(
async
()
=>
{
await
page
.
setData
({
jest_result
:
false
,
})
});
it
(
'
Check Overflow Visible Part Click
'
,
async
()
=>
{
res
=
await
page
.
callMethod
(
'
jest_getRect
'
)
const
point_x
=
await
page
.
data
(
'
jest_click_x
'
);
const
point_y
=
await
page
.
data
(
'
jest_click_y
'
);
await
program
.
adbCommand
(
"
input tap
"
+
"
"
+
point_x
+
"
"
+
point_y
)
await
page
.
waitFor
(
500
);
res
=
await
page
.
data
(
'
jest_result
'
);
expect
(
res
).
toBe
(
true
)
});
});
pages/CSS/overflow/overflow-visible-event.uvue
0 → 100644
浏览文件 @
3db69b1a
<template>
<view>
<text style="font-size: 15px;">overflow=visible 点击子view(超出父view区域的部分)</text>
<view class="backgroundview">
<view class="box-visible-border-radius">
<view id="child" style="width: 50px; height: 150px; background-color: greenyellow;"
@click="handleClickOverflowPart" @touchmove="handleTouchMoveOverflowPart">
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
jest_result: false,
jest_click_x: -1,
jest_click_y: -1
}
},
methods: {
handleClickOverflowPart() {
console.log("click");
this.jest_result = true;
},
handleTouchMoveOverflowPart() {
console.log("move");
},
jest_getRect() {
const rect = uni.getElementById('child')?.getBoundingClientRect()
if (rect != null) {
const ratio = uni.getSystemInfoSync().devicePixelRatio
this.jest_click_x = rect.x * ratio + 10
this.jest_click_y = rect.bottom * ratio - 10
}
}
}
}
</script>
<style>
.backgroundview {
width: 300px;
height: 300px;
margin-bottom: 20px;
background-color: white;
justify-content: center;
align-items: center;
}
.box-visible-border-radius {
width: 100px;
height: 100px;
border-radius: 20px;
overflow: visible;
background-color: green;
}
</style>
pages/tabBar/CSS.uvue
浏览文件 @
3db69b1a
...
@@ -273,7 +273,11 @@
...
@@ -273,7 +273,11 @@
{
{
name: 'overflow',
name: 'overflow',
url: '/pages/CSS/overflow/overflow',
url: '/pages/CSS/overflow/overflow',
},
},
{
name: 'overflow-visible-event',
url: '/pages/CSS/overflow/overflow-visible-event'
}
] as Page[],
] as Page[],
},
},
{
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录