
Security News
/Research
npm Phishing Email Targets Developers with Typosquatted Domain
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.
miniprogram-float-button
Advanced tools
a fly out button(motion button)
npm install --save miniprogram-float-button
<float-button
bind:toggle='toggle'
floatButtonChildData='{{floatButtonChildData}}'
right="{{120}}"
bottom="{{120}}"
mainImg="{{mainImg}}"
></float-button>
function hello() {
// eslint-disable-next-line no-console
console.log('say hello')
}
Page({
data: {
floatButtonChildData: [{
src: './images/frown.png',
content: '不开心',
onClick: hello
},
{
src: './images/message.png',
content: '我的信息',
// eslint-disable-next-line no-console
onClick: () => console.log('1')
},
{
src: './images/user.png',
content: '关于我',
// eslint-disable-next-line no-console
onClick: () => console.log('2')
}
],
mainImg: './images/plus.png',
isOpen: false,
},
toggle(e) {
// eslint-disable-next-line no-console
console.log(e.detail)
},
})
"usingComponents": {
"float-button": "/path/component"
}
选项 | 描述 | 类型 | 默认值 |
---|---|---|---|
bind:toggle | 点击modal取消按钮 | event | event |
mainImg | 主按钮的图片 | image | 无 |
floatButtonChildData | 子按钮数据(请按钮demo上的数据格式填写) | Array | 无 |
right | 距离窗口右边的距离(单位:rpx) | Number | 100 |
bottom | 距离窗口底部的距离(单位:rpx) | Number | 100 |
方法名 | 参数 | 描述 |
---|---|---|
open | 无 | 打开button |
close | 无 | 关闭button |
FAQs
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
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.
Security News
Knip hits 500 releases with v5.62.0, refining TypeScript config detection and updating plugins as monthly npm downloads approach 12M.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.