
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
vi-abnormal-tips
Advanced tools
- npm i vi-abnormal-tips
- 使用微信开发者工具构建NPM并使用NPM模块
"usingComponents": {
"abnormal-tips": "vi-abnormal-tips"
}
<template>
<view style="position:relative;height: 200px; font-size">
<abnormal-tips></abnormal-tips>
</view>
</template>
<template>
<view style="position:relative;height: 200px; font-size">
<abnormal-tips tips="该分类下暂无商品数据"></abnormal-tips>
</view>
</template>
<template>
<view style="position:relative;height: 200px; font-size">
<abnormal-tips tips="{{tipsArr}}"></abnormal-tips>
</view>
</template>
<script>
Page({
data: {
tipsArr: [
'啊哦,暂时还没有内容',
'联系下客服试试吧'
],
}
})
</script>
<template>
<view style="position:relative;height: 200px; font-size">
<abnormal-tips icon-class="changeIconColor"></abnormal-tips>
</view>
</template>
<style>
.changeIconColor {
color: #eee;
}
</style>
<template>
<view style="position:relative;height: 200px; font-size">
<abnormal-tips tips-class="changeTextColor"></abnormal-tips>
</view>
</template>
<style>
.changeIconColor {
color: blue;
}
</style>
<template>
<view style="position:relative;height: 200px; font-size">
<abnormal-tips is-icon-slot>
<view slot="icon">我是替换的ICON</view>
</abnormal-tips>
</view>
</template>
<template>
<view style="position:relative;height: 200px; font-size">
<abnormal-tips is-tips-slot>
<view slot="tips">我是替换的文案提示</view>
</abnormal-tips>
</view>
</template>
<template>
<view style="position:relative;height: 200px; font-size">
<abnormal-tips
tips="{{networkTipsArr}}"
bind:network_change="networkChange"
bind:refresh="triggerToRefresh">
</abnormal-tips>
</view>
</template>
<script>
Page({
data: {
networkTipsArr: [
'请关闭手机网络链接,会出现按钮'
],
},
triggerToRefresh({ detail }) {
/*
// detail 表示 当前网络环境
// 值有:wifi、4G、3G、2G、none
*/
console.log(detail)
},
networkChange({ detail }) {
this.data.networkTipsArr[1] = '当前网络环境:' + detail.networkType
this.setData({
networkTipsArr:this.data.networkTipsArr
})
}
})
</script>
<template>
<view style="position:relative;height: 200px; font-size">
<abnormal-tips
button="返回首页"
tips="啊哦,该分类下暂无商品, 去其他分类下看看吧"
bind:refresh="triggerToRefresh">
</abnormal-tips>
</view>
</template>
<script>
Page({
triggerToRouter() {
wx.switchTab({
url: '/pages/index/index',
})
},
})
</script>
<template>
<view style="position:relative;height: 200px; font-size">
<abnormal-tips
icon-name="flee"
tips="啊哦,服务器走丢了">
</abnormal-tips>
</view>
</template>
<template>
<view style="position:relative;height: 200px; font-size">
<abnormal-tips
icon-name="offline"
tips="啊哦,网络连接失败"
bind:click="triggerToRouter">
</abnormal-tips>
</view>
</template>
| 接口 | 数据类型 | 说明 | 选项 | 默认值 |
|---|---|---|---|---|
| tips | String | 组件的提示内容 | 选填 | 暂无内容 |
| isIconSlot | Boolean | 是否使用外部ICON或图片 | 选填 | false |
| button | String | 提示按钮的内容 | 选填 | '' |
| iconName | String | 组件内置的iconfont, 详细内容见下方的iconfont解释 | 选填 | noData |
| isTipsSlot | Boolean | 是否使用自定义tips提示内容 | 选填 | false |
| 接口 | 说明 | 返回值 |
|---|---|---|
| click | tips button按钮点击事件 | 返回当前网络类型:wifi、4G、3G、2G、none |
| refresh | 刷新按钮事件 | 返回当前网络类型:wifi、4G、3G、2G、none |
| network_change | 获取当前网络的变化 | 返回当前网络类型:wifi、4G、3G、2G、none |
| 接口 | 说明 |
|---|---|
| abnormal-class | 组件Root级别的样式 |
| icon-class | iconfont样式 |
| tips-class | 提示文件样式 |
| 名称 | 说明 |
|---|---|
| noData | 无数据的iconfont |
| flee | 服务器出错的iconfont |
| offline | 断网的iconfont |
FAQs
The npm package vi-abnormal-tips receives a total of 2 weekly downloads. As such, vi-abnormal-tips popularity was classified as not popular.
We found that vi-abnormal-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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.