From b9849677febbcf1f97db66762a3426d52b3a62b0 Mon Sep 17 00:00:00 2001 From: Jay Date: Wed, 1 Sep 2021 00:52:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=88=B6=E5=85=83=E7=B4=A0=E4=B8=BAflex?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=A4=9A=E4=B8=AAradio=E5=AD=90=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=B2=A1=E6=9C=89=E5=AF=B9=E9=BD=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close https://gitee.com/devui/vue-devui/issues/I47RX6 --- devui/radio/src/radio-group.scss | 3 +-- devui/radio/src/radio.scss | 4 ---- sites/components/radio/index.md | 28 +++++++++++++++++++++------- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/devui/radio/src/radio-group.scss b/devui/radio/src/radio-group.scss index 0b0cbaf0..7d86fdd7 100644 --- a/devui/radio/src/radio-group.scss +++ b/devui/radio/src/radio-group.scss @@ -16,8 +16,7 @@ line-height: 28px; &:not(:last-child) { - margin-right: 20px; - margin-bottom: 0; + padding-right: 20px; } } } diff --git a/devui/radio/src/radio.scss b/devui/radio/src/radio.scss index 0238ac77..dc53fdcf 100644 --- a/devui/radio/src/radio.scss +++ b/devui/radio/src/radio.scss @@ -11,10 +11,6 @@ cursor: pointer; color: $devui-text; - &:not(:last-child) { - margin-bottom: 20px; - } - &:hover { .devui-radio-label { color: $devui-primary-hover; diff --git a/sites/components/radio/index.md b/sites/components/radio/index.md index afbcf83e..3ab37dd6 100644 --- a/sites/components/radio/index.md +++ b/sites/components/radio/index.md @@ -12,7 +12,13 @@ ```vue @@ -48,6 +54,7 @@ export default defineComponent({ :key="item" :value="item" :beforeChange="beforeChange" + :style="{ marginBottom: '20px' }" @change="valChange" > The Radio value is: {{ item }} @@ -130,7 +137,14 @@ export default defineComponent({ ```vue @@ -263,11 +277,11 @@ export default defineComponent({ d-radio 参数 -| 参数 | 类型 | 默认 | 说明 | 跳转 Demo | -| :----------: | :------------------: | :---: | :------------------------------------------------------------------------------ | -------------------------------------- | -| name | `string` | -- | 可选,单选项名称 | [互相独立的单选项](#相互独立的单选项) | -| value | `string` | -- | 必选,单选项值 | [互相独立的单选项](#相互独立的单选项) | -| disabled | `boolean` | false | 可选,是否禁用该单选项 | [禁用](#禁用) | +| 参数 | 类型 | 默认 | 说明 | 跳转 Demo | +| :----------: | :------------------: | :---: | :------------------------------------------------------------------------------ | --------------------------------------- | +| name | `string` | -- | 可选,单选项名称 | [互相独立的单选项](#相互独立的单选项) | +| value | `string` | -- | 必选,单选项值 | [互相独立的单选项](#相互独立的单选项) | +| disabled | `boolean` | false | 可选,是否禁用该单选项 | [禁用](#禁用) | | beforeChange | `Function / Promise` | -- | 可选,radio 切换前的回调函数,返回 boolean 类型,返回 false 可以阻止 radio 切换 | [回调切换](#radio-根据条件终止切换操作) | d-radio 事件 -- Gitee