Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
c81ccde1
U
uni-app
项目概览
DCloud
/
uni-app
通知
699
Star
38703
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
7
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
7
Issue
7
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c81ccde1
编写于
1月 17, 2024
作者:
DCloud-WZF
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore(uts): 自动化测试截图支持指定起始坐标
上级
8862c770
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
16 deletion
+6
-16
packages/uni-app-uts/lib/automator/apis/App/index.uts
packages/uni-app-uts/lib/automator/apis/App/index.uts
+4
-14
packages/uni-automator/dist/index.js
packages/uni-automator/dist/index.js
+2
-2
未找到文件。
packages/uni-app-uts/lib/automator/apis/App/index.uts
浏览文件 @
c81ccde1
...
...
@@ -67,7 +67,6 @@ export const callUniMethod = (
// @ts-ignore
uni.navigateTo({
url: _arg['url'] as string,
// @ts-expect-error
animationType:
_arg['animationType'] != null
? (_arg['animationType'] as string)
...
...
@@ -115,7 +114,6 @@ export const callUniMethod = (
const _arg = new UTSJSONObject(args[0])
// @ts-ignore
uni.navigateBack({
// @ts-expect-error
animationType:
_arg['animationType'] != null
? (_arg['animationType'] as string)
...
...
@@ -227,9 +225,7 @@ export const callUniMethod = (
// @ts-ignore
uni.showToast({
title: _arg['title'] as string,
// @ts-expect-error
icon: _arg['icon'] != null ? (_arg['icon'] as string) : 'success',
// @ts-expect-error
image:
_arg['image'] != null && _arg['image'] != ''
? (_arg['image'] as string)
...
...
@@ -237,7 +233,6 @@ export const callUniMethod = (
mask: _arg['mask'] != null ? (_arg['mask'] as boolean) : false,
duration:
_arg['duration'] != null ? (_arg['duration'] as number) : 1500,
// @ts-expect-error
position:
_arg['position'] != null ? (_arg['position'] as string) : null,
success,
...
...
@@ -274,29 +269,22 @@ export const callUniMethod = (
const _arg = new UTSJSONObject(args[0])
// @ts-ignore
uni.showModal({
// @ts-expect-error
title: _arg['title'] != null ? (_arg['title'] as string) : null,
// @ts-expect-error
content: _arg['content'] != null ? (_arg['content'] as string) : null,
showCancel:
_arg['showCancel'] != null ? (_arg['showCancel'] as boolean) : true,
// @ts-expect-error
cancelText:
_arg['cancelText'] != null ? (_arg['cancelText'] as string) : null,
// @ts-expect-error
cancelColor:
_arg['cancelColor'] != null ? (_arg['cancelColor'] as string) : null,
// @ts-expect-error
confirmText:
_arg['confirmText'] != null ? (_arg['confirmText'] as string) : null,
// @ts-expect-error
confirmColor:
_arg['confirmColor'] != null
? (_arg['confirmColor'] as string)
: null,
editable:
_arg['editable'] != null ? (_arg['editable'] as boolean) : false,
// @ts-expect-error
placeholderText:
_arg['placeholderText'] != null
? (_arg['placeholderText'] as string)
...
...
@@ -313,11 +301,9 @@ export const callUniMethod = (
const _arg = new UTSJSONObject(args[0])
// @ts-ignore
uni.showActionSheet({
// @ts-expect-error
title: _arg['title'] != null ? (_arg['title'] as string) : null,
// @ts-expect-error
itemList: JSON.parse<string[]>(JSON.stringify(_arg['itemList']))!,
// @ts-expect-error
itemColor:
_arg['itemColor'] != null ? (_arg['itemColor'] as string) : null,
success,
...
...
@@ -442,6 +428,8 @@ export type CaptureScreenshotParams = {
id?: string | null
fullPage?: boolean | null
path?: string | null
offsetX?: string | null
offsetY?: string | null
}
export const captureScreenshot = (
params: CaptureScreenshotParams,
...
...
@@ -451,6 +439,8 @@ export const captureScreenshot = (
if (currentPage != null) {
currentPage.$viewToTempFilePath({
id: params.fullPage == true ? null : params.id,
offsetX: params.offsetX !== null ? params.offsetX : '0',
offsetY: params.offsetY !== null ? params.offsetY : '0',
wholeContent: params.fullPage == true,
path: params.path,
success: (res) => {
...
...
packages/uni-automator/dist/index.js
浏览文件 @
c81ccde1
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录