s-bridge:基于dsBridge扩展的npm包

时间:2021-04-01 10:10:20
【文件属性】:
文件名称:s-bridge:基于dsBridge扩展的npm包
文件大小:117KB
文件格式:ZIP
更新时间:2021-04-01 10:10:20
JavaScript npm方式安装初始化代码 npm install s - bridge //app.js直接引入 import Bridge from 's-bridge' Vue . prototype . $sbridge = Bridge 备注: 大部分的方法均支持同异步,格式如下: // 同步调用方法 let deviceInfo = this . $sbridge . getDeviceInfo ( ) console . log ( deviceInfo ) // 异步调用方法 this . $sbridge . asyncGetDeviceInfo ( ) . then ( res => { console . log ( res ) } ) 0.通用交互方法 调用原生方法的通用入口需与原生开发协商 // 推荐使用异步方法 同步方法无返回信息 /** * 参数列表 (name, u
【文件预览】:
s-bridge-master
----webpack.config.js(860B)
----src()
--------moduleJump()
--------photo()
--------speech()
--------api()
--------index.js(5KB)
----README.md(8KB)
----dist()
--------index.d.ts(2KB)
--------index.js(38KB)
----.gitignore(599B)
----node_modules()
--------dsbridge()
----package-lock.json(404KB)
----package.json(1KB)

网友评论