Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
73e86935
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看板
未验证
提交
73e86935
编写于
1月 09, 2023
作者:
O
openharmony_ci
提交者:
Gitee
1月 09, 2023
浏览文件
操作
浏览文件
下载
差异文件
!7132 validator中拉起弹窗的接口在最新的SDK上已被删除,为不影响后续更新,切换最新接口
Merge pull request !7132 from 田文哲/master
上级
c7e85cab
2891a2d2
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
8 deletion
+6
-8
validator/acts_validator/src/main/ets/MainAbility/MainAbility.ts
...or/acts_validator/src/main/ets/MainAbility/MainAbility.ts
+5
-7
validator/acts_validator/src/main/ets/pages/ArkUI/TouchMoveTest.ets
...acts_validator/src/main/ets/pages/ArkUI/TouchMoveTest.ets
+1
-1
未找到文件。
validator/acts_validator/src/main/ets/MainAbility/MainAbility.ts
浏览文件 @
73e86935
import
Ability
from
'
@ohos.app.ability.UIAbility
'
import
Ability
from
'
@ohos.app.ability.UIAbility
'
import
abilityAccessCtrl
from
'
@ohos.abilityAccessCtrl
'
;
const
PERMISSIONS
:
Array
<
string
>
=
[
'
ohos.permission.READ_MEDIA
'
,
'
ohos.permission.WRITE_MEDIA
'
,
'
ohos.permission.CAPTURE_SCREEN
'
]
export
default
class
MainAbility
extends
Ability
{
export
default
class
MainAbility
extends
Ability
{
onCreate
(
want
,
launchParam
)
{
onCreate
(
want
,
launchParam
)
{
this
.
context
.
requestPermissionsFromUser
(
PERMISSIONS
)
globalThis
.
dir
=
this
.
context
.
filesDir
;
globalThis
.
dir
=
this
.
context
.
filesDir
;
console
.
log
(
"
[Demo] MainAbility onCreate
"
)
console
.
log
(
"
[Demo] MainAbility onCreate
"
)
globalThis
.
abilityWant
=
want
;
globalThis
.
abilityWant
=
want
;
...
@@ -18,8 +13,11 @@ export default class MainAbility extends Ability {
...
@@ -18,8 +13,11 @@ export default class MainAbility extends Ability {
}
}
onWindowStageCreate
(
windowStage
)
{
onWindowStageCreate
(
windowStage
)
{
// Main window is created, set main page for this ability
console
.
log
(
"
[Demo] MainAbility onWindowStageCreate
"
)
console
.
log
(
"
[Demo] MainAbility onWindowStageCreate
"
)
let
AtManager
=
abilityAccessCtrl
.
createAtManager
();
AtManager
.
requestPermissionsFromUser
(
this
.
context
,[
"
ohos.permission.READ_MEDIA
"
,
"
ohos.permission.WRITE_MEDIA
"
,
"
ohos.permission.CAPTURE_SCREEN
"
]).
then
(()
=>
{})
windowStage
.
loadContent
(
"
pages/index
"
,
(
err
,
data
)
=>
{
windowStage
.
loadContent
(
"
pages/index
"
,
(
err
,
data
)
=>
{
if
(
err
.
code
)
{
if
(
err
.
code
)
{
...
...
validator/acts_validator/src/main/ets/pages/ArkUI/TouchMoveTest.ets
浏览文件 @
73e86935
...
@@ -122,7 +122,7 @@ struct CustomContainer1 {
...
@@ -122,7 +122,7 @@ struct CustomContainer1 {
await fileio.close(fd);
await fileio.close(fd);
Logger.info(TAG, `write done`);
Logger.info(TAG, `write done`);
prompt.showToast({
prompt.showToast({
message: '
图片
保存成功', duration: 1000
message: '
结果
保存成功', duration: 1000
});
});
}
}
getScreen = (isFullScreen: boolean) => {
getScreen = (isFullScreen: boolean) => {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录