diff --git a/packages/nutui-taro-demo/src/dentry/pages/checkbox/index.vue b/packages/nutui-taro-demo/src/dentry/pages/checkbox/index.vue index b5c5003510..8e5716e2b8 100644 --- a/packages/nutui-taro-demo/src/dentry/pages/checkbox/index.vue +++ b/packages/nutui-taro-demo/src/dentry/pages/checkbox/index.vue @@ -227,8 +227,6 @@ export default { flex-wrap: wrap; } .nut-checkbox { - display: flex; - margin-right: 20px; .nut-checkbox__label { margin-left: 10px; } diff --git a/src/packages/__VUE/checkbox/demo.vue b/src/packages/__VUE/checkbox/demo.vue index dd1f7c5f3a..c48e3d3500 100644 --- a/src/packages/__VUE/checkbox/demo.vue +++ b/src/packages/__VUE/checkbox/demo.vue @@ -301,9 +301,6 @@ export default defineComponent({ } .nut-checkbox { - display: flex; - margin-right: 20px; - .nut-checkbox__label { margin-left: 10px; } diff --git a/src/packages/__VUE/checkbox/doc.en-US.md b/src/packages/__VUE/checkbox/doc.en-US.md index 4a2604c42f..b0addbdb4a 100644 --- a/src/packages/__VUE/checkbox/doc.en-US.md +++ b/src/packages/__VUE/checkbox/doc.en-US.md @@ -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_ | diff --git a/src/packages/__VUE/checkbox/doc.md b/src/packages/__VUE/checkbox/doc.md index 8ea12fe373..a1937fbfaa 100644 --- a/src/packages/__VUE/checkbox/doc.md +++ b/src/packages/__VUE/checkbox/doc.md @@ -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_ | diff --git a/src/packages/__VUE/checkbox/doc.taro.md b/src/packages/__VUE/checkbox/doc.taro.md index 457e78c504..54612fe3d8 100644 --- a/src/packages/__VUE/checkbox/doc.taro.md +++ b/src/packages/__VUE/checkbox/doc.taro.md @@ -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_ | diff --git a/src/packages/__VUE/checkbox/index.scss b/src/packages/__VUE/checkbox/index.scss index 61c40be32f..7b42751fd7 100644 --- a/src/packages/__VUE/checkbox/index.scss +++ b/src/packages/__VUE/checkbox/index.scss @@ -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 { diff --git a/src/packages/__VUE/inputnumber/doc.en-US.md b/src/packages/__VUE/inputnumber/doc.en-US.md index 4e33f4c90c..ca3b02d705 100644 --- a/src/packages/__VUE/inputnumber/doc.en-US.md +++ b/src/packages/__VUE/inputnumber/doc.en-US.md @@ -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_ | diff --git a/src/packages/__VUE/inputnumber/doc.md b/src/packages/__VUE/inputnumber/doc.md index 64cb845427..f7e010a260 100644 --- a/src/packages/__VUE/inputnumber/doc.md +++ b/src/packages/__VUE/inputnumber/doc.md @@ -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_ | diff --git a/src/packages/__VUE/inputnumber/doc.taro.md b/src/packages/__VUE/inputnumber/doc.taro.md index e98359ce7c..ef67f15df9 100644 --- a/src/packages/__VUE/inputnumber/doc.taro.md +++ b/src/packages/__VUE/inputnumber/doc.taro.md @@ -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_ | diff --git a/src/packages/styles/variables-jdb.scss b/src/packages/styles/variables-jdb.scss index 75ea72b9ab..1aaa6cee69 100644 --- a/src/packages/styles/variables-jdb.scss +++ b/src/packages/styles/variables-jdb.scss @@ -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; @@ -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; diff --git a/src/packages/styles/variables-jddkh.scss b/src/packages/styles/variables-jddkh.scss index 199d10c585..7ffd104133 100644 --- a/src/packages/styles/variables-jddkh.scss +++ b/src/packages/styles/variables-jddkh.scss @@ -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; diff --git a/src/packages/styles/variables-jdt.scss b/src/packages/styles/variables-jdt.scss index 0044087076..d4b69d4253 100644 --- a/src/packages/styles/variables-jdt.scss +++ b/src/packages/styles/variables-jdt.scss @@ -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; @@ -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; diff --git a/src/packages/styles/variables.scss b/src/packages/styles/variables.scss index 33b53ea055..c8a67af4b6 100644 --- a/src/packages/styles/variables.scss +++ b/src/packages/styles/variables.scss @@ -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; @@ -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;