Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

antd

Package Overview
Dependencies
Maintainers
3
Versions
850
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antd - npm Package Compare versions

Comparing version 0.7.0-beta3 to 0.7.0

CHANGELOG.md

2

lib/index.js

@@ -31,3 +31,3 @@ require('./index.css');

antd.version = '0.7.0-beta3';
antd.version = '0.7.0';

@@ -34,0 +34,0 @@ if (typeof window !== undefined) {

@@ -8,2 +8,12 @@ 'use strict';

function getCheckedValue(children) {
var checkedValue = null;
children.forEach(function (radio) {
if (radio.props && radio.props.checked) {
checkedValue = radio.props.value;
}
});
return checkedValue;
}
var AntRadioGroup = React.createClass({

@@ -14,25 +24,30 @@ displayName: 'AntRadioGroup',

return {
prefixCls: 'ant-radio-group'
prefixCls: 'ant-radio-group',
onChange: function onChange() {}
};
},
getInitialState: function getInitialState() {
var value = null;
this.props.children.forEach(function (radio) {
if (radio.props && radio.props.checked) {
value = radio.props.value;
}
return false;
});
var props = this.props;
return {
selectedValue: value
value: props.value || props.defaultValue || getCheckedValue(props.children)
};
},
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
if ('value' in nextProps || getCheckedValue(nextProps.children)) {
this.setState({
value: nextProps.value || getCheckedValue(nextProps.children)
});
}
},
render: function render() {
var self = this;
var props = self.props;
var _this = this;
var props = this.props;
var children = props.children.map(function (radio) {
if (radio.props) {
return React.createElement(Radio, _extends({}, radio.props, {
onChange: self.onRadioChange,
checked: self.state.selectedValue === radio.props.value
return React.createElement(Radio, _extends({
key: radio.props.value
}, radio.props, {
onChange: _this.onRadioChange,
checked: _this.state.value === radio.props.value
}));

@@ -50,7 +65,5 @@ }

this.setState({
selectedValue: ev.target.value
value: ev.target.value
});
if (typeof this.props.onChange === 'function') {
this.props.onChange(ev);
}
this.props.onChange(ev);
}

@@ -57,0 +70,0 @@ });

@@ -11,3 +11,3 @@ 'use strict';

return {
className: 'ant-slider'
prefixCls: 'ant-slider'
};

@@ -14,0 +14,0 @@ },

{
"name": "antd",
"version": "0.7.0-beta3",
"version": "0.7.0",
"title": "Ant Design",

@@ -49,3 +49,3 @@ "description": "一个设计&前端框架",

"rc-select": "~4.4.0",
"rc-slider": "~1.2.6",
"rc-slider": "~1.3.1",
"rc-steps": "~1.1.4",

@@ -79,7 +79,6 @@ "rc-switch": "~1.2.0",

"babel": "babel components --out-dir lib",
"build": "npm run clean && webpack && nico build",
"pack": "npm run clean && webpack --optimize-minimize && nico build",
"release": "npm run clean && webpack --config webpack.config.production.js && webpack --config webpack.config.min.js && zip dist/${npm_package_name}-${npm_package_version}.zip -j dist dist/*",
"start": "npm run clean && nico server --watch",
"clean": "rm -rf _site",
"deploy": "rm -rf node_modules && node scripts/install.js && npm run pack && node scripts/deploy.js",
"clean": "rm -rf _site dist",
"deploy": "rm -rf node_modules && node scripts/install.js && npm run clean && webpack --optimize-minimize && nico build && node scripts/deploy.js",
"lint": "eslint components index.js --ext '.js,.jsx'",

@@ -86,0 +85,0 @@ "test": "webpack && npm run lint",

@@ -35,2 +35,3 @@ # Ant Design [![](https://img.shields.io/travis/ant-design/ant-design.svg?style=flat-square)](https://travis-ci.org/ant-design/ant-design) [![npm package](https://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd) [![Dependency Status](https://david-dm.org/ant-design/ant-design.svg?style=flat-square)](https://david-dm.org/ant-design/ant-design)

- [开发计划](https://github.com/ant-design/ant-design/issues/9)
- [修改记录](CHANGELOG.md)
- [React 模块](http://react-component.github.io/)

@@ -62,6 +63,6 @@ - [React 代码规范](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-code-style.md)

#### 构建
#### 版本构建
```bash
$ npm run build
$ npm run release
```

Sorry, the diff of this file is not supported yet

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