Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
miniprogram-slide-tabs
Advanced tools
类似可滑动的新闻菜单栏,支持tab栏点击自动滑动到视图区以及内容区侧滑
npm i -S miniprogram-slide-tabs
使用
{
"usingComponents": {
"slide-tabs": "wx-slide-tabs"
}
}
{
"usingComponents": {
"slide-tabs": "/components/wx-slide-tabs/index"
}
}
wxml(slot为slide-tab-(下标+1))
<slide-tabs tabs="{{['首页', '开发管理']}}" slidable="{{ false }}" loop="{{true}}" bind:change="onChange" >
<view slot="slide-tab-1">h1</view>
<view slot="slide-tab-2">h2</view>
<view slot="slide-tab-3">h3</view>
</slide-tabs>
js
Page({
onChange: function(e) {
console.log(e)
}
})
选项名 | 类型 | 是否必填 | 默认值 | 描述 |
---|---|---|---|---|
tabs | Array | false | [] | tab栏标题数组['首页', '开发管理']或者[{title: '首页'}, {title: '开发关注'}] |
tabheight | Number | false | 96 | 单位为rpx |
height | Number | false | 整个组件高度 | 默认视窗高度,单位为rpx |
loop | Boolean | false | false | 内容区是否衔接滑动,即从最后一栏右滑置第一栏,第一栏左滑至最后一栏 |
slidable | Boolean | false | false | tabs栏是否滑动,默认为false,内容平分宽度 |
选项名 | 类型 | 是否必填 | 描述 |
---|---|---|---|
bind:change | Function | false | 监听点击/切换事件 |
如果在某些场景下,当参数slide为true,tabs出现滚动的时候,出现了滚动条,可以在引入组件的页面或特定标签中添加如下样式隐藏滚动条
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
FAQs
> 类似可滑动的新闻菜单栏,支持tab栏点击自动滑动到视图区以及内容区侧滑
We found that miniprogram-slide-tabs 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.