Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wanjj_1210
ant-design
提交
7b64e31e
A
ant-design
项目概览
wanjj_1210
/
ant-design
与 Fork 源项目一致
从无法访问的项目Fork
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
ant-design
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7b64e31e
编写于
8月 08, 2015
作者:
Z
zhujun24
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
inputNumber size
上级
aa6722b0
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
85 addition
and
1 deletion
+85
-1
components/input-number/demo/disabled.md
components/input-number/demo/disabled.md
+1
-1
components/input-number/demo/size.md
components/input-number/demo/size.md
+29
-0
components/input-number/index.md
components/input-number/index.md
+1
-0
style/components/inputNumber.less
style/components/inputNumber.less
+54
-0
未找到文件。
components/input-number/demo/disabled.md
浏览文件 @
7b64e31e
# 不可用
-
order:
0
-
order:
2
点击按钮切换可用状态。
...
...
components/input-number/demo/size.md
0 → 100644
浏览文件 @
7b64e31e
# 三种大小
-
order: 1
三种大小的数字输入框,当 className 分别为
`ant-input-number-lg`
和
`ant-input-number-sm`
时,输入框高度为
`32px`
和
`22px`
,默认高度为
`28px`
---
````
jsx
var
InputNumber
=
antd
.
InputNumber
;
function
onChange
(
value
)
{
console
.
log
(
'
changed
'
,
value
);
}
React
.
render
(
<
div
>
<
InputNumber
className
=
"ant-input-number-lg"
min
=
{
1
}
max
=
{
100000
}
defaultValue
=
{
3
}
onChange
=
{
onChange
}
/>
<
InputNumber
min
=
{
1
}
max
=
{
100000
}
defaultValue
=
{
3
}
onChange
=
{
onChange
}
/>
<
InputNumber
className
=
"ant-input-number-sm"
min
=
{
1
}
max
=
{
100000
}
defaultValue
=
{
3
}
onChange
=
{
onChange
}
/>
</
div
>
,
document
.
getElementById
(
'
components-input-number-demo-size
'
));
````
````
css
.ant-input-number
{
margin-right
:
10px
;
}
````
\ No newline at end of file
components/input-number/index.md
浏览文件 @
7b64e31e
...
...
@@ -25,3 +25,4 @@
| defaultValue | 初始值 | Number | |
| onChange | 变化回调 | Function | |
| disabled | 禁用 | Boolean | false |
| className | 输入框大小 | String | 无 |
style/components/inputNumber.less
浏览文件 @
7b64e31e
...
...
@@ -75,6 +75,60 @@
.disabled();
}
}
&-lg{
padding: 0!important;
.ant-input-number-handler-wrap{
height: 32px;
}
.ant-input-number-input-wrap{
height: 32px;
}
.ant-input-number-handler{
height: 16px;
}
input{
height: 32px;
line-height: 32px;
font-size: 14px;
}
.ant-input-number-handler-up-inner{
top: 2px;
}
.ant-input-number-handler-down-inner{
top: 18px;
}
}
&-sm{
padding: 0!important;
.ant-input-number-handler-wrap{
height: 22px;
}
.ant-input-number-input-wrap{
height: 22px;
overflow: hidden;
position: relative;
}
.ant-input-number-handler{
height: 11px;
}
input{
height: 22px;
line-height: 22px;
position: absolute;
top: 0;
}
.ant-input-number-handler-up-inner{
top: -1px;
}
.ant-input-number-handler-down-inner{
top: 10px;
}
}
&-handler-wrap {
float: right;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录