赞
踩
navigator 组件类似HTML中的<a>组件,但只能跳转本地页面。目标页面必须在pages.json中注册。
所以这么写是不行的:
<navigator url="wwww.baidu.com">到百度</navigator>
新注册个页面,跳转到该页面,使用webview
<view>
<navigator url="./circleMember?url=https://www.baidu.com"
hover-class="navigator-hover" >
到百度</navigator>
</view>
新页面为:
<template> <view> <web-view :webview-styles="webviewStyles" :src="url"></web-view> </view> </template> <script> export default { data() { return { webviewStyles: { progress: { color: '#FF3333' } }, url:'' } }, onLoad(options) { console.log(options) this.url=options.url } } </script> <style> </style>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。