ソースを参照

col 方法支持数字

xaboy 6 年 前
コミット
56b1f52fda
1 ファイル変更2 行追加1 行削除
  1. 2 1
      src/Rule/BaseRule.php

+ 2 - 1
src/Rule/BaseRule.php

@@ -169,11 +169,12 @@ trait BaseRule
     }
     }
 
 
     /**
     /**
-     * @param array|ColComponentInterface $col
+     * @param array|int|ColComponentInterface $col
      * @return $this
      * @return $this
      */
      */
     public function col($col)
     public function col($col)
     {
     {
+        if(is_integer($col)) $col = ['span'=>$col];
         $this->col = $col;
         $this->col = $col;
         return $this;
         return $this;
     }
     }