Skip to content

Commit

Permalink
添加城市选择器
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed May 23, 2019
1 parent a0a4c71 commit a4a3dd2
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/components/Form/Full.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,14 @@ export default {
{
type: "divider"
},
{
type: "city",
name: "city",
label: "城市选择器"
},
{
type: "divider"
},
{
type: "matrix",
name: "matrix",
Expand Down
31 changes: 31 additions & 0 deletions scss/components/form/_city.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.#{$ns}CityPicker {
.#{$ns}Select + .#{$ns}Select {
margin-left: $gap-xs;
}

&-input {
outline: none;
vertical-align: middle;
margin-left: $gap-xs;
border: $Form-input-borderWidth solid $Form-input-borderColor;
border-radius: $Form-input-borderRadius;
// height: $Form-input-height;
line-height: $Form-input-lineHeight;
padding: $Form-input-paddingY $Form-input-paddingX;
font-size: $Form-input-fontSize;

&::placeholder {
color: $Form-input-placeholderColor;
user-select: none;
}

&:focus {
border-color: $Form-input-onFocused-borderColor;
box-shadow: $Form-input-boxShadow;

@if $Form-input-onFocused-bg !=$Form-input-bg {
background-color: $Form-input-onFocused-bg;
}
}
}
}
2 changes: 2 additions & 0 deletions scss/components/form/_select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@

&-arrow {
margin-right: $gap-xs;
margin-left: $gap-xs;
width: px2rem(20px);
text-align: center;
display: flex;
Expand Down Expand Up @@ -152,6 +153,7 @@
&-menu {
max-height: px2rem(300px);
overflow: auto;
user-select: none;
}

&-option {
Expand Down
1 change: 1 addition & 0 deletions scss/themes/cxd.scss
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ $TagControl-sugTip-color: $primary;
@import "../components/form/text";
@import "../components/form/textarea";
@import "../components/form/checks";
@import "../components/form/city";
@import "../components/form/switch";
@import "../components/form/number";
@import "../components/form/select";
Expand Down
1 change: 1 addition & 0 deletions scss/themes/default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ $Form-input-borderColor: #cfdadd;
@import "../components/form/text";
@import "../components/form/textarea";
@import "../components/form/checks";
@import "../components/form/city";
@import "../components/form/switch";
@import "../components/form/number";
@import "../components/form/select";
Expand Down

0 comments on commit a4a3dd2

Please sign in to comment.