Location 页面地址
API#
- 解析当前页面参数
一个Location 对象 包含以下属性
{
host:"30.5.82.153:3050",
hostname:"30.5.82.153",
origin:"http://30.5.82.153:3050",
pathname:"/build/navigator.js",
port:"3050",
protocol:"http:",
search:"?a=b&c=d"
}
一个Location 对象 包含以下属性
{
host:"30.5.82.153:3050",
hostname:"30.5.82.153",
origin:"http://30.5.82.153:3050",
pathname:"/build/navigator.js",
port:"3050",
protocol:"http:",
search:"?a=b&c=d"
}
/** @jsx createElement */
import {createElement, Component} from 'weex-rx';
import {view} from 'nuke-components';
import { Button,Modal } from 'nuke';
import {mount} from 'nuke-mounter';
import Util from 'nuke-util';
let App = class NukeDemoIndex extends Component {
constructor() {
super();
}
loc(){
console.log(Util.Location);
}
render(){
return (
<View style={{flex:'1'}}>
<Button onPress={this.loc.bind(this)} block="true" type="primary">解析location</Button>
</View>
)
}
}
mount(<App />, mountNode);