name = $name; $this->field = $field; $this->has = $has; $this->attr['placeholder'] = null; } /** * 时间格式 * @param string $format * @return $this */ public function string(string $format): self { $this->string = $format; return $this; } /** * @return array */ public function render(): array { return [ 'nodeName' => 'a-time-picker', 'allowClear' => true, 'format' => $this->string, 'placeholder' => $this->attr['placeholder'] ?: '请选择' . $this->name, 'vModel:model-value' => $this->getModelField() ]; } }