8000 feature · laraveladmin-cn/laraveladmin@f4ca24d · GitHub
[go: up one dir, main page]

Skip to content

Commit f4ca24d

Browse files
author
张世平
committed
feature
1 parent f94d3e4 commit f4ca24d

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

app/Http/Controllers/Traits/ResourceController.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,15 @@ public function getList()
423423
if(isset($this->showIndexAttributes) && $this->showIndexAttributes){
424424
foreach ($data as $item){
425425
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+
}
427435
});
428436
}
429437
}

resources/js/components/qiniuUpload.vue

+10-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
<slot>
2020
<div class="value" v-show="value">
2121
<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>
2325
</div>
2426
<i class="fa fa-times pull-right remove" @click="remove"></i>
2527
</div>
@@ -88,7 +90,13 @@
8890
default: function () {
8991
return '';
9092
}
91-
}
93+
},
94+
fileName:{
95+
type:[String],
96+
default: function () {
97+
return '';
98+
}
99+
},
92100
93101
},
94102
data(){

0 commit comments

Comments
 (0)
0