Browse Source

fix placeholder

pull/344/head
yiminghe 9 years ago
parent
commit
7b4bdc8482
  1. 4
      components/select/demo/search.md
  2. 10
      style/components/select.less

4
components/select/demo/search.md

@ -15,7 +15,9 @@ function handleChange(value) {
}
React.render(
<Select defaultValue="lucy" showSearch={true} style={{width:200}} onChange={handleChange}>
<Select defaultValue="lucy" showSearch={true} style={{width:200}}
searchPlaceholder="输入"
onChange={handleChange}>
<Option value="jack">jack</Option>
<Option value="lucy">lucy</Option>
<Option value="disabled" disabled>disabled</Option>

10
style/components/select.less

@ -1,4 +1,3 @@
@select-prefix-cls: ant-select;
@import "../mixins/iconfont";
@ -169,12 +168,12 @@
}
}
.@{select-prefix-cls}-search__field__wrap {
&-search__field__wrap {
display: inline-block;
position: relative;
}
.@{select-prefix-cls}-search__field__placeholder {
&-search__field__placeholder {
position: absolute;
top: 0;
left: 3px;
@ -184,6 +183,10 @@
&-search--inline {
float: left;
.@{select-prefix-cls}-search__field__wrap {
width: 100%;
}
.@{select-prefix-cls}-search__field {
border: none;
font-size: 100%;
@ -422,6 +425,7 @@
padding: 4px;
.@{select-prefix-cls}-search__field__placeholder {
left: 4px;
top: 5px;
}
.@{select-prefix-cls}-search__field__wrap {
width: 100%;

Loading…
Cancel
Save