@kbapp/js-bridge 0.2.2-alpha.0 → 0.2.3-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.MD +2 -2
- package/package.json +1 -1
package/README.MD
CHANGED
|
@@ -25,7 +25,7 @@ pnpm add @kbapp/js-bridge
|
|
|
25
25
|
## 示例
|
|
26
26
|
|
|
27
27
|
```js
|
|
28
|
-
import { saveImageToLocal,
|
|
28
|
+
import { saveImageToLocal, JSBridgeCode } from '@kbapp/js-bridge'
|
|
29
29
|
|
|
30
30
|
defineComponents({
|
|
31
31
|
/** 保存图片案例 */
|
|
@@ -36,7 +36,7 @@ defineComponents({
|
|
|
36
36
|
})
|
|
37
37
|
} catch (error) {
|
|
38
38
|
switch (error.errCode) {
|
|
39
|
-
case
|
|
39
|
+
case JSBridgeCode.UNSUPPORTED_VERSION:
|
|
40
40
|
// 用户当前版本为支持该桥接,此时应当引导用户升级app
|
|
41
41
|
// 用户同意后,可以调用 checkForNewVersion()或者前往应用商城
|
|
42
42
|
return
|