v1.3.2更新日志

发布时间 2020/05/12

功能优化部分

1.优化表单多列布局功能,优化表单间距,使整体更加协调

  1. $form->row(function (Form\Row $row) {
  2. $form->width(4)->text('username')->required();
  3. $form->width(3)->text('title');
  4. ...
  5. });
  6. $form->row(function (Form\Row $row) {
  7. ...
  8. });
  9. ...

效果 v1.3.2更新日志 - 图1

2.增加数据详情Show多列布局功能

  1. $show->row(function (Show\Row $show) {
  2. $show->width(3)->id;
  3. $show->width(3)->name;
  4. $show->width(5)->email;
  5. });
  6. $show->row(function (Show\Row $show) {
  7. $show->width(5)->email_verified_at;
  8. $show->created_at;
  9. $show->updated_at;
  10. });
  11. $show->row(function (Show\Row $show) {
  12. $show->width(3)->field('profile.first_name');
  13. $show->field('profile.last_name');
  14. $show->width(3)->field('profile.postcode');
  15. });

效果 v1.3.2更新日志 - 图2

3.增加HasMany一对多表单对文件上传表单的支持

  1. $form->hasMany('paintings', function (Form\NestedForm $form) {
  2. $form->text('title');
  3. $form->file('attachment');
  4. $form->image('image');
  5. });

4.增加一对一表单对文件上传表单的支持

  1. $form->image('profile.avatar');

5.Content和Color增加Macroable支持 在你的app\Admin\bootstrap.php中加入以下代码

  1. Content::macro('getView', function () {
  2. return $this->view;
  3. });

使用

  1. $view = $content->getView();

6.登录页面错误信息显示文件布局优化

BUG修复部分

  • 修复selectResource表单弹窗内部无法使用快捷搜索功能问题
  • 修复HasMany无法把字段保存为空问题
  • 修复Form::currency字段保存字段值异常问题 #98
  • 修复select表单loads编辑页面选中子表单选项问题 #99
  • 修复Form编辑页面builder闭包内无法获取到表单值问题