作者 西集
提交者 Karson

!15 修复radio和checkbox样式对齐

Merge pull request !15 from 西集/master
@@ -36,7 +36,7 @@ function build_radios($name, $list = [], $selected = null) @@ -36,7 +36,7 @@ function build_radios($name, $list = [], $selected = null)
36 { 36 {
37 $html[] = sprintf(Form::label("{$name}-{$k}", "%s {$v}"), Form::radio($name, $k, in_array($k, $selected), ['id' => "{$name}-{$k}"])); 37 $html[] = sprintf(Form::label("{$name}-{$k}", "%s {$v}"), Form::radio($name, $k, in_array($k, $selected), ['id' => "{$name}-{$k}"]));
38 } 38 }
39 - return implode(' ', $html); 39 + return '<div class="radio">' . implode(' ', $html) . '</div>';
40 } 40 }
41 41
42 /** 42 /**
@@ -55,7 +55,7 @@ function build_checkboxs($name, $list = [], $selected = null) @@ -55,7 +55,7 @@ function build_checkboxs($name, $list = [], $selected = null)
55 { 55 {
56 $html[] = sprintf(Form::label("{$name}-{$k}", "%s {$v}"), Form::checkbox($name, $k, in_array($k, $selected), ['id' => "{$name}-{$k}"])); 56 $html[] = sprintf(Form::label("{$name}-{$k}", "%s {$v}"), Form::checkbox($name, $k, in_array($k, $selected), ['id' => "{$name}-{$k}"]));
57 } 57 }
58 - return implode(' ', $html); 58 + return '<div class="checkbox">' . implode(' ', $html) . '</div>';
59 } 59 }
60 60
61 /** 61 /**
@@ -731,4 +731,14 @@ table.table-template{ @@ -731,4 +731,14 @@ table.table-template{
731 /*平板样式*/ 731 /*平板样式*/
732 @media (max-width: @screen-tablet) { 732 @media (max-width: @screen-tablet) {
733 733
  734 +}
  735 +
  736 +/*修复radio和checkbox样式对齐*/
  737 +.radio, .checkbox {
  738 + > label {
  739 + margin-right: 10px;
  740 + > input {
  741 + margin: 2px 0 0;
  742 + }
  743 + }
734 } 744 }