Browse Source

Merge branch 'master' of https://github.com/ant-design/ant-design

pull/55/head
SimaQ 9 years ago
parent
commit
ef6067c5b3
  1. 8
      docs/getting-started.md
  2. 16
      package.json
  3. 43
      style/components/pagination.less
  4. 6
      style/components/select.less
  5. 1
      style/mixins/compatibility.less

8
docs/getting-started.md

@ -13,7 +13,7 @@ Ant Design 封装了一套基于 React 实现的 UI 组件,可以用 React 的
下面有一个使用了 [日期选择](http://ant.design/components/datepicker) 组件的简单例子。
<iframe width="100%" height="400" src="//jsfiddle.net/afc163/6k22tgpx/embedded/result,html" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
<iframe width="100%" height="400" src="//jsfiddle.net/6k22tgpx/3/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
源码如下:
@ -25,6 +25,7 @@ Ant Design 封装了一套基于 React 实现的 UI 组件,可以用 React 的
<!-- 引入样式 -->
<link rel="stylesheet" href="http://ant.design/dist/antd.css">
<!-- 引入 react 和 antd.js -->
<script src="https://a.alipayobjects.com/??es5-shim/4.0.5/es5-shim.js,es5-shim/4.0.5/es5-sham.js,html5shiv/3.7.2/src/html5shiv.js"></script>
<script src="https://a.alipayobjects.com/??jquery/jquery/1.11.1/jquery.js,react/0.13.3/react.min.js,react/0.13.3/JSXTransformer.js"></script>
<script src="http://ant.design/dist/antd.js"></script>
</head>
@ -116,6 +117,7 @@ $ touch index.html
<meta charset="utf-8">
<!-- 引入样式 -->
<link rel="stylesheet" href="/index.css">
<script src="https://a.alipayobjects.com/??es5-shim/4.0.5/es5-shim.js,es5-shim/4.0.5/es5-sham.js,html5shiv/3.7.2/src/html5shiv.js"></script>
<script src="https://a.alipayobjects.com/??jquery/jquery/1.11.1/jquery.js,react/0.13.3/react.min.js"></script>
</head>
<body>
@ -156,10 +158,10 @@ Ant Design 支持所有的现代浏览器和 IE8+。
<meta charset="utf-8">
<!-- 引入样式 -->
<link rel="stylesheet" href="http://ant.design/dist/antd.css">
<!-- Polyfills -->
<script src="https://a.alipayobjects.com/??es5-shim/4.0.5/es5-shim.js,es5-shim/4.0.5/es5-sham.js,html5shiv/3.7.2/src/html5shiv.js"></script>
<!-- 引入 jquery 和 react -->
<script src="https://a.alipayobjects.com/??jquery/jquery/1.11.1/jquery.js,react/0.13.3/react.min.js"></script>
<!-- Polyfills -->
<script src="https://a.alipayobjects.com/react/0.13.3/??es5-shim/4.0.5/es5-shim.js,es5-shim/4.0.5/es5-sham.js,html5shiv/3.7.2/src/html5shiv.js"></script>
</head>
<body>
</body>

16
package.json

@ -15,7 +15,9 @@
"framework",
"frontend"
],
"contributors": ["ant"],
"contributors": [
"ant"
],
"repository": {
"type": "git",
"url": "https://github.com/ant-design/ant-design"
@ -24,30 +26,32 @@
"url": "https://github.com/ant-design/ant-design/issues"
},
"main": "lib/index",
"files": ["lib"],
"files": [
"lib"
],
"license": "MIT",
"dependencies": {
"gregorian-calendar": "~3.0.0",
"gregorian-calendar-format": "~3.0.1",
"object-assign": "~3.0.0",
"rc-calendar": "~3.10.0",
"rc-checkbox": "~1.0.6",
"rc-collapse": "~1.2.2",
"rc-dialog": "~4.4.0",
"rc-dropdown": "~1.1.1",
"rc-input-number": "~2.0.1",
"rc-menu": "~3.4.2",
"rc-notification": "~1.0.1",
"rc-pagination": "^1.0.0",
"rc-pagination": "~1.0.0",
"rc-progress": "~1.0.0",
"rc-radio": "~2.0.0",
"rc-select": "~4.4.0",
"rc-slider": "~1.2.6",
"rc-steps": "~1.1.4",
"rc-switch": "~1.2.0",
"rc-table": "~3.1.0",
"rc-tabs": "~5.2.0",
"rc-tooltip": "~2.4.0",
"rc-checkbox":"~1.0.0",
"rc-radio":"~2.0.0"
"rc-tooltip": "~2.4.0"
},
"devDependencies": {
"css-animation": "~1.0.3",

43
style/components/pagination.less

@ -53,27 +53,31 @@
}
&-jump-prev, &-jump-next {
&:after {
content: "•••";
display: block;
letter-spacing: 2px;
color: #ccc;
font-size: 12px;
margin-top: 1px;
}
&:hover {
&:after {
color: @primary-color;
.iconfont-size-under-12px(8px);
letter-spacing: -1px;
font-family: "anticon";
}
}
}
&-jump-prev {
.cross-rotate(180deg);
&:hover {
&:after {
content: "‹‹";
content: "\e611\e611";
}
}
}
@ -81,7 +85,7 @@
&-jump-next {
&:hover {
&:after {
content: "››";
content: "\e611\e611";
}
}
}
@ -93,7 +97,6 @@
font-family: Arial;
cursor: pointer;
color: #666;
font-size: 10px;
border-radius: 6px;
list-style: none;
min-width: 28px;
@ -102,18 +105,23 @@
float: left;
text-align: center;
transition: all 0.3s ease;
display: inline-block;
}
&-prev, &-next {
border: 1px solid #d9d9d9;
a {
font-size: 16px;
color: #666;
&:after {
.iconfont-size-under-12px(8px);
display: block;
margin-top: -2px;
height: 26px;
line-height: 26px;
font-family: "anticon";
}
}
&:hover {
@ -126,13 +134,21 @@
}
&-prev {
a:after {
content: "‹";
.cross-rotate(180deg);
a {
&:after {
content: "\e611";
display: block;
}
}
}
&-next {
a:after {
content: "›";
a {
&:after {
content: "\e611";
display: block;
}
}
}
@ -225,6 +241,13 @@
height: 20px;
line-height: 20px;
border: none;
a {
&:after {
height: 20px;
line-height: 20px;
}
}
}
&.mini &-jump-prev, &.mini &-jump-next {

6
style/components/select.less

@ -231,12 +231,16 @@
&-selected {
position: relative;
&:after {
.iconfont-size-under-12px(9px);
display: inline-block;
content: '\e613';
font-family: 'anticon';
font-weight: bold;
position: absolute;
top: 6px;
right: 16px;
right: 0;
background: tint(@primary-color, 90%);
padding-right: 16px;
color: @primary-color;
}
}

1
style/mixins/compatibility.less

@ -19,6 +19,7 @@
// for iconfont font size
// fix chrome 12px bug, support ie
.iconfont-size-under-12px(@iconfontSize) {
display: inline-block;
@font-scale: unit(@iconfontSize/@font-size-base);
font-size: @font-scale;
font-size: ~"@{iconfontSize} \9"; // ie8-9

Loading…
Cancel
Save