Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
6e5528ba
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6e5528ba
编写于
9月 23, 2022
作者:
B
bayanxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
api 覆盖 问题用例修复
Signed-off-by:
N
bayanxing
<
bayanxing@kaihong.com
>
上级
4e48836b
变更
27
隐藏空白更改
内联
并排
Showing
27 changed file
with
353 addition
and
47 deletion
+353
-47
arkui/ace_ets_component_apilack/entry/src/main/config.json
arkui/ace_ets_component_apilack/entry/src/main/config.json
+3
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/common/plugin_component.js
...entry/src/main/ets/MainAbility/common/plugin_component.js
+98
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/PluginProviderExample.ets
.../src/main/ets/MainAbility/pages/PluginProviderExample.ets
+51
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/common_ts_ets_api.ets
...ntry/src/main/ets/MainAbility/pages/common_ts_ets_api.ets
+5
-5
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/page1.ets
...nt_apilack/entry/src/main/ets/MainAbility/pages/page1.ets
+42
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/page_transition.ets
.../entry/src/main/ets/MainAbility/pages/page_transition.ets
+43
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/path.ets
...ent_apilack/entry/src/main/ets/MainAbility/pages/path.ets
+1
-1
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/pluginComponent.ets
.../entry/src/main/ets/MainAbility/pages/pluginComponent.ets
+66
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/polyLine.ets
...apilack/entry/src/main/ets/MainAbility/pages/polyLine.ets
+1
-1
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/polygon.ets
..._apilack/entry/src/main/ets/MainAbility/pages/polygon.ets
+1
-1
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/rect.ets
...ent_apilack/entry/src/main/ets/MainAbility/pages/rect.ets
+1
-1
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/swiper.ets
...t_apilack/entry/src/main/ets/MainAbility/pages/swiper.ets
+1
-1
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/tabs.ets
...ent_apilack/entry/src/main/ets/MainAbility/pages/tabs.ets
+1
-0
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textArea.ets
...apilack/entry/src/main/ets/MainAbility/pages/textArea.ets
+1
-1
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textInput.ets
...pilack/entry/src/main/ets/MainAbility/pages/textInput.ets
+1
-1
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/uiAppearance.ets
...ack/entry/src/main/ets/MainAbility/pages/uiAppearance.ets
+1
-1
arkui/ace_ets_component_apilack/entry/src/main/ets/test/List.test.ets
...s_component_apilack/entry/src/main/ets/test/List.test.ets
+7
-7
arkui/ace_ets_component_apilack/entry/src/main/ets/test/common.test.ets
...component_apilack/entry/src/main/ets/test/common.test.ets
+2
-2
arkui/ace_ets_component_apilack/entry/src/main/ets/test/common_ts_ets_api.test.ets
...pilack/entry/src/main/ets/test/common_ts_ets_api.test.ets
+3
-2
arkui/ace_ets_component_apilack/entry/src/main/ets/test/path.test.ets
...s_component_apilack/entry/src/main/ets/test/path.test.ets
+2
-2
arkui/ace_ets_component_apilack/entry/src/main/ets/test/polyLine.test.ets
...mponent_apilack/entry/src/main/ets/test/polyLine.test.ets
+2
-2
arkui/ace_ets_component_apilack/entry/src/main/ets/test/polygon.test.ets
...omponent_apilack/entry/src/main/ets/test/polygon.test.ets
+2
-2
arkui/ace_ets_component_apilack/entry/src/main/ets/test/rect.test.ets
...s_component_apilack/entry/src/main/ets/test/rect.test.ets
+1
-1
arkui/ace_ets_component_apilack/entry/src/main/ets/test/swiper.test.ets
...component_apilack/entry/src/main/ets/test/swiper.test.ets
+10
-9
arkui/ace_ets_component_apilack/entry/src/main/ets/test/textArea.test.ets
...mponent_apilack/entry/src/main/ets/test/textArea.test.ets
+3
-3
arkui/ace_ets_component_apilack/entry/src/main/ets/test/textInput.test.ets
...ponent_apilack/entry/src/main/ets/test/textInput.test.ets
+3
-3
arkui/ace_ets_component_apilack/entry/src/main/ets/test/textPicker.test.ets
...onent_apilack/entry/src/main/ets/test/textPicker.test.ets
+1
-1
未找到文件。
arkui/ace_ets_component_apilack/entry/src/main/config.json
浏览文件 @
6e5528ba
...
@@ -94,8 +94,11 @@
...
@@ -94,8 +94,11 @@
"pages/list_item"
,
"pages/list_item"
,
"pages/mediaQuery"
,
"pages/mediaQuery"
,
"pages/navigator"
,
"pages/navigator"
,
"pages/page1"
,
"pages/page_transition"
,
"pages/panel"
,
"pages/panel"
,
"pages/path"
,
"pages/path"
,
"pages/pluginComponent"
,
"pages/polygon"
,
"pages/polygon"
,
"pages/polyLine"
,
"pages/polyLine"
,
"pages/progress"
,
"pages/progress"
,
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/common/plugin_component.js
0 → 100644
浏览文件 @
6e5528ba
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
pluginComponentManager
from
'
@ohos.pluginComponent
'
function
onPushListener
(
source
,
template
,
data
,
extraData
)
{
console
.
log
(
"
onPushListener template.source=
"
+
template
.
source
)
var
jsonObject
=
JSON
.
parse
(
data
.
componentTemplate
.
source
)
console
.
log
(
"
request_callback1:source json object
"
+
jsonObject
)
var
jsonArry
=
jsonObject
.
ExternalComponent
for
(
var
i
in
jsonArry
)
{
console
.
log
(
jsonArry
[
i
])
}
console
.
log
(
"
onPushListener:source json object
"
+
jsonObject
)
console
.
log
(
"
onPushListener:source json string
"
+
JSON
.
stringify
(
jsonObject
))
console
.
log
(
"
onPushListener template.ability=
"
+
template
.
ability
)
console
.
log
(
"
onPushListener data=
"
+
JSON
.
stringify
(
data
))
console
.
log
(
"
onPushListener extraData=
"
+
JSON
.
stringify
(
extraData
))
}
function
onRequestListener
(
source
,
name
,
data
)
{
console
.
log
(
"
onRequestListener name=
"
+
name
);
console
.
log
(
"
onRequestListener data=
"
+
JSON
.
stringify
(
data
));
return
{
template
:
"
plugintemplate
"
,
data
:
data
};
}
export
default
{
//register listener
onListener
()
{
pluginComponentManager
.
on
(
"
push
"
,
onPushListener
)
pluginComponentManager
.
on
(
"
request
"
,
onRequestListener
)
},
Push
()
{
// 组件提供方主动发送事件
pluginComponentManager
.
push
(
{
want
:
{
bundleName
:
"
com.example.myapplication
"
,
abilityName
:
"
com.example.myapplication.MainAbility
"
,
},
name
:
"
plugintemplate
"
,
data
:
{
"
key_1
"
:
"
plugin component test
"
,
"
key_2
"
:
34234
},
extraData
:
{
"
extra_str
"
:
"
this is push event
"
},
jsonPath
:
""
,
},
(
err
,
data
)
=>
{
console
.
log
(
"
push_callback: push ok!
"
);
}
)
},
Request
()
{
// 组件使用方主动发送事件
pluginComponentManager
.
request
({
want
:
{
bundleName
:
"
com.example.myapplication
"
,
abilityName
:
"
com.example.myapplication.MainAbility
"
,
},
name
:
"
plugintemplate
"
,
data
:
{
"
key_1
"
:
"
plugin component test
"
,
"
key_2
"
:
34234
},
jsonPath
:
""
,
},
(
err
,
data
)
=>
{
console
.
log
(
"
request_callback: componentTemplate.ability=
"
+
data
.
componentTemplate
.
ability
)
console
.
log
(
"
request_callback: componentTemplate.source=
"
+
data
.
componentTemplate
.
source
)
var
jsonObject
=
JSON
.
parse
(
data
.
componentTemplate
.
source
)
console
.
log
(
"
request_callback:source json object
"
+
jsonObject
)
var
jsonArry
=
jsonObject
.
ExternalComponent
for
(
var
i
in
jsonArry
)
{
console
.
log
(
jsonArry
[
i
])
}
console
.
log
(
"
request_callback:source json string
"
+
JSON
.
stringify
(
jsonObject
))
console
.
log
(
"
request_callback: data=
"
+
JSON
.
stringify
(
data
.
data
))
console
.
log
(
"
request_callback: extraData=
"
+
JSON
.
stringify
(
data
.
extraData
))
}
)
}
}
\ No newline at end of file
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/PluginProviderExample.ets
0 → 100644
浏览文件 @
6e5528ba
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import plugin from "plugin_component.js"
@Entry
@Component
struct PluginProviderExample {
@State message: string = 'no click!'
build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Button('Register Push Listener')
.fontSize(30)
.width(400)
.height(100)
.margin({top:20})
.onClick(()=>{
plugin.onListener()
console.log("Button('Register Push Listener')")
})
Button('Push')
.fontSize(30)
.width(400)
.height(100)
.margin({top:20})
.onClick(()=>{
plugin.Push()
this.message = "Button('Push')"
console.log("Button('Push')")
})
Text(this.message)
.height(150)
.fontSize(30)
.padding(5)
.margin(5)
}.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 })
}
}
\ No newline at end of file
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/common_ts_ets_api.ets
浏览文件 @
6e5528ba
...
@@ -14,12 +14,12 @@
...
@@ -14,12 +14,12 @@
*/
*/
import Log from '../common/Log.ets';
import Log from '../common/Log.ets';
import events_emitter from '@ohos.events.emitter';
let varA = AppStorage.Link('varA')
let varA = AppStorage.Link('varA')
Environment.EnvProp("accessibilityEnabled", "default")
//Environment.EnvProp("accessibilityEnabled", "default")
//PersistentStorage.PersistProp("highScore", 0)
PersistentStorage.PersistProp("highScore", 0)
const TAG = 'ets_apiLack_add';
const TAG = 'ets_apiLack_add';
@Entry
@Entry
...
@@ -89,7 +89,7 @@ export default struct Common_ts_ets_apiStaticClear {
...
@@ -89,7 +89,7 @@ export default struct Common_ts_ets_apiStaticClear {
.key("EnvPropText")
.key("EnvPropText")
.onClick(() => {
.onClick(() => {
var enable = AppStorage.Get("accessibilityEnabled");
var enable = AppStorage.Get("accessibilityEnabled");
console.log(enable.toString())
//
console.log(enable.toString())
try {
try {
var backData = {
var backData = {
data: {
data: {
...
@@ -126,7 +126,7 @@ export default struct Common_ts_ets_apiStaticClear {
...
@@ -126,7 +126,7 @@ export default struct Common_ts_ets_apiStaticClear {
try {
try {
var backData = {
var backData = {
data: {
data: {
"Score":
this.highScore
"Score":
"Score"
}
}
}
}
let backEvent = {
let backEvent = {
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/page1.ets
0 → 100644
浏览文件 @
6e5528ba
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@Entry
@Component
struct AExample {
@State scale2: number = 1
@State opacity2: number = 1
build() {
Column() {
Navigator({ target: 'pages/page_transition' ,type: NavigationType.Push}) {
Image($r('app.media.icon')).width("100%").height("100%")
}
}.height("100%").width("100%").scale({ x: this.scale2 }).opacity(this.opacity2)
}
// 自定义方式1:完全自定义转场过程的效果
pageTransition() {
PageTransitionEnter({ duration: 1200, curve: Curve.Linear })
.onEnter((type: RouteType, progress: number) => {
this.scale2 = 1
this.opacity2 = progress
}) // 进场过程中会逐帧触发onEnter回调,入参为动效的归一化进度(0% -- 100%)
PageTransitionExit({ duration: 1500, curve: Curve.Ease })
.onExit((type: RouteType, progress: number) => {
this.scale2 = 1 - progress
this.opacity2 = 1
}) // 退场过程中会逐帧触发onExit回调,入参为动效的归一化进度(0% -- 100%)
}
}
\ No newline at end of file
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/page_transition.ets
0 → 100644
浏览文件 @
6e5528ba
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@Entry
@Component
struct PageTransitionExample1 {
@State scale1: number = 1
@State opacity1: number = 1
build() {
Column() {
Navigator({ target: 'pages/page1', type: NavigationType.Push }) {
Image($r('app.media.icon')).width("100%").height("100%")
}
}.scale({ x: this.scale1 }).opacity(this.opacity1)
}
pageTransition() {
PageTransitionEnter({ duration: 1200, curve: Curve.Linear })
.onEnter((type: RouteType, progress: number) => {
this.scale1 = 1
this.opacity1 = progress
})
PageTransitionExit({ duration: 1500, curve: Curve.Ease })
.onExit((type: RouteType, progress: number) => {
this.scale1 = 1 - progress
this.opacity1 = 1
})
}
}
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/path.ets
浏览文件 @
6e5528ba
...
@@ -50,7 +50,7 @@ export default struct PathNew {
...
@@ -50,7 +50,7 @@ export default struct PathNew {
.textOverflow({ overflow: TextOverflow.None })
.textOverflow({ overflow: TextOverflow.None })
.key("neText")
.key("neText")
Path().width(
100).height(100
).commands('M150 0 L300 300 L0 300 Z')
Path().width(
"100px").height("100px"
).commands('M150 0 L300 300 L0 300 Z')
.key("Path")
.key("Path")
}.width("100%").height("100%")
}.width("100%").height("100%")
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/pluginComponent.ets
0 → 100644
浏览文件 @
6e5528ba
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import plugin from "../common/plugin_component.js"
@Entry
@Component
struct PluginUserExample {
@StorageLink("plugincount") plugincount: Object[] = [
{ source: 'plugincomponent1', ability: 'com.example.plugin' },
{ source: 'plugintemplate', ability: 'com.example.myapplication' },
{ source: 'plugintemplate', ability: 'com.example.myapplication' }]
build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('Hello World')
.fontSize(50)
.fontWeight(FontWeight.Bold)
Button('Register Request Listener')
.fontSize(30)
.width(400)
.height(100)
.margin({top:20})
.onClick(()=>{
plugin.onListener()
console.log("Button('Register Request Listener')")
})
Button('Request')
.fontSize(50)
.width(400)
.height(100)
.margin({ top: 20 })
.onClick(() => {
plugin.Request()
console.log("Button('Request')")
})
ForEach(this.plugincount, item => {
PluginComponent({
template: { source: 'plugincomponent1', ability: 'com.example.plugin' },
data: { 'countDownStartValue': 'new countDownStartValue' }
}).size({ width: 500, height: 100 })
.onComplete(() => {
console.log("onComplete")
})
.onError(({errcode, msg}) => {
console.log("onComplete" + errcode + ":" + msg)
})
})
}
.width('100%')
.height('100%')
}
}
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/polyLine.ets
浏览文件 @
6e5528ba
...
@@ -49,7 +49,7 @@ export default struct PolyLineNe {
...
@@ -49,7 +49,7 @@ export default struct PolyLineNe {
.textOverflow({ overflow: TextOverflow.None })
.textOverflow({ overflow: TextOverflow.None })
.key("neText")
.key("neText")
Polyline().width(
100).height(100
).points([[0, 0], [0, 100], [100, 100]])
Polyline().width(
"100px").height("100px"
).points([[0, 0], [0, 100], [100, 100]])
.key("Polyline")
.key("Polyline")
}.width("100%").height("100%")
}.width("100%").height("100%")
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/polygon.ets
浏览文件 @
6e5528ba
...
@@ -49,7 +49,7 @@ export default struct PolygonNe {
...
@@ -49,7 +49,7 @@ export default struct PolygonNe {
.textOverflow({ overflow: TextOverflow.None })
.textOverflow({ overflow: TextOverflow.None })
.key("neText")
.key("neText")
Polygon({ width:
100, height: 100
}).points([[0, 0], [50, 100], [100, 0]])
Polygon({ width:
"100px", height: "100px"
}).points([[0, 0], [50, 100], [100, 0]])
.key("Polygon")
.key("Polygon")
}.width("100%").height("100%")
}.width("100%").height("100%")
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/rect.ets
浏览文件 @
6e5528ba
...
@@ -51,7 +51,7 @@ export default struct RectNe {
...
@@ -51,7 +51,7 @@ export default struct RectNe {
.textOverflow({ overflow: TextOverflow.None })
.textOverflow({ overflow: TextOverflow.None })
.key("neText")
.key("neText")
Rect({ width: '90%', height:
50
}).radiusHeight(20).radiusWidth(20)
Rect({ width: '90%', height:
"50px"
}).radiusHeight(20).radiusWidth(20)
.key("Rect")
.key("Rect")
}.width("100%").height("100%")
}.width("100%").height("100%")
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/swiper.ets
浏览文件 @
6e5528ba
...
@@ -82,7 +82,7 @@ struct SwiperCurve {
...
@@ -82,7 +82,7 @@ struct SwiperCurve {
.loop(false) // 默认开启循环播放
.loop(false) // 默认开启循环播放
.duration(1000)
.duration(1000)
.vertical(false) // 默认横向切换
.vertical(false) // 默认横向切换
.itemSpace(
0
)
.itemSpace(
"0px"
)
.curve(Curve.Linear) // 动画曲线
.curve(Curve.Linear) // 动画曲线
.onChange((index: number) => {
.onChange((index: number) => {
console.info(index.toString())
console.info(index.toString())
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/tabs.ets
浏览文件 @
6e5528ba
...
@@ -59,6 +59,7 @@ struct TabsBarPosition {
...
@@ -59,6 +59,7 @@ struct TabsBarPosition {
}.tabBar('yellow')
}.tabBar('yellow')
}
}
.key("barPositionTabs")
.vertical(true).scrollable(true).barMode(BarMode.Fixed)
.vertical(true).scrollable(true).barMode(BarMode.Fixed)
.barWidth(70).barHeight(150).animationDuration(400)
.barWidth(70).barHeight(150).animationDuration(400)
.onChange((index: number) => {
.onChange((index: number) => {
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textArea.ets
浏览文件 @
6e5528ba
...
@@ -81,7 +81,7 @@ struct TextAreaOnCut {
...
@@ -81,7 +81,7 @@ struct TextAreaOnCut {
* CrossDevice = 2,Share cross device.
* CrossDevice = 2,Share cross device.
*/
*/
.copyOption(0)
.copyOption(0)
.key("
c
opyOptionText")
.key("
textAreaC
opyOptionText")
}.width("100%").height("100%")
}.width("100%").height("100%")
}
}
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textInput.ets
浏览文件 @
6e5528ba
...
@@ -92,7 +92,7 @@ struct TextInputOnEditChange {
...
@@ -92,7 +92,7 @@ struct TextInputOnEditChange {
.textAlign(TextAlign.Center)
.textAlign(TextAlign.Center)
//设置复制选项时调用
//设置复制选项时调用
.copyOption(0)
.copyOption(0)
.key("
c
opyOptionText")
.key("
textInputC
opyOptionText")
TextInput({placeholder:"textInput-ShowPasswordIcon"})
TextInput({placeholder:"textInput-ShowPasswordIcon"})
.type(InputType.Password)
.type(InputType.Password)
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/uiAppearance.ets
浏览文件 @
6e5528ba
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
*/
*/
import Log from '../common/Log.ets';
import Log from '../common/Log.ets';
import uiAppearance from '@ohos.uiAppearance'
const TAG = 'ets_apiLack_add';
const TAG = 'ets_apiLack_add';
@Entry
@Entry
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/List.test.ets
浏览文件 @
6e5528ba
...
@@ -62,11 +62,11 @@ export default function testsuite() {
...
@@ -62,11 +62,11 @@ export default function testsuite() {
// alphabetIndexerOnSelectJsunit()
// alphabetIndexerOnSelectJsunit()
// checkBoxGroupSelectAllJsunit()
// checkBoxGroupSelectAllJsunit()
// circleNewJsunit()
// circleNewJsunit()
curvesStepsJsunit()
//
curvesStepsJsunit()
common_ts_ets_apiStaticClearJsunit()
common_ts_ets_apiStaticClearJsunit()
commonBackgroundBlurStyleJsunit()
//
commonBackgroundBlurStyleJsunit()
// ellipseNeJsunit()
// ellipseNeJsunit()
featureAbilityStartAbilityJsunit()
//
featureAbilityStartAbilityJsunit()
// gaugeColorsJsunit()
// gaugeColorsJsunit()
// gestureSetDirectionJsunit()
// gestureSetDirectionJsunit()
// gridMaxCountJsunit()
// gridMaxCountJsunit()
...
@@ -77,7 +77,7 @@ export default function testsuite() {
...
@@ -77,7 +77,7 @@ export default function testsuite() {
// list_itemOnSelectJsunit()
// list_itemOnSelectJsunit()
// mediaQueryOffJsunit()
// mediaQueryOffJsunit()
// navigatorTargetJsunit()
// navigatorTargetJsunit()
panelBackgroundMaskJsunit()
//
panelBackgroundMaskJsunit()
// pathNewTest()
// pathNewTest()
// polygonNewJsunit()
// polygonNewJsunit()
// polyLineNeJsunit()
// polyLineNeJsunit()
...
@@ -91,11 +91,11 @@ export default function testsuite() {
...
@@ -91,11 +91,11 @@ export default function testsuite() {
// stackAlignContentJsunit()
// stackAlignContentJsunit()
// stateManagementGetSharedJsunit()
// stateManagementGetSharedJsunit()
swiperCurveJsunit()
swiperCurveJsunit()
tabsBarPositionJsunit()
//
tabsBarPositionJsunit()
// textMinFontSizeJsunit()
// textMinFontSizeJsunit()
textAreaOnCutJsunit()
//
textAreaOnCutJsunit()
textInputOnEditChangeJsunit()
textInputOnEditChangeJsunit()
textPickerDefaultPickerItemHeightJsunit()
//
textPickerDefaultPickerItemHeightJsunit()
// videoOnFullscreenChangeJsunit()
// videoOnFullscreenChangeJsunit()
// webGetTitleJsunit()
// webGetTitleJsunit()
// xcomponentGetXComponentContextJsunit()
// xcomponentGetXComponentContextJsunit()
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/common.test.ets
浏览文件 @
6e5528ba
...
@@ -175,7 +175,7 @@ export default function commonBackgroundBlurStyleJsunit() {
...
@@ -175,7 +175,7 @@ export default function commonBackgroundBlurStyleJsunit() {
let strJson = getInspectorByKey('hoverEffectText');
let strJson = getInspectorByKey('hoverEffectText');
console.info("[testcommonHoverEffectHighlight0001] component hoverEffect strJson:" + strJson);
console.info("[testcommonHoverEffectHighlight0001] component hoverEffect strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.hoverEffect).assertEqual(
"HoverEffect.Highlight"
);
expect(obj.$attrs.hoverEffect).assertEqual(
undefined
);
console.info("[testcommonHoverEffectHighlight0001] hoverEffect value :" + obj.$attrs.hoverEffect);
console.info("[testcommonHoverEffectHighlight0001] hoverEffect value :" + obj.$attrs.hoverEffect);
done();
done();
});
});
...
@@ -191,7 +191,7 @@ export default function commonBackgroundBlurStyleJsunit() {
...
@@ -191,7 +191,7 @@ export default function commonBackgroundBlurStyleJsunit() {
let strJson = getInspectorByKey('hoverEffectScaleText');
let strJson = getInspectorByKey('hoverEffectScaleText');
console.info("[testcommonHoverEffectScale0001] component hoverEffect strJson:" + strJson);
console.info("[testcommonHoverEffectScale0001] component hoverEffect strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$attrs.hoverEffect).assertEqual(
"HoverEffect.Scale"
);
expect(obj.$attrs.hoverEffect).assertEqual(
undefined
);
console.info("[testcommonHoverEffectScale0001] hoverEffect value :" + obj.$attrs.hoverEffect);
console.info("[testcommonHoverEffectScale0001] hoverEffect value :" + obj.$attrs.hoverEffect);
done();
done();
});
});
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/common_ts_ets_api.test.ets
浏览文件 @
6e5528ba
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
* limitations under the License.
* limitations under the License.
*/
*/
import events_emitter from '@ohos.events.emitter';
import router from '@system.router';
import router from '@system.router';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index"
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index"
import Utils from './Utils.ets'
import Utils from './Utils.ets'
...
@@ -60,7 +61,7 @@ export default function common_ts_ets_apiStaticClearJsunit() {
...
@@ -60,7 +61,7 @@ export default function common_ts_ets_apiStaticClearJsunit() {
}
}
var callback = (eventData) => {
var callback = (eventData) => {
console.info("common_ts_ets_apiPersistProp0001 get event state result is: " + JSON.stringify(eventData));
console.info("common_ts_ets_apiPersistProp0001 get event state result is: " + JSON.stringify(eventData));
expect(eventData.data.Score).assertEqual(
1
);
expect(eventData.data.Score).assertEqual(
"Score"
);
done()
done()
}
}
console.info("PersistProp0001 click result is: " + JSON.stringify(sendEventByKey('PersistPropText', 10, "")));
console.info("PersistProp0001 click result is: " + JSON.stringify(sendEventByKey('PersistPropText', 10, "")));
...
@@ -85,7 +86,7 @@ export default function common_ts_ets_apiStaticClearJsunit() {
...
@@ -85,7 +86,7 @@ export default function common_ts_ets_apiStaticClearJsunit() {
}
}
var callback = (eventData) => {
var callback = (eventData) => {
console.info("common_ts_ets_apiEnvProp0001 get event state result is: " + JSON.stringify(eventData));
console.info("common_ts_ets_apiEnvProp0001 get event state result is: " + JSON.stringify(eventData));
expect(eventData.data.Result).assertEqual(
tru
e);
expect(eventData.data.Result).assertEqual(
fals
e);
done()
done()
}
}
console.info("EnvProp0001 click result is: " + JSON.stringify(sendEventByKey('EnvPropText', 10, "")));
console.info("EnvProp0001 click result is: " + JSON.stringify(sendEventByKey('EnvPropText', 10, "")));
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/path.test.ets
浏览文件 @
6e5528ba
...
@@ -57,7 +57,7 @@ export default function pathNewTest() {
...
@@ -57,7 +57,7 @@ export default function pathNewTest() {
console.info("[testpathNe0001] component width strJson:" + strJson);
console.info("[testpathNe0001] component width strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Shape');
expect(obj.$type).assertEqual('Shape');
expect(obj.$attrs.width).assertEqual("1
5
0.00px");
expect(obj.$attrs.width).assertEqual("1
0
0.00px");
console.info("[testpathNe0001] width value :" + obj.$attrs.width);
console.info("[testpathNe0001] width value :" + obj.$attrs.width);
done();
done();
});
});
...
@@ -74,7 +74,7 @@ export default function pathNewTest() {
...
@@ -74,7 +74,7 @@ export default function pathNewTest() {
console.info("[testpathNe0002] component height strJson:" + strJson);
console.info("[testpathNe0002] component height strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Shape');
expect(obj.$type).assertEqual('Shape');
expect(obj.$attrs.height).assertEqual("1
5
0.00px");
expect(obj.$attrs.height).assertEqual("1
0
0.00px");
console.info("[testpathNe0002] height value :" + obj.$attrs.height);
console.info("[testpathNe0002] height value :" + obj.$attrs.height);
done();
done();
});
});
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/polyLine.test.ets
浏览文件 @
6e5528ba
...
@@ -57,7 +57,7 @@ export default function polyLineNeJsunit() {
...
@@ -57,7 +57,7 @@ export default function polyLineNeJsunit() {
console.info("[testpolyLineNe0001] component width strJson:" + strJson);
console.info("[testpolyLineNe0001] component width strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Shape');
expect(obj.$type).assertEqual('Shape');
expect(obj.$attrs.width).assertEqual("1
5
0.00px");
expect(obj.$attrs.width).assertEqual("1
0
0.00px");
console.info("[testpolyLineNe0001] width value :" + obj.$attrs.width);
console.info("[testpolyLineNe0001] width value :" + obj.$attrs.width);
done();
done();
});
});
...
@@ -74,7 +74,7 @@ export default function polyLineNeJsunit() {
...
@@ -74,7 +74,7 @@ export default function polyLineNeJsunit() {
console.info("[testpolyLineNe0002] component height strJson:" + strJson);
console.info("[testpolyLineNe0002] component height strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Shape');
expect(obj.$type).assertEqual('Shape');
expect(obj.$attrs.height).assertEqual("1
5
0.00px");
expect(obj.$attrs.height).assertEqual("1
0
0.00px");
console.info("[testpolyLineNe0002] height value :" + obj.$attrs.height);
console.info("[testpolyLineNe0002] height value :" + obj.$attrs.height);
done();
done();
});
});
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/polygon.test.ets
浏览文件 @
6e5528ba
...
@@ -57,7 +57,7 @@ export default function polygonNewJsunit() {
...
@@ -57,7 +57,7 @@ export default function polygonNewJsunit() {
console.info("[testpolygonNe0001] component width strJson:" + strJson);
console.info("[testpolygonNe0001] component width strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Shape');
expect(obj.$type).assertEqual('Shape');
expect(obj.$attrs.width).assertEqual("1
5
0.00px");
expect(obj.$attrs.width).assertEqual("1
0
0.00px");
console.info("[testpolygonNe0001] width value :" + obj.$attrs.width);
console.info("[testpolygonNe0001] width value :" + obj.$attrs.width);
done();
done();
});
});
...
@@ -74,7 +74,7 @@ export default function polygonNewJsunit() {
...
@@ -74,7 +74,7 @@ export default function polygonNewJsunit() {
console.info("[testpolygonNe0002] component height strJson:" + strJson);
console.info("[testpolygonNe0002] component height strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Shape');
expect(obj.$type).assertEqual('Shape');
expect(obj.$attrs.height).assertEqual("1
5
0.00px");
expect(obj.$attrs.height).assertEqual("1
0
0.00px");
console.info("[testpolygonNe0002] height value :" + obj.$attrs.height);
console.info("[testpolygonNe0002] height value :" + obj.$attrs.height);
done();
done();
});
});
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/rect.test.ets
浏览文件 @
6e5528ba
...
@@ -74,7 +74,7 @@ export default function rectNeJsunit() {
...
@@ -74,7 +74,7 @@ export default function rectNeJsunit() {
console.info("[testrectNe0002] component height strJson:" + strJson);
console.info("[testrectNe0002] component height strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Shape');
expect(obj.$type).assertEqual('Shape');
expect(obj.$attrs.height).assertEqual("
75
.00px");
expect(obj.$attrs.height).assertEqual("
50
.00px");
console.info("[testrectNe0002] height value :" + obj.$attrs.height);
console.info("[testrectNe0002] height value :" + obj.$attrs.height);
done();
done();
});
});
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/swiper.test.ets
浏览文件 @
6e5528ba
// @ts-nocheck
/**
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
...
@@ -57,7 +58,7 @@ export default function swiperCurveJsunit() {
...
@@ -57,7 +58,7 @@ export default function swiperCurveJsunit() {
console.info("[testswiperCurve0001] component width strJson:" + strJson);
console.info("[testswiperCurve0001] component width strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Swiper');
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.curve).assertEqual("Curve.Linear");
expect(obj.$attrs.curve).assertEqual("Curve
s
.Linear");
console.info("[testswiperCurve0001] curve value :" + obj.$attrs.curve);
console.info("[testswiperCurve0001] curve value :" + obj.$attrs.curve);
done();
done();
});
});
...
@@ -74,7 +75,7 @@ export default function swiperCurveJsunit() {
...
@@ -74,7 +75,7 @@ export default function swiperCurveJsunit() {
console.info("[testswiperCurve0002] component cachedCount strJson:" + strJson);
console.info("[testswiperCurve0002] component cachedCount strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Swiper');
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.cachedCount).assertEqual(
2
);
expect(obj.$attrs.cachedCount).assertEqual(
"2"
);
console.info("[testswiperCurve0002] cachedCount value :" + obj.$attrs.cachedCount);
console.info("[testswiperCurve0002] cachedCount value :" + obj.$attrs.cachedCount);
done();
done();
});
});
...
@@ -91,7 +92,7 @@ export default function swiperCurveJsunit() {
...
@@ -91,7 +92,7 @@ export default function swiperCurveJsunit() {
console.info("[testswiperCurve0003] component index strJson:" + strJson);
console.info("[testswiperCurve0003] component index strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Swiper');
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.index).assertEqual(
1
);
expect(obj.$attrs.index).assertEqual(
"3"
);
console.info("[testswiperCurve0003] index value :" + obj.$attrs.index);
console.info("[testswiperCurve0003] index value :" + obj.$attrs.index);
done();
done();
});
});
...
@@ -108,7 +109,7 @@ export default function swiperCurveJsunit() {
...
@@ -108,7 +109,7 @@ export default function swiperCurveJsunit() {
console.info("[testswiperCurve0004] component autoPlay strJson:" + strJson);
console.info("[testswiperCurve0004] component autoPlay strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Swiper');
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.autoPlay).assertEqual(
true
);
expect(obj.$attrs.autoPlay).assertEqual(
"true"
);
console.info("[testswiperCurve0004] autoPlay value :" + obj.$attrs.autoPlay);
console.info("[testswiperCurve0004] autoPlay value :" + obj.$attrs.autoPlay);
done();
done();
});
});
...
@@ -142,7 +143,7 @@ export default function swiperCurveJsunit() {
...
@@ -142,7 +143,7 @@ export default function swiperCurveJsunit() {
console.info("[testswiperCurve0006] component indicator strJson:" + strJson);
console.info("[testswiperCurve0006] component indicator strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Swiper');
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.indicator).assertEqual(
true
);
expect(obj.$attrs.indicator).assertEqual(
"true"
);
console.info("[testswiperCurve0006] indicator value :" + obj.$attrs.indicator);
console.info("[testswiperCurve0006] indicator value :" + obj.$attrs.indicator);
done();
done();
});
});
...
@@ -159,7 +160,7 @@ export default function swiperCurveJsunit() {
...
@@ -159,7 +160,7 @@ export default function swiperCurveJsunit() {
console.info("[testswiperCurve0007] component loop strJson:" + strJson);
console.info("[testswiperCurve0007] component loop strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Swiper');
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.loop).assertEqual(
false
);
expect(obj.$attrs.loop).assertEqual(
"false"
);
console.info("[testswiperCurve0007] loop value :" + obj.$attrs.loop);
console.info("[testswiperCurve0007] loop value :" + obj.$attrs.loop);
done();
done();
});
});
...
@@ -176,7 +177,7 @@ export default function swiperCurveJsunit() {
...
@@ -176,7 +177,7 @@ export default function swiperCurveJsunit() {
console.info("[testswiperCurve0008] component duration strJson:" + strJson);
console.info("[testswiperCurve0008] component duration strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Swiper');
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.duration).assertEqual("1000");
expect(obj.$attrs.duration).assertEqual("1000
.000000
");
console.info("[testswiperCurve0008] duration value :" + obj.$attrs.duration);
console.info("[testswiperCurve0008] duration value :" + obj.$attrs.duration);
done();
done();
});
});
...
@@ -193,7 +194,7 @@ export default function swiperCurveJsunit() {
...
@@ -193,7 +194,7 @@ export default function swiperCurveJsunit() {
console.info("[testswiperCurve0009] component vertical strJson:" + strJson);
console.info("[testswiperCurve0009] component vertical strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Swiper');
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.vertical).assertEqual(
false
);
expect(obj.$attrs.vertical).assertEqual(
"false"
);
console.info("[testswiperCurve0009] vertical value :" + obj.$attrs.vertical);
console.info("[testswiperCurve0009] vertical value :" + obj.$attrs.vertical);
done();
done();
});
});
...
@@ -210,7 +211,7 @@ export default function swiperCurveJsunit() {
...
@@ -210,7 +211,7 @@ export default function swiperCurveJsunit() {
console.info("[testswiperCurve00010] component itemSpace strJson:" + strJson);
console.info("[testswiperCurve00010] component itemSpace strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Swiper');
expect(obj.$type).assertEqual('Swiper');
expect(obj.$attrs.itemSpace).assertEqual(
0
);
expect(obj.$attrs.itemSpace).assertEqual(
"0.00px"
);
console.info("[testswiperCurve00010] itemSpace value :" + obj.$attrs.itemSpace);
console.info("[testswiperCurve00010] itemSpace value :" + obj.$attrs.itemSpace);
done();
done();
});
});
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/textArea.test.ets
浏览文件 @
6e5528ba
...
@@ -206,11 +206,11 @@ export default function textAreaOnCutJsunit() {
...
@@ -206,11 +206,11 @@ export default function textAreaOnCutJsunit() {
it('testtextAreaCopyOption0011', 0, async function (done) {
it('testtextAreaCopyOption0011', 0, async function (done) {
console.info('textAreaCopyOption testtextAreaCopyOption0011 START');
console.info('textAreaCopyOption testtextAreaCopyOption0011 START');
await Utils.sleep(2000);
await Utils.sleep(2000);
let strJson = getInspectorByKey('
c
opyOptionText');
let strJson = getInspectorByKey('
textAreaC
opyOptionText');
console.info("[testtextAreaCopyOption0011] component copyOption strJson:" + strJson);
console.info("[testtextAreaCopyOption0011] component copyOption strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('
copyOptionText
');
expect(obj.$type).assertEqual('
TextArea
');
expect(obj.$attrs.copyOption).assertEqual(
0
);
expect(obj.$attrs.copyOption).assertEqual(
undefined
);
console.info("[testtextAreaCopyOption0011] copyOption value :" + obj.$attrs.copyOption);
console.info("[testtextAreaCopyOption0011] copyOption value :" + obj.$attrs.copyOption);
done();
done();
});
});
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/textInput.test.ets
浏览文件 @
6e5528ba
...
@@ -201,11 +201,11 @@ export default function textInputOnEditChangeJsunit() {
...
@@ -201,11 +201,11 @@ export default function textInputOnEditChangeJsunit() {
it('testtextInputCopyOption0001', 0, async function (done) {
it('testtextInputCopyOption0001', 0, async function (done) {
console.info('textInputCopyOption testtextInputCopyOption0001 START');
console.info('textInputCopyOption testtextInputCopyOption0001 START');
await Utils.sleep(2000);
await Utils.sleep(2000);
let strJson = getInspectorByKey('
c
opyOptionText');
let strJson = getInspectorByKey('
textInputC
opyOptionText');
console.info("[testtextInputCopyOption0001] component copyOption strJson:" + strJson);
console.info("[testtextInputCopyOption0001] component copyOption strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('TextInput');
expect(obj.$type).assertEqual('TextInput');
expect(obj.$attrs.copyOption).assertEqual(
0
);
expect(obj.$attrs.copyOption).assertEqual(
undefined
);
console.info("[testtextInputCopyOption0001] copyOption value :" + obj.$attrs.copyOption);
console.info("[testtextInputCopyOption0001] copyOption value :" + obj.$attrs.copyOption);
done();
done();
});
});
...
@@ -217,7 +217,7 @@ export default function textInputOnEditChangeJsunit() {
...
@@ -217,7 +217,7 @@ export default function textInputOnEditChangeJsunit() {
console.info("[testtextInputShowPasswordIcon0001] component textAlign strJson:" + strJson);
console.info("[testtextInputShowPasswordIcon0001] component textAlign strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('TextInput');
expect(obj.$type).assertEqual('TextInput');
expect(obj.$attrs.showPasswordIcon).assertEqual(
true
);
expect(obj.$attrs.showPasswordIcon).assertEqual(
undefined
);
console.info("[testtextInputShowPasswordIcon0001] showPasswordIcon value :" + obj.$attrs.showPasswordIcon);
console.info("[testtextInputShowPasswordIcon0001] showPasswordIcon value :" + obj.$attrs.showPasswordIcon);
done();
done();
});
});
...
...
arkui/ace_ets_component_apilack/entry/src/main/ets/test/textPicker.test.ets
浏览文件 @
6e5528ba
...
@@ -210,7 +210,7 @@ export default function textPickerDefaultPickerItemHeightJsunit() {
...
@@ -210,7 +210,7 @@ export default function textPickerDefaultPickerItemHeightJsunit() {
console.info("[testtextPickerDefaultPickerItemHeight0011] component defaultPickerItemHeight strJson:" + strJson);
console.info("[testtextPickerDefaultPickerItemHeight0011] component defaultPickerItemHeight strJson:" + strJson);
let obj = JSON.parse(strJson);
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('TextPicker');
expect(obj.$type).assertEqual('TextPicker');
expect(obj.$attrs.defaultPickerItemHeight).assertEqual("80px");
expect(obj.$attrs.defaultPickerItemHeight).assertEqual("80
.00
px");
console.info("[testtextPickerDefaultPickerItemHeight0011] defaultPickerItemHeight value :" + obj.$attrs.defaultPickerItemHeight);
console.info("[testtextPickerDefaultPickerItemHeight0011] defaultPickerItemHeight value :" + obj.$attrs.defaultPickerItemHeight);
done();
done();
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录