Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@beisen-phoenix/unmodeled-layer
Advanced tools
使用rc-trigger来实现弹框可见性的控制, 包括动画,定位等信息, 封装rc-trigger,实现自适应位置 #### API属性如下:
使用rc-trigger来实现弹框可见性的控制, 包括动画,定位等信息, 封装rc-trigger,实现自适应位置
成员 | 说明 | 类型 | 默认值 |
---|---|---|---|
visible | 是否显示 | boolean | - |
size | 尺寸大小: small(170px) large(340px) auto(与父级自适应) | string | - |
width | 自定义大小,优先级低于size | number | - |
autoSize | 是否监听弹层的大小变化 | Boolean | true |
childMargin | 子组件的外边距 | string | 0px |
trigger | 触发展示的行为: hover click | Array<'hover' 'click'> | [ 'hover'] |
footer | 自定义按钮 | object | - |
autoAdjust | 是否自适应调整位置 | Boolean | true |
content | 弹窗内容 | ReactNode | - |
stretch | 弹层拉伸 | string('width'、 'minWidth'、 'height'、 'minHeight') | - |
onVisibleChange | 弹层显示状态改变时调用, 参数为visible | Function(visible) | - |
onOk | 默认确定按钮的回调函数 | Function | - |
extraCls | 自定义class | string | "" |
blockContainer | 外层容器的显示类型(true是block类型,false则是inline-block) | Boolean | false |
placement | 弹层的显示位置(可选值:topLeft, topRight, bottomRight, bottomLeft) | string | bottomLeft |
builtinPlacements | 弹层的可定义偏移位置(具体可参考dom-align) | object | -- |
getPopupContainer | 弹层挂载的容器 | Function | - |
{
topLeft: {
points: ['bl', 'tl'],
},
topRight: {
points: ['br', 'tr'],
},
bottomRight: {
points: ['tr', 'br'],
},
bottomLeft: {
points: ['tl', 'bl'],
offset: [-11, -15]
},
}
let footer = [{
text: '按钮1',
onClick: ()=> console.log("按钮1")
}, {
text: '按钮2',
onClick: ()=> console.log("按钮2")
}]
<UnmodeledLayer
visible={visible}
size = 'small'
footer={footer}
trigger={['hover', 'click']}
content={content}
onOk={this.handleOk}
onVisibleChange={this.onVisibleChange}
>
<Button>打开</Button>
</UnmodeledLayer>
FAQs
使用 rc-trigger 来实现弹框可见性的控制, 包括动画,定位等信息, 封装 rc-trigger,实现自适应位置
The npm package @beisen-phoenix/unmodeled-layer receives a total of 5 weekly downloads. As such, @beisen-phoenix/unmodeled-layer popularity was classified as not popular.
We found that @beisen-phoenix/unmodeled-layer 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.