Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello-uvue
提交
d052aa4f
H
hello-uvue
项目概览
DCloud
/
hello-uvue
通知
398
Star
3
Fork
10
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello-uvue
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
d052aa4f
编写于
3月 19, 2025
作者:
DCloud-WZF
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 部分示例及测试支持 harmony
上级
e162dfe4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
9 addition
and
12 deletion
+9
-12
pages/component-instance/methods/call-method-easycom-uni-modules-composition.uvue
.../methods/call-method-easycom-uni-modules-composition.uvue
+3
-3
pages/component-instance/methods/call-method-easycom-uni-modules-options.uvue
...ance/methods/call-method-easycom-uni-modules-options.uvue
+3
-3
pages/component-instance/methods/call-method-easycom-uni-modules-props-emits.test.js
...thods/call-method-easycom-uni-modules-props-emits.test.js
+0
-3
pages/directive/v-on/v-on.test.js
pages/directive/v-on/v-on.test.js
+2
-2
pages/lifecycle/component/component-composition.test.js
pages/lifecycle/component/component-composition.test.js
+1
-1
未找到文件。
pages/component-instance/methods/call-method-easycom-uni-modules-composition.uvue
浏览文件 @
d052aa4f
<template>
<template>
<view>
<view>
<call-easy-method-uni-modules ref="callEasyMethod1"></call-easy-method-uni-modules>
<call-easy-method-uni-modules ref="callEasyMethod1"></call-easy-method-uni-modules>
<!-- #ifdef APP-ANDROID || APP-IOS -->
<!-- #ifdef APP-ANDROID || APP-IOS
|| APP-HARMONY
-->
<!-- 在兼容组件中 ios 返回非普通对象数据,比如 Map 数据时候会被 jscore 统一处理为 object,和安卓产生了差异 -->
<!-- 在兼容组件中 ios 返回非普通对象数据,比如 Map 数据时候会被 jscore 统一处理为 object,和安卓产生了差异 -->
<!-- 测试用例用来验证返回数据特殊,安卓和其他平台无此限制 -->
<!-- 测试用例用来验证返回数据特殊,安卓和其他平台无此限制 -->
<view>---</view>
<view>---</view>
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
}
}
// #endif
// #endif
// #ifdef APP-IOS
// #ifdef APP-IOS
|| APP-HARMONY
const numListChange = (res : any) => {
const numListChange = (res : any) => {
const value = res['detail']!['value'] as number[]
const value = res['detail']!['value'] as number[]
const isArray = Array.isArray(value)
const isArray = Array.isArray(value)
...
@@ -102,7 +102,7 @@
...
@@ -102,7 +102,7 @@
}
}
// #endif
// #endif
// #ifdef APP-IOS
// #ifdef APP-IOS
|| APP-HARMONY
const objListChange = (res : any) => {
const objListChange = (res : any) => {
const value = res['detail']!['value'] as any[]
const value = res['detail']!['value'] as any[]
const isArray = Array.isArray(value)
const isArray = Array.isArray(value)
...
...
pages/component-instance/methods/call-method-easycom-uni-modules-options.uvue
浏览文件 @
d052aa4f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<view>
<view>
<call-easy-method-uni-modules ref="callEasyMethod1"></call-easy-method-uni-modules>
<call-easy-method-uni-modules ref="callEasyMethod1"></call-easy-method-uni-modules>
<!-- #ifdef APP-IOS || APP-ANDROID -->
<!-- #ifdef APP-IOS || APP-ANDROID
|| APP-HARMONY
-->
<!-- 在兼容组件中 ios 返回非普通对象数据,比如 Map 数据时候会被 jscore 统一处理为 object,和安卓产生了差异 -->
<!-- 在兼容组件中 ios 返回非普通对象数据,比如 Map 数据时候会被 jscore 统一处理为 object,和安卓产生了差异 -->
<!-- 测试用例用来验证返回数据特殊,安卓和其他平台无此限制 -->
<!-- 测试用例用来验证返回数据特殊,安卓和其他平台无此限制 -->
<view>---</view>
<view>---</view>
...
@@ -101,7 +101,7 @@
...
@@ -101,7 +101,7 @@
this.isNumListValid = isArray && isLengthGt0
this.isNumListValid = isArray && isLengthGt0
},
},
// #endif
// #endif
// #ifdef APP-IOS
// #ifdef APP-IOS
|| APP-HARMONY
numListChange(res : any) {
numListChange(res : any) {
const value = res['detail']!['value'] as number[]
const value = res['detail']!['value'] as number[]
const isArray = Array.isArray(value)
const isArray = Array.isArray(value)
...
@@ -118,7 +118,7 @@
...
@@ -118,7 +118,7 @@
this.isObjListValid = isArray && isLengthGt0
this.isObjListValid = isArray && isLengthGt0
},
},
// #endif
// #endif
// #ifdef APP-IOS
// #ifdef APP-IOS
|| APP-HARMONY
objListChange(res : any) {
objListChange(res : any) {
const value = res['detail']!['value'] as number[]
const value = res['detail']!['value'] as number[]
const isArray = Array.isArray(value)
const isArray = Array.isArray(value)
...
...
pages/component-instance/methods/call-method-easycom-uni-modules-props-emits.test.js
浏览文件 @
d052aa4f
...
@@ -5,14 +5,11 @@ const platformInfo = process.env.uniTestPlatformInfo.toLowerCase()
...
@@ -5,14 +5,11 @@ const platformInfo = process.env.uniTestPlatformInfo.toLowerCase()
const
isIOS
=
platformInfo
.
startsWith
(
'
ios
'
)
const
isIOS
=
platformInfo
.
startsWith
(
'
ios
'
)
const
isWeb
=
platformInfo
.
startsWith
(
'
web
'
)
const
isWeb
=
platformInfo
.
startsWith
(
'
web
'
)
const
isMP
=
platformInfo
.
startsWith
(
'
mp
'
)
const
isMP
=
platformInfo
.
startsWith
(
'
mp
'
)
// TODO: harmony 进入页面再退出崩溃
const
isHarmony
=
platformInfo
.
includes
(
'
harmony
'
)
describe
(
'
call method easycom uni modules
'
,
()
=>
{
describe
(
'
call method easycom uni modules
'
,
()
=>
{
if
(
if
(
isMP
||
isMP
||
isWeb
||
isWeb
||
isHarmony
||
(
(
isIOS
&&
isIOS
&&
(
(
...
...
pages/directive/v-on/v-on.test.js
浏览文件 @
d052aa4f
...
@@ -5,7 +5,7 @@ describe('v-on', () => {
...
@@ -5,7 +5,7 @@ describe('v-on', () => {
const
platformInfo
=
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
()
const
platformInfo
=
process
.
env
.
uniTestPlatformInfo
.
toLowerCase
()
const
isAndroid
=
platformInfo
.
startsWith
(
'
android
'
)
const
isAndroid
=
platformInfo
.
startsWith
(
'
android
'
)
const
isIOS
=
platformInfo
.
startsWith
(
'
ios
'
)
const
isIOS
=
platformInfo
.
startsWith
(
'
ios
'
)
const
isMP
=
platformInfo
.
startsWith
(
'
mp
'
)
const
isMP
=
platformInfo
.
startsWith
(
'
mp
'
)
const
isHarmony
=
platformInfo
.
includes
(
'
harmony
'
)
const
isHarmony
=
platformInfo
.
includes
(
'
harmony
'
)
let
page
let
page
...
@@ -31,7 +31,7 @@ describe('v-on', () => {
...
@@ -31,7 +31,7 @@ describe('v-on', () => {
await
onceBtn
.
tap
()
await
onceBtn
.
tap
()
expect
(
await
count
.
text
()).
toBe
(
supportedCount
)
expect
(
await
count
.
text
()).
toBe
(
supportedCount
)
}
}
if
(
isAndroid
||
isIOS
||
isHarmony
)
{
if
(
isAndroid
||
isIOS
)
{
const
btnPreventRect
=
(
await
page
.
data
(
'
btnPreventRect
'
)).
value
const
btnPreventRect
=
(
await
page
.
data
(
'
btnPreventRect
'
)).
value
const
x
=
Math
.
ceil
(
btnPreventRect
.
x
+
btnPreventRect
.
width
/
2
)
const
x
=
Math
.
ceil
(
btnPreventRect
.
x
+
btnPreventRect
.
width
/
2
)
const
y
=
Math
.
ceil
(
btnPreventRect
.
y
+
btnPreventRect
.
height
/
2.0
)
const
y
=
Math
.
ceil
(
btnPreventRect
.
y
+
btnPreventRect
.
height
/
2.0
)
...
...
pages/lifecycle/component/component-composition.test.js
浏览文件 @
d052aa4f
...
@@ -86,7 +86,7 @@ describe('component-lifecycle', () => {
...
@@ -86,7 +86,7 @@ describe('component-lifecycle', () => {
await
page
.
waitFor
(
'
view
'
)
await
page
.
waitFor
(
'
view
'
)
lifeCycleNum
=
await
page
.
callMethod
(
'
getLifeCycleNum
'
)
lifeCycleNum
=
await
page
.
callMethod
(
'
getLifeCycleNum
'
)
// App 端页面离开返回不触发 keepAlive 组件 activated deactivated, 详见 https://issues.dcloud.net.cn/pages/issues/detail?id=7419
// App 端页面离开返回不触发 keepAlive 组件 activated deactivated, 详见 https://issues.dcloud.net.cn/pages/issues/detail?id=7419
expect
(
lifeCycleNum
).
toBe
(
isIOS
||
isAndroid
?
-
10
:
-
11
)
expect
(
lifeCycleNum
).
toBe
(
(
isIOS
||
isAndroid
||
isHarmony
)
?
-
10
:
-
11
)
page
=
await
program
.
navigateBack
()
page
=
await
program
.
navigateBack
()
await
page
.
waitFor
(
'
view
'
)
await
page
.
waitFor
(
'
view
'
)
lifeCycleNum
=
await
page
.
callMethod
(
'
pageGetLifeCycleNum
'
)
lifeCycleNum
=
await
page
.
callMethod
(
'
pageGetLifeCycleNum
'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录