Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
NFT
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanfeng zhang
NFT
Commits
be1a4851
Commit
be1a4851
authored
Jul 26, 2021
by
huaxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
557fbb9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
README.md
README.md
+17
-12
No files found.
README.md
View file @
be1a4851
# 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
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment