Socket
Socket
Sign inDemoInstall

nuke-switch

Package Overview
Dependencies
Maintainers
3
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuke-switch - npm Package Compare versions

Comparing version 2.2.29 to 2.3.0

16

CHANGELOG.md

@@ -6,2 +6,18 @@ # Change Log

# [2.3.0](https://gitlab.alibaba-inc.com/nuke/switch/compare/v2.2.29...v2.3.0) (2018-11-14)
### Bug Fixes
* liscene fix ([ff9b7fd](https://gitlab.alibaba-inc.com/nuke/switch/commit/ff9b7fd))
### Features
* 将UI组件与功能库拆分 ([f5d0a2c](https://gitlab.alibaba-inc.com/nuke/switch/commit/f5d0a2c))
## [2.2.29](https://gitlab.alibaba-inc.com/nuke/switch/compare/v2.2.28...v2.2.29) (2018-10-09)

@@ -8,0 +24,0 @@

28

docs/basic.md

@@ -1,9 +0,35 @@

# Switch Demo
# Switch 包含受控、非受控 2 种用法,请注意区别
- order: 0
- title_en: Contains controlled and uncontrolled, please note the difference
包含受控、非受控 2 种用法,请注意区别。
---
```js
<NukePlayGround>
// 非受控用法
<Switch
key="switch3"
defaultChecked={true}
onValueChange={(value) => this.changeNotice('switch3', value)}
/>
// 受控用法
<View style={styles.cellItem}>
<Switch
key="switch4"
defaultChecked={false}
onValueChange={(value) => this.changeNotice('switch4', value)}
/>
<View style={styles.cellResult}>
<Text style={styles.label}>switch4 返回: </Text>
<Text style={styles.text}>{this.state.switch4}</Text>
</View>
</View>
</NukePlayGround>
```
---
```js

@@ -10,0 +36,0 @@ import { createElement, Component, render } from 'rax';

20

package.json
{
"name": "nuke-switch",
"version": "2.2.29",
"version": "2.3.0",
"description": "开关",

@@ -41,11 +41,11 @@ "main": "lib/index",

"dependencies": {
"nuke-env": "^2.2.29",
"nuke-helper": "^2.2.29",
"nuke-theme-provider": "^2.2.29"
"nuke-env": "^2.3.0",
"nuke-helper": "^2.3.0",
"nuke-theme-provider": "^2.3.0"
},
"devDependencies": {
"nuke-button": "^2.2.29",
"nuke-page": "^2.2.29",
"nuke-text": "^2.2.29",
"nuke-view": "^2.2.29"
"nuke-button": "^2.3.0",
"nuke-page": "^2.3.0",
"nuke-text": "^2.3.0",
"nuke-view": "^2.3.0"
},

@@ -55,4 +55,4 @@ "publishConfig": {

},
"license": "Apache",
"gitHead": "0375bb11b20b155440e12aa572843944be7d8760"
"license": "Apache-2.0",
"gitHead": "454e1430a04b6e345edb1d2632b1e051408d070d"
}

@@ -17,8 +17,8 @@ # Switch

Attribute | Explanation | Type | Default
-----|-----|-----|------
disabled | Is the switch interactive? | boolean | true
checked | Turn on or off(Controlled usage, Need to cooperate with onValueChange)| boolean|false
defaultChecked | Default selection(uncontrolled usage) | boolean|false
onValueChange | call this function when Switch changes | function(value) | null
| Attribute | Description | Type | Default |
| -------------- | ------------------------------------------------------------------------ | --------------- | ------- |
| disabled | Is the switch interactive? | boolean | true |
| checked | Turn on or off(Controlled usage, Need to cooperate with onValueChange) | boolean | false |
| defaultChecked | Default selection(uncontrolled usage) | boolean | false |
| onValueChange | call this function when Switch changes | function(value) | null |

@@ -25,0 +25,0 @@ ### Usage in controlled or uncontrolled

@@ -37,1 +37,7 @@ # Switch

```
## 其他
- bug、建议联系 <a href="dingtalk://dingtalkclient/action/sendmsg?dingtalk_id=kjwo3w5">@翊晨</a>
- 钉钉交流群
<img src="https://img.alicdn.com/tfs/TB101EESpXXXXXFXpXXXXXXXXXX-1122-1362.jpg" width="260" />
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc