Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
iswitch-core
Advanced tools
一个实现Switch功能的Web组件,支持原生JavaScript及jQuery、Vue、React、Angular等框架。
[图片示例待添加]
change
事件change
前事件disabled
、loading
、readonly
、static
状态动画
、尺寸
、颜色
平台 | 包名 | 版本 | 备注 |
---|---|---|---|
iswitch-js | 实现中... | ||
iswitch-vue | 实现中... | ||
iswitch-react | 实现中... | ||
iswitch-angular | 实现中... |
iSwitch组件支持在多种JS框架中运行,请挑选适合你的,安装并使用她。
<!--原生JS版本-->
<script src="~/iswitch-js/dist/index.js"></script>
<!--Vue版本-->
<script src="~/iswitch-vue/dist/index.js"></script>
<!--React版本-->
<script src="~/iswitch-react/dist/index.js"></script>
<!--Angular版本-->
<script src="~/iswitch-angular/dist/index.js"></script>
<!--原生JS版本-->
<script src="~/iswitch-js/1.0.0/dist/index.js"></script>
<!--Vue版本-->
<script src="~/iswitch-vue/1.0.0/dist/index.js"></script>
<!--React版本-->
<script src="~/iswitch-react/1.0.0/dist/index.js"></script>
<!--Angular版本-->
<script src="~/iswitch-angular/1.0.0/dist/index.js"></script>
# 原生JS版本
npm i -S iswitch-js
# Vue版本
npm i -S iswitch-vue
# React版本
npm i -S iswitch-react
# Angular版本
npm i -S iswitch-angular
名称 | 说明 | 类型 | 默认值 |
---|---|---|---|
name | 组件内部input[checkbox] 的name 属性值 | string | |
value | 组件值 | any | |
size | 组件尺寸,可选值:small default large | string | default |
loading | 组件是否进入loading 状态 | boolean | false |
loadingText | 组件进入loading 状态时,显示的loading 文字 | string | Loading... |
disabled | 组件是否禁用 | boolean | false |
readonly | 组件是否只读 | boolean | false |
static | 组件以静态方式渲染 | boolean | false |
delay | 滑动动画delay时间,单位毫秒 | number | 300 |
beforeChange | 开关切换前执行的函数,可返回一个Promise 对象,或者返回一个boolean 类型的值;当返回值是true 或者返回的Promise resolve时,才会执行切换,否则不执行切换 | function | |
onText | 打开状态下显示的文字 | string | ON |
onValue | 打开状态对应的值 | any | true |
onColor | 打开状态开关颜色 | string | green |
offText | 关闭状态下显示的文字 | string | OFF |
offValue | 关闭状态对应的值 | any | false |
offColor | 关闭状态开关颜色 | string | red |
switchOn,switchOff,switchToggle,destroy
change,input
FAQs
一个实现Switch功能的Web组件,支持原生JavaScript及jQuery、Vue、React、Angular等框架。
We found that iswitch-core 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.