# native-js-interactive-encapsulation
**Repository Path**: cjolinss/native-js-interactive-encapsulation
## Basic Information
- **Project Name**: native-js-interactive-encapsulation
- **Description**: 主要用于vue和原生的交互
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2019-12-30
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# 前言
> vue和原生(ios和android)的交互封装
> 主要在项目中使用到vue和原生的交互,原生交互的方法必须挂载到window上,引入vue的作用域,挂载到vue的方法原生无法访问到,所以写一个app.js来完成原生和js的交互
> 目前主要使用的是监听安卓中的返回键事件
> 监听html中和native的webview的事件交互
## 说明
> 喜欢的别忘记了可以star一下的噢!
> 开发环境 win10 Chrome 58.0.3029.110 nodejs 6.2.0
## 技术栈
> vue + vue-router + webpack
## 效果图
## 原生调用组件中的事件演示
## 回掉原生事件演示
## 项目运行
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
```