Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
4643603a
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
4643603a
编写于
9月 01, 2023
作者:
O
openharmony_ci
提交者:
Gitee
9月 01, 2023
浏览文件
操作
浏览文件
下载
差异文件
!23654 arkts 告警清理monthly
Merge pull request !23654 from 耿文广/monthly_20230815
上级
02031d4d
48484e6d
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
19 addition
and
6 deletion
+19
-6
zh-cn/application-dev/quick-start/arkts-state.md
zh-cn/application-dev/quick-start/arkts-state.md
+10
-1
zh-cn/application-dev/quick-start/har-package.md
zh-cn/application-dev/quick-start/har-package.md
+1
-1
zh-cn/application-dev/reference/apis/js-apis-freeInstall.md
zh-cn/application-dev/reference/apis/js-apis-freeInstall.md
+8
-4
未找到文件。
zh-cn/application-dev/quick-start/arkts-state.md
浏览文件 @
4643603a
...
@@ -296,5 +296,14 @@ struct MyComponent {
...
@@ -296,5 +296,14 @@ struct MyComponent {
2.
对于
\@
State来说,命名参数机制传递的值并不是必选的,如果没有命名参数传值,则使用本地初始化的默认值:
2.
对于
\@
State来说,命名参数机制传递的值并不是必选的,如果没有命名参数传值,则使用本地初始化的默认值:
```
ts
```
ts
MyComponent
({
count
:
1
,
increaseBy
:
2
})
class
C1
{
public
count
:
number
;
public
increaseBy
:
number
;
constructor
(
count
:
number
,
increaseBy
:
number
)
{
this
.
count
=
count
;
this
.
increaseBy
=
increaseBy
;
}
}
let
obj
=
new
C1
(
1
,
2
)
MyComponent
(
obj
)
```
```
zh-cn/application-dev/quick-start/har-package.md
浏览文件 @
4643603a
...
@@ -103,7 +103,7 @@ export { MainPage } from './src/main/ets/components/MainPage/MainPage'
...
@@ -103,7 +103,7 @@ export { MainPage } from './src/main/ets/components/MainPage/MainPage'
```
js
```
js
// library/src/main/ts/test.ets
// library/src/main/ts/test.ets
export
class
Log
{
export
class
Log
{
static
info
(
msg
)
{
static
info
(
msg
:
string
)
{
console
.
info
(
msg
);
console
.
info
(
msg
);
}
}
}
}
...
...
zh-cn/application-dev/reference/apis/js-apis-freeInstall.md
浏览文件 @
4643603a
...
@@ -136,13 +136,14 @@ setHapModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: Upg
...
@@ -136,13 +136,14 @@ setHapModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: Upg
```
js
```
js
import
freeInstall
from
'
@ohos.bundle.freeInstall
'
;
import
freeInstall
from
'
@ohos.bundle.freeInstall
'
;
import
{
BusinessError
}
from
'
@ohos.base
'
;
let
bundleName
=
'
com.example.myapplication
'
;
let
bundleName
=
'
com.example.myapplication
'
;
let
moduleName
=
'
entry
'
;
let
moduleName
=
'
entry
'
;
let
upgradeFlag
=
freeInstall
.
UpgradeFlag
.
SINGLE_UPGRADE
;
let
upgradeFlag
=
freeInstall
.
UpgradeFlag
.
SINGLE_UPGRADE
;
try
{
try
{
freeInstall
.
setHapModuleUpgradeFlag
(
bundleName
,
moduleName
,
upgradeFlag
).
then
(()
=>
{
freeInstall
.
setHapModuleUpgradeFlag
(
bundleName
,
moduleName
,
upgradeFlag
).
then
(()
=>
{
console
.
info
(
'
Operation succeed
'
)
console
.
info
(
'
Operation succeed
'
)
}).
catch
(
err
=>
{
}).
catch
(
(
err
:
BusinessError
)
=>
{
console
.
error
(
'
Operation failed:
'
+
JSON
.
stringify
(
err
));
console
.
error
(
'
Operation failed:
'
+
JSON
.
stringify
(
err
));
});
});
}
catch
(
err
)
{
}
catch
(
err
)
{
...
@@ -236,12 +237,13 @@ isHapModuleRemovable(bundleName: string, moduleName: string): Promise\<boolean>;
...
@@ -236,12 +237,13 @@ isHapModuleRemovable(bundleName: string, moduleName: string): Promise\<boolean>;
```
js
```
js
import
freeInstall
from
'
@ohos.bundle.freeInstall
'
;
import
freeInstall
from
'
@ohos.bundle.freeInstall
'
;
import
{
BusinessError
}
from
'
@ohos.base
'
;
let
bundleName
=
'
com.example.myapplication
'
;
let
bundleName
=
'
com.example.myapplication
'
;
let
moduleName
=
'
entry
'
;
let
moduleName
=
'
entry
'
;
try
{
try
{
freeInstall
.
isHapModuleRemovable
(
bundleName
,
moduleName
).
then
(
data
=>
{
freeInstall
.
isHapModuleRemovable
(
bundleName
,
moduleName
).
then
(
data
=>
{
console
.
info
(
'
Operation succeed:
'
+
JSON
.
stringify
(
data
));
console
.
info
(
'
Operation succeed:
'
+
JSON
.
stringify
(
data
));
}).
catch
(
err
=>
{
}).
catch
(
(
err
:
BusinessError
)
=>
{
console
.
error
(
'
Operation failed:
'
+
JSON
.
stringify
(
err
));
console
.
error
(
'
Operation failed:
'
+
JSON
.
stringify
(
err
));
});
});
}
catch
(
err
)
{
}
catch
(
err
)
{
...
@@ -332,12 +334,13 @@ getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag): Promise\
...
@@ -332,12 +334,13 @@ getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag): Promise\
```
js
```
js
import
freeInstall
from
'
@ohos.bundle.freeInstall
'
;
import
freeInstall
from
'
@ohos.bundle.freeInstall
'
;
import
{
BusinessError
}
from
'
@ohos.base
'
;
let
bundleName
=
'
com.example.myapplication
'
;
let
bundleName
=
'
com.example.myapplication
'
;
let
bundlePackFlag
=
freeInstall
.
BundlePackFlag
.
GET_PACK_INFO_ALL
;
let
bundlePackFlag
=
freeInstall
.
BundlePackFlag
.
GET_PACK_INFO_ALL
;
try
{
try
{
freeInstall
.
getBundlePackInfo
(
bundleName
,
bundlePackFlag
).
then
(
data
=>
{
freeInstall
.
getBundlePackInfo
(
bundleName
,
bundlePackFlag
).
then
(
data
=>
{
console
.
info
(
'
Operation succeed:
'
+
JSON
.
stringify
(
data
));
console
.
info
(
'
Operation succeed:
'
+
JSON
.
stringify
(
data
));
}).
catch
(
err
=>
{
}).
catch
(
(
err
:
BusinessError
)
=>
{
console
.
error
(
'
Operation failed:
'
+
JSON
.
stringify
(
err
));
console
.
error
(
'
Operation failed:
'
+
JSON
.
stringify
(
err
));
});
});
}
catch
(
err
)
{
}
catch
(
err
)
{
...
@@ -402,10 +405,11 @@ getDispatchInfo(): Promise\<DispatchInfo>;
...
@@ -402,10 +405,11 @@ getDispatchInfo(): Promise\<DispatchInfo>;
```
js
```
js
import
freeInstall
from
'
@ohos.bundle.freeInstall
'
;
import
freeInstall
from
'
@ohos.bundle.freeInstall
'
;
import
{
BusinessError
}
from
'
@ohos.base
'
;
try
{
try
{
freeInstall
.
getDispatchInfo
().
then
(
data
=>
{
freeInstall
.
getDispatchInfo
().
then
(
data
=>
{
console
.
info
(
'
Operation succeed:
'
+
JSON
.
stringify
(
data
));
console
.
info
(
'
Operation succeed:
'
+
JSON
.
stringify
(
data
));
}).
catch
(
err
=>
{
}).
catch
(
(
err
:
BusinessError
)
=>
{
console
.
error
(
'
Operation failed:
'
+
JSON
.
stringify
(
err
));
console
.
error
(
'
Operation failed:
'
+
JSON
.
stringify
(
err
));
});
});
}
catch
(
err
)
{
}
catch
(
err
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录