min = $min; return $this; } /** * 设置计数器允许的最大值 * @param int|float $max * @return $this */ public function max($max) { $this->max = $max; return $this; } /** * 计数器步长 * @param int|float $step * @return $this */ public function step($step) { $this->step = $step; return $this; } /** * 是否只能输入 step 的倍数 * @param bool $stepStrictly * @return $this */ public function stepStrictly(bool $stepStrictly = true) { $this->stepStrictly = $stepStrictly; return $this; } /** * 数值精度 * @param int $precision * @return $this */ public function precision(int $precision) { $this->precision = $precision; return $this; } /** * 计数器尺寸 * large, small * @param string $size * @return $this */ public function size(string $size) { $this->size = $size; return $this; } /** * 是否禁用计数器 * @param bool $disabled * @return $this */ public function disabled(bool $disabled = true) { $this->disabled = $disabled; return $this; } /** * 是否使用控制按钮 * @param bool $controls * @return $this */ public function controls(bool $controls = true) { $this->controls = $controls; return $this; } /** * 控制按钮位置 * @param string $controlsPosition * @return $this */ public function controlsPosition(string $controlsPosition) { $this->controlsPosition = $controlsPosition; return $this; } /** * 原生属性 * @param string $name * @return $this */ public function name(string $name) { $this->name = $name; return $this; } /** * 输入框关联的label文字 * @param string $label * @return $this */ public function label(string $label) { $this->label = $label; return $this; } /** * 输入框默认 placeholder * @param string $placeholder * @return $this */ public function placeholder(string $placeholder) { $this->placeholder = $placeholder; return $this; } }