jqhph / dcat-admin

🔥 基于 Laravel 的后台系统构建工具 (Laravel Admin),使用很少的代码快速构建一个功能完善的高颜值后台系统,内置丰富的后台常用组件,开箱即用,让开发者告别冗杂的HTML代码
http://www.dcatadmin.com
MIT License
3.87k stars 697 forks source link

数据表单的json字段一对多显示错误 #166

Open OneZale1995 opened 4 years ago

OneZale1995 commented 4 years ago

Description:

当我编辑时,json字段的一对多,只显示了最后一组数据

Steps To Reproduce:

如图,我的数据库里有8个数据 image 但是在编辑页面,只有最后一组数据 image 代码如下 image 模型层 image

jqhph commented 4 years ago

form闭包里面dd($form->model()->toArray());打印下数据看看,另外customFormat也可以转化数据格式

OneZale1995 commented 4 years ago

form闭包里面dd($form->model()->toArray());打印下数据看看,另外customFormat也可以转化数据格式

我的数据就是在form的闭包里打印的 image 然后使用customFormat也是一样的结果 image

image

jqhph commented 4 years ago

嗯我后面优化一下hasMany表单存json的功能吧,你先用table表单存json

OneZale1995 commented 4 years ago

嗯我后面优化一下hasMany表单存json的功能吧,你先用table表单存json

试了下,table是正常的

image 你这个官方文档要改一下,我就是看到这个不支持文件上传才使用hasMany的

jqhph commented 4 years ago

好的,忘记改了不好意思