File tree 2 files changed +19
-3
lines changed
app/Http/Controllers/Traits
2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -423,7 +423,15 @@ public function getList()
423
423
if (isset ($ this ->showIndexAttributes ) && $ this ->showIndexAttributes ){
424
424
foreach ($ data as $ item ){
425
425
collect ($ this ->showIndexAttributes )->each (function ($ key )use ($ item ){
426
- Arr::get ($ item ,$ key );
426
+ if (Str::contains ($ key ,'.$index. ' )){
427
+ $ keys = explode ('.$index. ' ,$ key );
428
+ $ items = Arr::get ($ item ,$ keys [0 ]);
429
+ foreach ($ items as $ obj ){
430
+ Arr::get ($ obj ,$ keys [1 ]);
431
+ }
432
+ }else {
433
+ Arr::get ($ item ,$ key );
434
+ }
427
435
});
428
436
}
429
437
}
Original file line number Diff line number Diff line change 19
19
<slot >
20
20
<div class =" value" v-show =" value" >
21
21
<div class =" show-value" >
22
- <a target =" _blank" :href =" value" :title =" value" >{{value}}</a >
22
+ <a target =" _blank" :href =" value" :title =" value" >
23
+ {{fileName || value}}
24
+ </a >
23
25
</div >
24
26
<i class =" fa fa-times pull-right remove" @click =" remove" ></i >
25
27
</div >
88
90
default : function () {
89
91
return ' ' ;
90
92
}
91
- }
93
+ },
94
+ fileName: {
95
+ type: [String ],
96
+ default : function () {
97
+ return ' ' ;
98
+ }
99
+ },
92
100
93
101
},
94
102
data (){
You can’t perform that action at this time.
0 commit comments