harmony 鸿蒙“js” Tag
“js” Tag
The “js” tag contains the instance name and page route information.
Tag | Type | Default Value | Mandatory | Description |
---|---|---|---|---|
name | string | default | Yes | Name of the JavaScript instance. |
pages | Array | - | Yes | Route information. For details, see “pages”. |
NOTE
The “name” and “pages” tags are configured in the “js” tag of the config.json file.
pages
The “pages” defines the route information of each page. Each page consists of the page path and page name. The following is an example:
{
...
"pages": [
"pages/index/index",
"pages/detail/detail"
]
...
}
NOTE
The application home page is fixed to pages/index/index.
The page name should not be a component name, for example, text.hml or button.hml.
Example
{
"app": {
"bundleName": "com.example.player",
"version": {
"code": 1,
"name": "1.0"
},
"vendor": "example"
}
"module": {
...
"js": [
{
"name": "default",
"pages": [
"pages/index/index",
"pages/detail/detail"
]
}
],
"abilities": [
{
...
}
]
}
}
你可能感兴趣的鸿蒙文章
harmony 鸿蒙JavaScript-compatible Web-like Development Paradigm (ArkUI.Lite)
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦