Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何使用 #2

Open
zzq1023 opened this issue Jun 8, 2018 · 1 comment
Open

如何使用 #2

zzq1023 opened this issue Jun 8, 2018 · 1 comment

Comments

@zzq1023
Copy link

zzq1023 commented Jun 8, 2018

集成后,不知道如何在js正确调用

@raininfall
Copy link
Owner

raininfall commented Jun 8, 2018

这个之前我自己用的,已经不用了,文档没那么详尽,我自己都忘了。
看代码应该是:
Component暴露有3个属性:
enableJavaScript: PropTypes.bool,
enableJavaScriptCanOpenWindowsAutomatically: PropTypes.bool,
enableWideViewPort: PropTypes.bool,
名字是对应Webview的Setting的函数

地址加载时使用函数 load

class Web extends Component {
  componentDidMount() {
    this.web.load('https://www.baidu.com');
  }
  render() {
    return (
      <Web ref={ref => this.web = ref} />
    );
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants