Browse Source

Merge develop-0.12.0 into HEAD

pull/881/head
kasinooya 9 years ago
parent
commit
12c792147e
  1. 4
      README-zh_CN.md
  2. 3
      README.md
  3. 4
      components/breadcrumb/index.jsx
  4. 12
      components/button/index.md
  5. 4
      components/calendar/index.jsx
  6. 5
      components/checkbox/Group.jsx
  7. 4
      components/date-picker/PickerMixin.jsx
  8. 4
      components/message/index.jsx
  9. 2
      components/popconfirm/index.jsx
  10. 2
      components/popover/index.md
  11. 2
      components/tag/demo/basic.md
  12. 2
      components/tag/index.jsx
  13. 1
      components/tag/index.md
  14. 24
      components/time-picker/index.jsx
  15. 14
      components/time-picker/locale/en_US.js
  16. 14
      components/time-picker/locale/zh_CN.js
  17. 4
      components/timeline/demo/pending.md
  18. 70
      components/timeline/index.jsx
  19. 2
      components/timeline/index.md
  20. 6
      components/tree-select/index.md
  21. 4
      components/upload/index.jsx
  22. 1
      components/upload/index.md
  23. 4
      components/upload/uploadList.jsx
  24. 1
      docs/practice/cases.md
  25. 2
      docs/react/introduce.md
  26. 2
      docs/resource/download.md
  27. 2
      docs/spec/introduce.md
  28. 2
      docs/spec/layout/demo/aside.md
  29. 2
      docs/spec/layout/demo/top.md
  30. 9
      index.js
  31. 18
      package.json
  32. 1
      scripts/demo.js
  33. 12
      scripts/prenpm.js
  34. 2
      scripts/publish.sh
  35. 4
      site/static/style.css
  36. 2
      site/templates/home.html
  37. 10
      style/components/menu.less
  38. 12
      style/components/timeline.less
  39. 4
      style/components/timepicker/Picker.less
  40. 13
      style/components/upload.less
  41. 2
      webpack.antd.config.js

4
README-zh_CN.md

@ -41,10 +41,12 @@ import 'antd/lib/index.css'; // or 'antd/style/index.less'
现代浏览器和 IE8 及以上。
> [IE8 issues](https://github.com/xcatliu/react-ie8)
## 链接
- [首页](http://ant.design/)
- [React UI 库](http://ant.design/docs/introduce)
- [React UI 库](http://ant.design/docs/react/introduce)
- [修改记录](CHANGELOG.md)
- [开发脚手架](https://github.com/ant-design/antd-init/)
- [本地调试工具集](https://github.com/dora-js/dora/)

3
README.md

@ -40,11 +40,12 @@ Use components on demand by writing as `import DatePicker from 'antd/lib/date-pi
Normal browsers and Internet Explorer 8+.
> [IE8 issues](https://github.com/xcatliu/react-ie8)
## Links
- [Home page](http://ant.design/)
- [React UI library](http://ant.design/docs/introduce)
- [React UI library](http://ant.design/docs/react/introduce)
- [ChangeLog](CHANGELOG.md)
- [Scaffold tool](https://github.com/ant-design/antd-init/)
- [Debug tools set](https://github.com/dora-js/dora)

4
components/breadcrumb/index.jsx

@ -53,11 +53,11 @@ const Breadcrumb = React.createClass({
const ReactRouter = router;
if (routes && routes.length > 0 && ReactRouter) {
let Link = ReactRouter.Link;
crumbs = routes.map(function(route, i) {
crumbs = routes.map(function (route, i) {
if (!route.breadcrumbName) {
return null;
}
const name = route.breadcrumbName.replace(/\:(.*)/g, function(replacement, key) {
const name = route.breadcrumbName.replace(/\:(.*)/g, function (replacement, key) {
return params[key] || replacement;
});
let link;

12
components/button/index.md

@ -21,12 +21,12 @@
属性 | 说明 | 类型 | 默认值
-----|-----|-----|------
type | 设置按钮类型,可选值为 `primary` `ghost` 或者不设 | Enum | undefined
htmlType | 设置 `button` 原生的 `type` 值,可选值请参考 HTML标准 | Enum | `button`
shape | 设置按钮形状,可选值为 `circle` `circle-outline` 或者不设 | Enum | undefined
size | 设置按钮大小,可选值为 `small` `large` 或者不设 | Enum | undefined
loading | 设置按钮载入状态,存在为 `true`,不存在为 `false`,或直接设置值,如:`loading="true"` | Bool | false
onClick | `click` 事件的 handler | Function | `function() {}`
type | 设置按钮类型,可选值为 `primary` `ghost` 或者不设 | string | -
htmlType | 设置 `button` 原生的 `type` 值,可选值请参考 HTML标准 | string | `button`
shape | 设置按钮形状,可选值为 `circle` `circle-outline` 或者不设 | string | 无
size | 设置按钮大小,可选值为 `small` `large` 或者不设 | string | `default`
loading | 设置按钮载入状态 | boolean | false
onClick | `click` 事件的 handler | function | `function() {}`
- `<Button>Hello world!</Button>` 最终会被渲染为 `<button>Hello world!</button>`,并且除了上表中的属性,其它属性都会直接传到 `<button></button>`

4
components/calendar/index.jsx

@ -5,9 +5,9 @@ import FullCalendar from 'rc-calendar/lib/FullCalendar';
import { PREFIX_CLS } from './Constants';
import Header from './Header';
function noop () { return null; }
function noop() { return null; }
function zerofixed (v) {
function zerofixed(v) {
if (v < 10) return '0' + v;
return v + '';
}

5
components/checkbox/Group.jsx

@ -5,6 +5,7 @@ export default React.createClass({
getDefaultProps() {
return {
options: [],
defaultValue: [],
onChange() {},
};
},
@ -17,13 +18,13 @@ export default React.createClass({
getInitialState() {
const { value, defaultValue } = this.props;
return {
value: value || defaultValue || [],
value: value || defaultValue,
};
},
componentWillReceiveProps(nextProps) {
if ('value' in nextProps) {
this.setState({
value: nextProps.value,
value: nextProps.value || [],
});
}
},

4
components/date-picker/PickerMixin.jsx

@ -30,10 +30,8 @@ export default {
date.setTime(+value);
return date;
}
} else if (value === null) {
return value;
}
return undefined;
return value;
},
// remove input readonly warning

4
components/message/index.jsx

@ -46,9 +46,9 @@ function notice(content, duration = defaultDuration, type, onClose) {
</div>,
onClose
});
return (function() {
return (function () {
let target = key++;
return function() {
return function () {
instance.removeNotice(target);
};
})();

2
components/popconfirm/index.jsx

@ -4,7 +4,7 @@ import Icon from '../icon';
import Button from '../button';
const prefixCls = 'ant-popover';
const noop = function() {};
const noop = function () {};
const transitionNames = {
top: 'zoom-down',
bottom: 'zoom-up',

2
components/popover/index.md

@ -20,7 +20,7 @@
| 参数 | 说明 | 类型 | 默认值 |
|-----------|------------------------------------------|---------------|--------|
| trigger | 触发行为,可选 `hover/focus/click` | string | hover |
| placement | 气泡框位置,可选 `top/left/right/bottom/topLeft/topRight/bottomLeft/bottomRight/leftTop/leftBottom/rightTop/rightBottom` | string | top |
| placement | 气泡框位置,可选 `top/left/right/bottom` `topLeft/topRight/bottomLeft/bottomRight` `leftTop/leftBottom/rightTop/rightBottom` | string | top |
| title | 卡片标题 | React.Element | 无 |
| overlay | 卡片内容 | React.Element | 无 |
| prefixCls | 浮层的类名 | string | ant-popover |

2
components/tag/demo/basic.md

@ -17,6 +17,6 @@ ReactDOM.render(<div>
<Tag>标签一</Tag>
<Tag>标签二</Tag>
<Tag closable onClose={onClose}>标签三</Tag>
<Tag href="http://www.baidu.com">标签四(链接)</Tag>
<a href="https://www.alipay.com/" target="_blank"><Tag>标签四(链接)</Tag></a>
</div>, mountNode);
````

2
components/tag/index.jsx

@ -45,7 +45,7 @@ class AntTag extends React.Component {
transitionName={this.props.prefixCls + '-zoom'}
onEnd={this.animationEnd.bind(this)}>
<div data-show={!this.state.closing} className={className}>
<a className={this.props.prefixCls + '-text'} {...this.props} />
<span className={this.props.prefixCls + '-text'} {...this.props} />
{close}
</div>
</Animate>

1
components/tag/index.md

@ -17,7 +17,6 @@
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|----------------|--------------------------------|------------|---------|--------|
| href | 链接的地址,会传给 a 标签 | string | | false |
| closable | 标签是否可以关闭 | boolean | | false |
| onClose | 组合时根据此项判定checked | function | | 无 |
| color | 标签的色彩 | string | blue green yellow red | 无 |

24
components/time-picker/index.jsx

@ -4,13 +4,15 @@ import TimePicker from 'rc-time-picker/lib/TimePicker';
import objectAssign from 'object-assign';
import defaultLocale from './locale/zh_CN';
import classNames from 'classnames';
import GregorianCalendar from 'gregorian-calendar';
const AntTimePicker = React.createClass({
getDefaultProps() {
return {
format: 'HH:mm:ss',
prefixCls: 'ant-time-picker',
onChange() {},
onChange() {
},
locale: {},
align: {
offset: [0, -2],
@ -48,12 +50,18 @@ const AntTimePicker = React.createClass({
*/
parseTimeFromValue(value) {
if (value) {
if (typeof value === 'string') {
return this.getFormatter().parse(value, {
locale: this.getLocale(),
locale: this.getLocale().calendar,
obeyCount: true,
});
} else if (value instanceof Date) {
let date = new GregorianCalendar(this.getLocale().calendar);
date.setTime(+value);
return date;
}
}
return undefined;
return value;
},
handleChange(value) {
@ -62,15 +70,13 @@ const AntTimePicker = React.createClass({
getLocale() {
// Locale
let locale = objectAssign({}, defaultLocale, this.props.locale);
locale.lang = objectAssign({}, defaultLocale.lang, this.props.locale.lang);
return locale;
return objectAssign({}, defaultLocale, this.props.locale);
},
render() {
const props = objectAssign({}, this.props);
props.placeholder = ('placeholder' in this.props)
? props.placeholder : this.getLocale().lang.placeholder;
? props.placeholder : this.getLocale().placeholder;
if (props.defaultValue) {
props.defaultValue = this.parseTimeFromValue(props.defaultValue);
} else {
@ -78,8 +84,6 @@ const AntTimePicker = React.createClass({
}
if (props.value) {
props.value = this.parseTimeFromValue(props.value);
} else {
delete props.value;
}
let className = classNames({
[props.className]: !!props.className,
@ -96,7 +100,7 @@ const AntTimePicker = React.createClass({
<TimePicker
{...props}
className={className}
gregorianCalendarLocale={this.getLocale()}
locale={this.getLocale()}
formatter={this.getFormatter()}
onChange={this.handleChange}
/>

14
components/time-picker/locale/en_US.js

@ -1,14 +1,8 @@
import objectAssign from 'object-assign';
import GregorianCalendarLocale from 'gregorian-calendar/lib/locale/en_US';
import TimepickerLocale from 'rc-time-picker/lib/locale/en_US';
// 统一合并为完整的 Locale
let locale = objectAssign({}, GregorianCalendarLocale);
locale.lang = objectAssign({
placeholder: 'Select a time'
}, TimepickerLocale);
// All settings at:
// https://github.com/ant-design/ant-design/issues/424
const locale = {
placeholder: 'Select a time',
... TimepickerLocale,
};
export default locale;

14
components/time-picker/locale/zh_CN.js

@ -1,14 +1,8 @@
import objectAssign from 'object-assign';
import GregorianCalendarLocale from 'gregorian-calendar/lib/locale/zh_CN';
import TimepickerLocale from 'rc-time-picker/lib/locale/zh_CN';
// 统一合并为完整的 Locale
let locale = objectAssign({}, GregorianCalendarLocale);
locale.lang = objectAssign({
placeholder: '请选择时间'
}, TimepickerLocale);
// All settings at:
// https://github.com/ant-design/ant-design/issues/424
const locale = {
placeholder: '请选择时间',
... TimepickerLocale,
};
export default locale;

4
components/timeline/demo/pending.md

@ -2,7 +2,7 @@
- order: 2
在最后位置添加一个幽灵节点,表示时间轴未完成,还在记录过程中。
在最后位置添加一个幽灵节点,表示时间轴未完成,还在记录过程中。可以指定 `pending={true}` 或者 `pending={一个 React 元素}`
---
@ -10,7 +10,7 @@
import { Timeline } from 'antd';
ReactDOM.render(
<Timeline pending>
<Timeline pending={<a href="#">查看更多</a>}>
<Timeline.Item>创建服务现场 2015-09-01</Timeline.Item>
<Timeline.Item>初步排除网络异常 2015-09-01</Timeline.Item>
<Timeline.Item>技术测试异常 2015-09-01</Timeline.Item>

70
components/timeline/index.jsx

@ -1,56 +1,62 @@
import React from 'react';
import classNames from 'classnames';
let Timeline = React.createClass({
const TimelineItem = React.createClass({
getDefaultProps() {
return {
prefixCls: 'ant-timeline'
prefixCls: 'ant-timeline',
color: 'blue',
last: false,
pending: false,
};
},
render() {
let children = this.props.children;
const { prefixCls, color, last, children, pending } = this.props;
const itemClassName = classNames({
[prefixCls + '-item']: true,
[prefixCls + '-item-last']: last,
[prefixCls + '-item-pending']: pending,
});
return (
<ul className={this.props.prefixCls}>
{React.Children.map(children, function (ele, idx) {
let np = {
timelineLast: idx === children.length - 1,
pending: this.props.pending
};
return React.cloneElement(ele, np);
}, this)}
</ul>
<li className={itemClassName}>
<div className={prefixCls + '-item-tail'} />
<div className={prefixCls + '-item-head ' + prefixCls + '-item-head-' + color} />
<div className={prefixCls + '-item-content'}>{children}</div>
</li>
);
}
});
Timeline.Item = React.createClass({
const Timeline = React.createClass({
getDefaultProps() {
return {
prefixCls: 'ant-timeline',
color: 'blue',
pending: false
};
},
render() {
let props = this.props;
let prefixCls = props.prefixCls;
let color = props.color;
let pending = props.pending;
let timelineLast = props.timelineLast;
let endCls = pending && timelineLast ? prefixCls + '-item-last' : '';
let last = pending && timelineLast ?
<div className={prefixCls + '-item-head ' + prefixCls + '-item-head-end'}></div> :
null;
let lastTailShow = (timelineLast && !pending) ? 'none' : 'block';
const { prefixCls, children, pending } = this.props;
const pendingNode = typeof pending === 'boolean' ? null : pending;
const className = classNames({
[prefixCls]: true,
[prefixCls + '-pending']: !!pending,
});
return (
<li className={prefixCls + '-item ' + endCls}>
<div style={{ display: lastTailShow }} className={prefixCls + '-item-tail'}></div>
<div className={prefixCls + '-item-head ' + prefixCls + '-item-head-' + color}></div>
<div className={prefixCls + '-item-content'}>{props.children}</div>
{last}
</li>
<ul className={className}>
{
React.Children.map(children, (ele, idx) =>
React.cloneElement(ele, {
last: idx === children.length - 1,
})
)
}
{(!!pending)
? <TimelineItem pending={!!pending}>{pendingNode}</TimelineItem>
: null}
</ul>
);
}
});
Timeline.Item = TimelineItem;
export default Timeline;

2
components/timeline/index.md

@ -30,7 +30,7 @@
| 参数 | 说明 | 类型 | 可选值 |默认值 |
|-----------|------------------------------------------|------------|-------|--------|
| pending | 指定最后一个幽灵节点。 | boolean | 无 | false |
| pending | 指定最后一个幽灵节点是否存在或内容 | boolean or React.Element | 无 | false |
### Timeline.Item

6
components/tree-select/index.md

@ -1,14 +1,16 @@
# TreeSelect
- category: Components
- chinese: 树选择控件
- chinese: 树选择
- type: 表单
---
树型选择控件。
## 何时使用
当需要从树控件中灵活地筛选数据时
类似 Select 的选择控件,可选择的数据结构是一个树形结构时,可以使用 TreeSelect,例如公司层级、学科系统、分类目录等等。
## API

4
components/upload/index.jsx

@ -37,7 +37,7 @@ function genPercentAdd() {
let k = 0.1;
const i = 0.01;
const end = 0.98;
return function(s) {
return function (s) {
let start = s;
if (start >= end) {
return start;
@ -66,7 +66,7 @@ const AntUpload = React.createClass({
let targetItem;
let nextFileList = this.state.fileList.concat();
if (file.length > 0) {
targetItem = file.map(function(f) {
targetItem = file.map(function (f) {
const fileObject = fileToObject(f);
fileObject.status = 'uploading';
return fileObject;

1
components/upload/index.md

@ -23,6 +23,7 @@
| name | 可选参数, 上传的文件 | String | file |
| action | 必选参数, 上传的地址 | String | 无 |
| data | 可选参数, 上传所需参数 | Object | 无 |
| headers | 可选参数, 设置上传的请求头部,IE10 以上有效 | Object | 无 |
| showUploadList | 可选参数, 是否展示 uploadList, 默认开启 | Boolean | true |
| multiple | 可选参数, 是否支持多选文件,`ie10+` 支持。开启后按住 ctrl 可选择多个文件。 | Boolean | false |
| accept | 可选参数, 接受上传的文件类型, 详见 input accept Attribute | String | 无 |

4
components/upload/uploadList.jsx

@ -6,9 +6,9 @@ import { Line } from '../progress';
import classNames from 'classnames';
// https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL
const previewFile = function(file, callback) {
const previewFile = function (file, callback) {
const reader = new FileReader();
reader.onloadend = function() {
reader.onloadend = function () {
callback(reader.result);
};
reader.readAsDataURL(file);

1
docs/practice/cases.md

@ -107,7 +107,6 @@ AntV 将数据图形小组近几年在探索数据可视化过程中取得的成
};
img.src = url;
setTimeout(function() {
console.log('timeout');
finish('timeout');
}, 1500);
}

2
docs/react/introduce.md

@ -57,6 +57,8 @@ import 'antd/lib/index.css'; // or 'antd/style/index.less'
现代浏览器和 IE8 及以上。
> [IE8 issues](https://github.com/xcatliu/react-ie8)
## 链接
- [首页](http://ant.design/)

2
docs/resource/download.md

@ -14,7 +14,7 @@
<span class="resource-card-description">一套强大的 Ant Design 的 Axure 部件库</span>
</span>
</a>
<a target="_blank" href="https://github.com/ant-design/ant-design/releases/download/0.11.2/AntD_Box_v1.2.rp" class="resource-card">
<a target="_blank" href="https://github.com/ant-design/ant-design/releases/download/resource/AntD_Box_v1.2.rp" class="resource-card">
<img src="https://os.alipayobjects.com/rmsportal/UuYRXxndGMKdaiE.png">
<span class="resource-card-content">
<span class="resource-card-title">Axure Box</span>

2
docs/spec/introduce.md

@ -24,7 +24,7 @@ Ant Design 源自蚂蚁金服体验技术部的后台产品开发,我们的设
我们采用 [React](http://facebook.github.io/react/) 封装了一套 Ant Design 的组件库,也欢迎社区其他框架的实现版本。
- [Ant Design of React](/docs/introduce)(官方实现)
- [Ant Design of React](/docs/react/introduce)(官方实现)
- [vue-antd](https://github.com/okoala/vue-antd)
## 如何贡献

2
docs/spec/layout/demo/aside.md

@ -115,7 +115,7 @@ ReactDOM.render(
}
.ant-layout-aside .ant-layout-footer {
height; 64px;
height: 64px;
line-height: 64px;
text-align: center;
font-size: 12px;

2
docs/spec/layout/demo/top.md

@ -99,7 +99,7 @@ ReactDOM.render(
}
.ant-layout-top .ant-layout-footer {
height; 64px;
height: 64px;
line-height: 64px;
text-align: center;
font-size: 12px;

9
index.js

@ -1,4 +1,6 @@
import React from 'react';
// this file is not used if use https://github.com/ant-design/babel-plugin-antd
const React = require('react');
const antd = {
Affix: require('./components/affix'),
@ -47,10 +49,9 @@ const antd = {
Cascader: require('./components/cascader'),
};
antd.version = require('./package.json').version;
const ReactVersion = React.version;
if (process.env.NODE_ENV !== 'production') {
antd.version = require('./package.json').version;
const ReactVersion = React.version;
const warning = require('warning');
const semver = require('semver');
const reactVersionInDeps = require('./package.json').devDependencies.react;

18
package.json

@ -1,6 +1,6 @@
{
"name": "antd",
"version": "0.12.0-beta8",
"version": "0.12.0-beta.10",
"title": "Ant Design",
"description": "一个 UI 设计语言",
"homepage": "http://ant.design/",
@ -59,12 +59,12 @@
"rc-switch": "~1.3.1",
"rc-table": "~3.8.0",
"rc-tabs": "~5.6.0",
"rc-time-picker": "~1.0.0",
"rc-time-picker": "~1.1.0",
"rc-tooltip": "~3.3.0",
"rc-tree": "~0.26.1",
"rc-tree-select": "^0.3.3",
"rc-tree-select": "~0.3.3",
"rc-trigger": "~1.0.6",
"rc-upload": "~1.7.0",
"rc-upload": "~1.8.0",
"rc-util": "~3.0.1",
"react-slick": "~0.9.1",
"semver": "~5.1.0",
@ -73,8 +73,6 @@
"warning": "~2.1.0"
},
"devDependencies": {
"rc-scroll-anim": "0.0.5",
"rc-tween-one": "0.1.5",
"autoprefixer-loader": "^3.1.0",
"babel-cli": "^6.2.0",
"babel-core": "^6.2.1",
@ -104,6 +102,9 @@
"lodash": "^3.10.0",
"nico-jsx": "~0.7.0",
"pre-commit": "1.x",
"rc-form": "^0.8.0",
"rc-scroll-anim": "0.0.5",
"rc-tween-one": "0.1.5",
"react": "0.14.x",
"react-addons-test-utils": "0.14.x",
"react-copy-to-clipboard": "^3.0.4",
@ -122,8 +123,9 @@
"site": "npm run clean && webpack --config webpack.deploy.config.js && webpack --config webpack.antd.config.js && NODE_ENV=PRODUCTION nico build",
"deploy": "rm -rf node_modules && node scripts/install.js && npm run just-deploy",
"just-deploy": "npm run site && node scripts/deploy.js",
"lint": "eslint components test index.js --ext '.js,.jsx' && npm run mdlint && npm run lesshint",
"mdlint": "eslint components/*/demo/*.md --ext '.md' --global 'React,ReactDOM,mountNode' --rule 'no-console: 0'",
"lint": "npm run srclint && npm run mdlint && npm run lesshint",
"srclint": "eslint --fix components test index.js --ext '.js,.jsx'",
"mdlint": "eslint --fix components/*/demo/*.md --ext '.md' --global 'React,ReactDOM,mountNode' --rule 'no-console: 0'",
"lesshint": "lesshint style/ -e 'style/+(core|mixins)/+(base|iconfont|normalize|layouts|compatibility|grid).less'",
"test": "npm run lint && webpack && npm run jest",
"jest": "jest",

1
scripts/demo.js

@ -25,6 +25,7 @@ window.require = function (path) {
require('../style/index.less');
window['css-animation'] = require('css-animation');
window['react-router'] = require('react-router');
window['rc-form'] = require('rc-form');
window.CopyToClipboard = require('react-copy-to-clipboard');
var antd = require('../index');
var React = require('react');

12
scripts/prenpm.js

@ -1,19 +1,11 @@
var fs = require('fs');
var cwd = process.cwd();
var path = require('path');
var pkg = require('../package');
var originalIndex = fs.readFileSync(path.join(cwd, 'lib/index.js'), 'utf-8');
var newIndex = originalIndex
.replace(/\/components\//g, '/')
.replace(/require\(\'\.\/package.json\'\)/g, "require('./package')");
.replace(/\/components\//g, '/');
fs.writeFileSync(path.join(cwd, 'lib/index.js'), newIndex, 'utf-8');
fs.writeFileSync(
path.join(cwd, 'lib/package.js'),
"module.exports = " + JSON.stringify(require('../package.json')) + ";",
'utf-8'
);
var antdCss = path.join(cwd, 'dist/index.css');
var antdCss = path.join(cwd, 'dist/antd.css');
fs.createReadStream(antdCss)
.pipe(fs.createWriteStream(path.join(cwd, 'lib/index.css')));
console.log('prenpm done');

2
scripts/publish.sh

@ -1,6 +1,6 @@
npm run babel
rm -rf dist
webpack
webpack --config webpack.antd.config.js
node scripts/prenpm.js
npm publish $1 $2
rm -rf lib

4
site/static/style.css

@ -548,7 +548,7 @@ footer ul li > a {
width: 80%;
}
.markdown ul li {
.markdown ul > li {
list-style: circle;
}
@ -563,7 +563,7 @@ footer ul li > a {
margin: 0.6em 0;
}
.markdown ol li {
.markdown ol > li {
list-style: decimal;
}

2
site/templates/home.html

@ -55,7 +55,7 @@
position: relative;
height: 100%;
width: 100%;
background: url("https://t.alipayobjects.com/images/T1OhFkXfpgXXXXXXXX.png") no-repeat center / cover;
background: url("https://os.alipayobjects.com/rmsportal/GhjqstwSgxBXrZS.png") no-repeat center / cover;
}
.banner-text-wrapper {

10
style/components/menu.less

@ -35,6 +35,14 @@
transition: all 0.3s ease;
}
&-item > a {
display: block;
color: @text-color;
&:hover {
color: @text-color;
}
}
&-item-active,
&-submenu-title:hover {
background-color: tint(@primary-color, 90%);
@ -58,7 +66,7 @@
&-vertical {
border-right: 1px solid #e9e9e9;
.@{menu-prefix-cls}-item {
border-right: 2px solid transparent;
border-right: 1px solid #e9e9e9;
margin-left: -1px;
left: 1px;
position: relative;

12
style/components/timeline.less

@ -17,6 +17,10 @@
border-left: 2px solid @timeline-color;
}
&-pending &-tail {
display: none;
}
&-head {
position: absolute;
width: 12px;
@ -32,9 +36,6 @@
&-green {
border: 2px solid @success-color;
}
&-end {
border: 2px solid @timeline-color;
}
}
&-content {
@ -47,10 +48,15 @@
&-last {
.@{timeline-prefix-cls}-item-tail {
border-left: 2px dotted @timeline-color;
display: none;
}
.@{timeline-prefix-cls}-item-content {
min-height: 48px;
}
}
}
&&-pending &-item-last &-item-tail {
display: block;
}
}

4
style/components/timepicker/Picker.less

@ -28,6 +28,10 @@
}
}
.@{calendar-prefix-cls}-time .@{timepicker-prefix-cls}-panel {
min-width: 168px;
}
.@{timepicker-prefix-cls} {
position: relative;
display: inline-block;

13
style/components/upload.less

@ -162,9 +162,9 @@
.@{upload-item}-thumbnail {
width: 48px;
height: 48px;
display: inline-block;
overflow: hidden;
vertical-align: middle;
position: absolute;
top: 8px;
left: 8px;
}
.@{upload-item}-thumbnail img {
@ -186,6 +186,11 @@
margin: 0 0 0 8px;
line-height: 42px;
transition: all 0.3s ease;
padding-left: 48px;
padding-right: 8px;
max-width: 100%;
display: inline-block;
box-sizing: border-box;
}
.@{upload-item}-uploading .@{upload-item}-name {
@ -224,6 +229,7 @@
&:before {
content: ' ';
position: absolute;
z-index: 1;
width: @imgupload-size;
height: @imgupload-size;
background-color: #808080;
@ -236,6 +242,7 @@
position: absolute;
left: 25px;
top: 40px;
z-index: 10;
transition: all 0.3s ease;
cursor: pointer;
font-size: 16px;

2
webpack.antd.config.js

@ -1,6 +1,6 @@
var config = require('./webpack.config');
config.entry = {
'antd': ['./index.js']
'antd': ['./index.js', './style/index.less']
};
config.externals = {
'react': {

Loading…
Cancel
Save