Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

qcloud-iotexplorer-h5-panel-sdk

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qcloud-iotexplorer-h5-panel-sdk - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "qcloud-iotexplorer-h5-panel-sdk",
"version": "1.0.2",
"version": "1.0.3",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/release/qcloud-iotexplorer-h5-panel-sdk",

@@ -48,2 +48,61 @@ # qcloud-iotexplorer-h5-panel-sdk

### sdk.tips
tips模块,样式和风格与连连小程序一致
#### sdk.tips.show: (message, options) => Promise
* options.type?: 'info' | 'danger' | 'loading' | 'success';
* options.waitForHide?: boolean; 若为true,则 show 方法返回一个Promise,并且当关闭后才会触发 resolve
* options.duration?: number; 展示提示的时间,单位毫秒,默认 1500
* options.delayDuration?: number; 默认0,单位毫秒,提示会在该延时后展示
* options.canClickClose?: boolean; 默认true,点击mask是否能够关闭提示
* options.canBeReplace?: boolean; 默认false,为false时上一个提示未关闭前,再次调用 tips.show会被忽略
展示tips
#### sdk.tips.hide: () => Promise
关闭tips
#### sdk.tips.showLoading: (message, options) => Promise
封装后的 tips.show 方法,等价于:
```
this.show(message, {
type: 'loading',
canBeReplace: true,
duration: 0,
delayDuration: 200,
canClickClose: false,
...options,
})
```
#### sdk.tips.hideLoading: () => Promise
关闭loading tips
> 注意,showLoading后必须主动调用hideLoading,否则tips永远不会消失
#### sdk.tips.showSuccess: (message, options) => Promise
封装后的 tips.show 方法,等价于:
```
this.show(message, { type: 'success', ...opts });
```
#### sdk.tips.showInfo: (message, options) => Promise
封装后的 tips.show 方法,等价于:
```
this.show(message, { type: 'info', ...options });
```
#### sdk.tips.showError: (error, options) => Promise
* error: any; 可以为一个原生Error对象,可以为标准的api响应 { code, msg },也可以为一个字符串。
会先标准化处理错误展示信息后展示tips,等价于:
```
return this.show(errMsg, { type: 'danger', mask, duration, ...options });
```
### sdk.onWsClose: (callback) => void;

@@ -50,0 +109,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc