name = $name; $this->field = $field; $this->has = $has; $this->attr['placeholder'] = null; } /** * @param $num * @return $this */ public function limit($num): self { $this->limit = $num; return $this; } /** * @return array */ public function render(): array { $data = [ 'nodeName' => 'a-textarea', 'vModel:modelValue' => $this->getModelField(), 'placeholder' => $this->attr['placeholder'] ?: '请输入' . $this->name, 'allowClear' => true, 'showWordLimit' => true ]; if ($this->limit) { $data['maxLength'] = $this->limit; } if($this->replace != ''){ $data['vStringReplace'] = $this->replace; } return $data; } }