'use strict';
import { createElement, Component, render, findDOMNode } from 'rax';
import { View, Text, TouchableHighlight, Modal, Button, ListView, Image } from 'nuke';
import QN from 'QAP-SDK';
class Demo extends Component {
constructor(props) {
super(props);
QN.navigator.push({
url: 'http://www.taobao.com',
title: '新开页面标题~~',
query: { x: 1, y: 2 },
settings: {
animate: true,
request: true,
},
success(result) {
console.log(result);
},
error(error) {
console.log(error);
}
});
}
render() {
return (
<Text>hello World!</Text>
)
}
}
render(<Demo />);
出了在开新页面的时候设置标题外,还可以在运行时动态设置页面的标题
'use strict';
import { createElement, Component, render, findDOMNode } from 'rax';
import { View, Text, TouchableHighlight, Modal, Button, ListView, Image } from 'nuke';
import QN from 'QAP-SDK';
class Demo extends Component {
constructor(props) {
super(props);
QN.navigator.setTitle({
query: {
title: '我是标题'
},
error(error) {
console.log(error);
}
})
}
render() {
return (
<Text>hello World!</Text>
)
}
}
render(<Demo />);