From 4eadcd56265770a927c0de4339b62a785605eacc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E9=9B=86?= Date: Fri, 18 Aug 2017 11:44:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dradio=E5=92=8Ccheckbox?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/common.php | 4 ++-- public/assets/less/backend.less | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/application/admin/common.php b/application/admin/common.php index 705cba8ef..ccd9c49a6 100644 --- a/application/admin/common.php +++ b/application/admin/common.php @@ -36,7 +36,7 @@ function build_radios($name, $list = [], $selected = null) { $html[] = sprintf(Form::label("{$name}-{$k}", "%s {$v}"), Form::radio($name, $k, in_array($k, $selected), ['id' => "{$name}-{$k}"])); } - return implode(' ', $html); + return '
' . implode(' ', $html) . '
'; } /** @@ -55,7 +55,7 @@ function build_checkboxs($name, $list = [], $selected = null) { $html[] = sprintf(Form::label("{$name}-{$k}", "%s {$v}"), Form::checkbox($name, $k, in_array($k, $selected), ['id' => "{$name}-{$k}"])); } - return implode(' ', $html); + return '
' . implode(' ', $html) . '
'; } /** diff --git a/public/assets/less/backend.less b/public/assets/less/backend.less index fdf0f585c..73b3d5043 100644 --- a/public/assets/less/backend.less +++ b/public/assets/less/backend.less @@ -731,4 +731,14 @@ table.table-template{ /*平板样式*/ @media (max-width: @screen-tablet) { +} + +/*修复radio和checkbox样式对齐*/ +.radio, .checkbox { + > label { + margin-right: 10px; + > input { + margin: 2px 0 0; + } + } } \ No newline at end of file -- Gitee