0
点赞
收藏
分享

微信扫一扫

鸿蒙Watch 页面跳转


新建页面

鸿蒙Watch 页面跳转_harmonyos


config.json 回自动注册

鸿蒙Watch 页面跳转_html_02


添加跳转

<button type="capsule" onclick="toStatusMonitor">状态检测</button>

写跳转方法

import router from '@system.router';

export default {
    data: {
    },
    onInit() {
    },
    onShow() {
    },
    toStatusMonitor() {
        router.push({
            uri: 'pages/status/status',
        });
    }
}

鸿蒙Watch 页面跳转_harmonyos_03

点击跳转 跳转成功

鸿蒙Watch 页面跳转_缓存_04

如果使用预览器没成功 应该是缓存问题 使用工具栏上方的刷新按钮

进入新的html页面 刷新 再退出 再进入入口html刷新就可以了

鸿蒙Watch 页面跳转_harmonyos_05


举报

相关推荐

0 条评论