Commit be1a4851 authored by huaxiang's avatar huaxiang

Update README.md

parent 557fbb9a
# template
## Project setup
## 项目安装
```
npm install
yarn
```
### Compiles and hot-reloads for development
### 安卓相关
```
npm run serve
yarn android
```
### Compiles and minifies for production
### 相机调用
vue 向 rn 传递数据
```
npm run build
// str: 字符串, camera -> 相机拍照; record -> 相机摄像
window.ReactNativeWebView.postMessage(str)
```
### Run your tests
vue 接收数据
```
npm run test
window.WebViewBridge = {
onMessage: this.onMessage, //在window上挂载一个onMessage方法,RN自行调用
// receiveMessage: this._receiveMessage
}
const event = new Event('WebViewBridge')
window.dispatchEvent(event);
```
### Lints and fixes files
```
npm run lint
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment