Skip to content

Commit

Permalink
Merge pull request #2 from wilbur-yu/master
Browse files Browse the repository at this point in the history
使 InputNumber 组件的 min(), max(), step() 支持设置浮点类型值
  • Loading branch information
lphkxd committed Dec 22, 2020
2 parents 72f6366 + 8159d37 commit 150bb6a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Components/Form/InputNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class InputNumber extends Component
protected $max = 999999999;

/**
* @var int
* @var int|float
*/
protected $step = 1;
protected $stepStrictly = false;
Expand Down Expand Up @@ -64,32 +64,32 @@ static public function make($value = 0)

/**
* 设置计数器允许的最小值
* @param int $min
* @param int|float $min
* @return $this
*/
public function min(int $min)
public function min($min)
{
$this->min = $min;
return $this;
}

/**
* 设置计数器允许的最大值
* @param int $max
* @param int|float $max
* @return $this
*/
public function max(int $max)
public function max($max)
{
$this->max = $max;
return $this;
}

/**
* 计数器步长
* @param int $step
* @param int|float $step
* @return $this
*/
public function step(int $step)
public function step($step)
{
$this->step = $step;
return $this;
Expand Down

0 comments on commit 150bb6a

Please sign in to comment.