
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
npm install wx-tips # npm安装方式
yarn add wx-tips # yarn安装方式
// utils/tips.js
import tips from 'wx-tips'
export default const instance = tips.getInstance({
errorIconPath: '/images/error.png', // 错误提示图片路径 必须提供
alertIconPath: '/images/alert.png', // alert提示图片路径 必须提供
loadingMode: 'Loading' // 选项 NavigationBarLoading|Loading
})
// app.js
import tips '/utils/tips'
tips.alert('alert')
tips.modal('modal')
tips.loading()
tips.loaded()
tips getInstance方法参数配置| 参数 | 说明 | 类型 | 默认值 | 必须 |
|---|---|---|---|---|
| errorIconPath | 错误提示图片路径 绝对路径 | String | '' | true |
| alertIconPath | alert提示图片路径 绝对路径 | String | '' | true |
| loadingMode | loading模式 Loading对应 wx.showLoading/wx.hideLoading NavigationBarLoading对应 wx.showNavigationBarLoading/wx.hideNavigationBarLoading | String | NavigationBarLoading | false |
| duration | 显示周期,毫秒 | int | 1000 | false |
tips 实例方法api static getInstance(config = {}) this
success(title, duration = '') Promise
modal(content = '', title = '') Promise
confirm(content, payload = {}, title) Promise
toast(title, hideCallback, icon = 'success', duration = '')
loading(title = '', force = false)
loaded()
alert(title, duration = '') Promise
error(title, hideCallback, duration = '')
setLoading()
FAQs
wx-tips
We found that wx-tips demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.