| xqd
@@ -6,6 +6,7 @@ use App\Models\UserInfoModel;
|
|
|
use Dcat\Admin\Contracts\LazyRenderable;
|
|
|
use Dcat\Admin\Traits\LazyWidget;
|
|
|
use Dcat\Admin\Widgets\Form;
|
|
|
+use Dcat\Admin\Form as toForm;
|
|
|
use PHPUnit\Util\Exception;
|
|
|
|
|
|
class UsersInfoForm extends Form implements LazyRenderable
|
| xqd
@@ -37,7 +38,7 @@ class UsersInfoForm extends Form implements LazyRenderable
|
|
|
|
|
|
$this->text('user_id',"用户ID")->readOnly();
|
|
|
$this->text('nickname', '昵称')->required();
|
|
|
- $this->image('avatar', '头像')->disk('oss')->saveFullUrl()->uniqueName()->removable(false);
|
|
|
+ $this->image('avatar', '头像')->disk('oss')->saveFullUrl()->uniqueName()->removable(false)->autoUpload();
|
|
|
$this->text('weixin', '微信号');
|
|
|
$this->text('birthday', '生日');
|
|
|
$this->text('height', '身高');
|
| xqd
@@ -52,7 +53,7 @@ class UsersInfoForm extends Form implements LazyRenderable
|
|
|
$this->text('hobby', '兴趣爱好')->help("多个字段用,隔开,例如:唱歌,跳舞");
|
|
|
$this->text('drink', '喝酒');
|
|
|
$this->text('smoke', '抽烟');
|
|
|
- $this->array('photo', function (Form $form) {
|
|
|
+ $this->array('photo', function (toForm $form) {
|
|
|
$form->image('url','图片')->saveFullUrl()->uniqueName()->removable(false)->autoUpload();;
|
|
|
$form->radio('state','阅后即焚')->options([0=>"否",1=>"是"])->default(0);
|
|
|
})->saveAsJson()->label('相册');
|