Skip to content

Commit

Permalink
fix: checkbox、inputnumber 调整为内联元素 (#2581)
Browse files Browse the repository at this point in the history
  • Loading branch information
yi-boide authored Oct 12, 2023
1 parent 2dffa00 commit 326b893
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 12 deletions.
2 changes: 0 additions & 2 deletions packages/nutui-taro-demo/src/dentry/pages/checkbox/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ export default {
flex-wrap: wrap;
}
.nut-checkbox {
display: flex;
margin-right: 20px;
.nut-checkbox__label {
margin-left: 10px;
}
Expand Down
3 changes: 0 additions & 3 deletions src/packages/__VUE/checkbox/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,6 @@ export default defineComponent({
}
.nut-checkbox {
display: flex;
margin-right: 20px;
.nut-checkbox__label {
margin-left: 10px;
}
Expand Down
2 changes: 2 additions & 0 deletions src/packages/__VUE/checkbox/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,3 +480,5 @@ The component provides the following CSS variables, which can be used to customi
| --nut-checkbox-button-font-color-active | _var(--nut-primary-color)_ |
| --nut-checkbox-button-border-color-active | _var(--nut-primary-color)_ |
| --nut-checkbox-button-background-active | _var(--nut-primary-color)_ |
| --nut-checkbox-display | _inline-flex_ |
| --nut-checkbox-margin-right | _20px_ |
2 changes: 2 additions & 0 deletions src/packages/__VUE/checkbox/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,3 +480,5 @@ app.use(CheckboxGroup);
| --nut-checkbox-button-font-color-active | _var(--nut-primary-color)_ |
| --nut-checkbox-button-border-color-active | _var(--nut-primary-color)_ |
| --nut-checkbox-button-background-active | _var(--nut-primary-color)_ |
| --nut-checkbox-display | _inline-flex_ |
| --nut-checkbox-margin-right | _20px_ |
2 changes: 2 additions & 0 deletions src/packages/__VUE/checkbox/doc.taro.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,3 +440,5 @@ app.use(CheckboxGroup);
| --nut-checkbox-button-font-color-active | _var(--nut-primary-color)_ |
| --nut-checkbox-button-border-color-active | _var(--nut-primary-color)_ |
| --nut-checkbox-button-background-active | _var(--nut-primary-color)_ |
| --nut-checkbox-display | _inline-flex_ |
| --nut-checkbox-margin-right | _20px_ |
3 changes: 2 additions & 1 deletion src/packages/__VUE/checkbox/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
}
}
.nut-checkbox {
display: flex;
display: $checkbox-display;
align-items: center;
margin-right: $checkbox-margin-right;
&--reverse {
flex-direction: row-reverse;
.nut-checkbox__label {
Expand Down
2 changes: 1 addition & 1 deletion src/packages/__VUE/inputnumber/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,4 @@ The component provides the following CSS variables, which can be used to customi
| --nut-inputnumber-height | _auto_ |
| --nut-inputnumber-line-height | _normal_ |
| --nut-inputnumber-border-box | _content-box_ |
| --nut-inputnumber-display | _flex_ |
| --nut-inputnumber-display | _inline-flex_ |
2 changes: 1 addition & 1 deletion src/packages/__VUE/inputnumber/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,4 @@ app.use(InputNumber);
| --nut-inputnumber-height | _auto_ |
| --nut-inputnumber-line-height | _normal_ |
| --nut-inputnumber-border-box | _content-box_ |
| --nut-inputnumber-display | _flex_ |
| --nut-inputnumber-display | _inline-flex_ |
2 changes: 1 addition & 1 deletion src/packages/__VUE/inputnumber/doc.taro.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,4 +291,4 @@ app.use(InputNumber);
| --nut-inputnumber-height | _auto_ |
| --nut-inputnumber-line-height | _normal_ |
| --nut-inputnumber-border-box | _content-box_ |
| --nut-inputnumber-display | _flex_ |
| --nut-inputnumber-display | _inline-flex_ |
4 changes: 3 additions & 1 deletion src/packages/styles/variables-jdb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ $inputnumber-border-radius: 0 !default;
$inputnumber-height: auto !default;
$inputnumber-line-height: normal !default;
$inputnumber-border-box: content-box !default;
$inputnumber-display: flex !default;
$inputnumber-display: inline-flex !default;

// actionsheet
$actionsheet-light-color: #f6f6f6 !default;
Expand Down Expand Up @@ -520,6 +520,8 @@ $checkbox-button-background: var(--nut-checkbox-button-background, #f6f7f9) !def
$checkbox-button-font-color-active: var(--nut-checkbox-button-font-color-active, $primary-color) !default;
$checkbox-button-border-color-active: var(--nut-checkbox-button-border-color-active, $primary-color) !default;
$checkbox-button-background-active: var(--nut-checkbox-button-background-active, $primary-color) !default;
$checkbox-display: var(--nut-checkbox-display, inline-flex) !default;
$checkbox-margin-right: var(--nut-checkbox-margin-right, 20px) !default;

//radio
$radio-label-font-color: #1d1e1e !default;
Expand Down
2 changes: 2 additions & 0 deletions src/packages/styles/variables-jddkh.scss
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ $checkbox-button-background: var(--nut-checkbox-button-background, #f6f7f9) !def
$checkbox-button-font-color-active: var(--nut-checkbox-button-font-color-active, $primary-color) !default;
$checkbox-button-border-color-active: var(--nut-checkbox-button-border-color-active, $primary-color) !default;
$checkbox-button-background-active: var(--nut-checkbox-button-background-active, $primary-color) !default;
$checkbox-display: var(--nut-checkbox-display, inline-flex) !default;
$checkbox-margin-right: var(--nut-checkbox-margin-right, 20px) !default;

//radio
$radio-label-font-color: #1d1e1e !default;
Expand Down
4 changes: 3 additions & 1 deletion src/packages/styles/variables-jdt.scss
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ $inputnumber-border-radius: var(--nut-inputnumber-border-radius, 0) !default;
$inputnumber-height: var(--nut-inputnumber-height, auto) !default;
$inputnumber-line-height: var(--nut-inputnumber-line-height, normal) !default;
$inputnumber-border-box: var(--nut-inputnumber-border-box, content-box) !default;
$inputnumber-display: var(--nut-inputnumber-display, flex) !default;
$inputnumber-display: var(--nut-inputnumber-display, inline-flex) !default;

// actionsheet
$actionsheet-light-color: var(--nut-actionsheet-light-color, #f6f6f6) !default;
Expand Down Expand Up @@ -451,6 +451,8 @@ $checkbox-button-background: var(--nut-checkbox-button-background, #f6f7f9) !def
$checkbox-button-font-color-active: var(--nut-checkbox-button-font-color-active, $primary-color) !default;
$checkbox-button-border-color-active: var(--nut-checkbox-button-border-color-active, $primary-color) !default;
$checkbox-button-background-active: var(--nut-checkbox-button-background-active, $primary-color) !default;
$checkbox-display: var(--nut-checkbox-display, inline-flex) !default;
$checkbox-margin-right: var(--nut-checkbox-margin-right, 20px) !default;

//radio
$radio-label-font-color: var(--nut-radio-label-font-color, rgba(0, 0, 0, 0.85)) !default;
Expand Down
4 changes: 3 additions & 1 deletion src/packages/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ $inputnumber-border-radius: var(--nut-inputnumber-border-radius, 0) !default;
$inputnumber-height: var(--nut-inputnumber-height, auto) !default;
$inputnumber-line-height: var(--nut-inputnumber-line-height, normal) !default;
$inputnumber-border-box: var(--nut-inputnumber-border-box, content-box) !default;
$inputnumber-display: var(--nut-inputnumber-display, flex) !default;
$inputnumber-display: var(--nut-inputnumber-display, inline-flex) !default;

// actionsheet
$actionsheet-light-color: var(--nut-actionsheet-light-color, #f6f6f6) !default;
Expand Down Expand Up @@ -489,6 +489,8 @@ $checkbox-button-background: var(--nut-checkbox-button-background, #f6f7f9) !def
$checkbox-button-font-color-active: var(--nut-checkbox-button-font-color-active, $primary-color) !default;
$checkbox-button-border-color-active: var(--nut-checkbox-button-border-color-active, $primary-color) !default;
$checkbox-button-background-active: var(--nut-checkbox-button-background-active, $primary-color) !default;
$checkbox-display: var(--nut-checkbox-display, inline-flex) !default;
$checkbox-margin-right: var(--nut-checkbox-margin-right, 20px) !default;

//radio
$radio-label-font-color: var(--nut-radio-label-font-color, #1d1e1e) !default;
Expand Down

0 comments on commit 326b893

Please sign in to comment.