- *
- * @param string $name
- * @param string $value
- * @param array $inputAttr
- * @param array $uploadAttr
- * @param array $chooseAttr
- * @param array $previewAttr
- * @return string
- */
- public function image($name = null, $value, $inputAttr = [], $uploadAttr = [], $chooseAttr = [], $previewAttr = [])
- {
- $default = [
- 'data-mimetype' => 'image/gif,image/jpeg,image/png,image/jpg,image/bmp'
- ];
- $uploadAttr = is_array($uploadAttr) ? array_merge($default, $uploadAttr) : $uploadAttr;
- $chooseAttr = is_array($chooseAttr) ? array_merge($default, $chooseAttr) : $chooseAttr;
- return $this->uploader($name, $value, $inputAttr, $uploadAttr, $chooseAttr, $previewAttr);
- }
|
|