'float', 'min' => 'float', 'step' => 'float', 'disabled' => 'boolean', 'size' => 'string', 'placeholder' => 'string', 'readonly' => 'boolean', 'editable' => 'boolean', 'precision' => 'int', ]; /** * */ protected function init() { $this->placeholder($this->getPlaceHolder()); } protected function getPlaceHolder($pre = '请输入') { return parent::getPlaceHolder($pre); } protected function getValidateHandler() { return Validate::num(Validate::TRIGGER_BLUR); } /** * @return array */ public function build() { return [ 'type' => $this->name, 'field' => $this->field, 'title' => $this->title, 'value' => $this->value === '' ? '' : (float)$this->value, 'props' => (object)$this->props, 'validate' => $this->validate, 'col'=>$this->col ]; } }