37 lines
749 B
PHP
37 lines
749 B
PHP
<?php
|
|
|
|
namespace App\Livewire;
|
|
|
|
use Livewire\Component;
|
|
|
|
class InputNumberAntD extends Component
|
|
{
|
|
public $value = 0;
|
|
public $name;
|
|
public $label;
|
|
public $required = false;
|
|
public $min = null;
|
|
public $max = null;
|
|
public $step = 1;
|
|
|
|
public function mount($name, $label, $required = false, $min = null, $max = null, $step = 1)
|
|
{
|
|
$this->name = $name;
|
|
$this->label = $label;
|
|
$this->required = $required;
|
|
$this->min = $min;
|
|
$this->max = $max;
|
|
$this->step = $step;
|
|
}
|
|
|
|
public function updatedValue()
|
|
{
|
|
$this->dispatch('numberChanged', $this->value);
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.input-number-ant-d');
|
|
}
|
|
}
|