Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
砖业洋__
harmony_JS_Demo_breathe
提交
585ad117
H
harmony_JS_Demo_breathe
项目概览
砖业洋__
/
harmony_JS_Demo_breathe
通知
26
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
harmony_JS_Demo_breathe
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
585ad117
编写于
9月 24, 2020
作者:
砖业洋__
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
step2 点击按钮两个hml页面相互跳转
上级
573aa752
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
80 addition
and
40 deletion
+80
-40
entry/src/main/config.json
entry/src/main/config.json
+40
-39
entry/src/main/js/default/pages/index/index.js
entry/src/main/js/default/pages/index/index.js
+5
-1
entry/src/main/js/default/pages/xunlian/xunlian.css
entry/src/main/js/default/pages/xunlian/xunlian.css
+18
-0
entry/src/main/js/default/pages/xunlian/xunlian.hml
entry/src/main/js/default/pages/xunlian/xunlian.hml
+6
-0
entry/src/main/js/default/pages/xunlian/xunlian.js
entry/src/main/js/default/pages/xunlian/xunlian.js
+11
-0
未找到文件。
entry/src/main/config.json
浏览文件 @
585ad117
{
"app"
:{
"bundleName"
:
"com.example.huxi"
,
"vendor"
:
"example"
,
"version"
:{
"code"
:
1
,
"name"
:
"1.0"
},
"apiVersion"
:{
"compatible"
:
3
,
"target"
:
3
}
},
"deviceConfig"
:{},
"module"
:{
"deviceType"
:[
"liteWearable"
],
"distro"
:{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"entry"
,
"moduleType"
:
"entry"
},
"abilities"
:[
{
"name"
:
"default"
,
"icon"
:
"$media:icon"
,
"label"
:
"Huxi"
,
"type"
:
"page"
}
],
"js"
:[
{
"pages"
:[
"pages/index/index"
],
"name"
:
"default"
}
]
}
"app"
:
{
"bundleName"
:
"com.example.huxi"
,
"vendor"
:
"example"
,
"version"
:
{
"code"
:
1
,
"name"
:
"1.0"
},
"apiVersion"
:
{
"compatible"
:
3
,
"target"
:
3
}
},
"deviceConfig"
:
{},
"module"
:
{
"deviceType"
:
[
"liteWearable"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"entry"
,
"moduleType"
:
"entry"
},
"abilities"
:
[
{
"name"
:
"default"
,
"icon"
:
"$media:icon"
,
"label"
:
"Huxi"
,
"type"
:
"page"
}
],
"js"
:
[
{
"pages"
:
[
"pages/index/index"
,
"pages/xunlian/xunlian"
],
"name"
:
"default"
}
]
}
}
\ No newline at end of file
entry/src/main/js/default/pages/index/index.js
浏览文件 @
585ad117
import
router
from
'
@system.router
'
;
export
default
{
data
:
{
title
:
'
World
'
},
clickAction
()
{
console
.
log
(
"
我被点击了
"
)
router
.
replace
({
uri
:
"
pages/xunlian/xunlian
"
})
}
}
entry/src/main/js/default/pages/xunlian/xunlian.css
0 → 100644
浏览文件 @
585ad117
.container
{
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
width
:
454px
;
height
:
454px
;
}
.title
{
font-size
:
30px
;
text-align
:
center
;
width
:
200px
;
height
:
100px
;
}
.btn
{
width
:
200px
;
height
:
50px
;
}
entry/src/main/js/default/pages/xunlian/xunlian.hml
0 → 100644
浏览文件 @
585ad117
<div class="container">
<text class="title">
训练页面
</text>
<input type="button" value="返回" class="btn" onclick="clickAction"></input>
</div>
entry/src/main/js/default/pages/xunlian/xunlian.js
0 → 100644
浏览文件 @
585ad117
import
router
from
'
@system.router
'
export
default
{
data
:
{
},
clickAction
()
{
router
.
replace
({
uri
:
'
pages/index/index
'
// 所有页面的uri都需要在config.json中定义
});
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录