mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-18 13:04:46 +08:00
opti: website title
This commit is contained in:
parent
1967e7d7b7
commit
e8c95ee139
@ -34,6 +34,7 @@ class Content extends Component {
|
||||
}
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.title = 'YApi-高效、易用、功能强大的可视化接口管理平台';
|
||||
this.state = {
|
||||
curtab: 'view',
|
||||
visible: false,
|
||||
@ -45,7 +46,10 @@ class Content extends Component {
|
||||
const params = this.props.match.params;
|
||||
this.actionId = params.actionId;
|
||||
this.handleRequest(this.props);
|
||||
// window.confirm = () => {};
|
||||
}
|
||||
|
||||
componentWillUnmount(){
|
||||
document.getElementsByTagName('title')[0].innerText = this.title;
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
@ -101,8 +105,11 @@ class Content extends Component {
|
||||
visible: false
|
||||
});
|
||||
}
|
||||
render() {
|
||||
document.getElementsByTagName('title')[0].innerText = this.props.curdata.title;
|
||||
render() {
|
||||
if(this.props.curdata.title){
|
||||
document.getElementsByTagName('title')[0].innerText = this.props.curdata.title + '-' + this.title;
|
||||
}
|
||||
|
||||
let InterfaceTabs = {
|
||||
view: {
|
||||
component: View,
|
||||
|
Loading…
Reference in New Issue
Block a user