图像裁切器模式无法多次使用

时间:2018-12-17 09:39:18

标签: php laravel

我要裁剪多个图像时,

图像裁剪器不起作用。当我分别测试代码时,该函数有效,但是当我将其放入if else语句中时,用于裁剪图像的弹出窗口不会弹出。有人可以帮我吗?

 @if($location_type === 'CULTURE')
                        @if ($location->culture_file)
                            <p>Actual:</p>
                            <div class="text-center">
                                <img class="img-fluid" src="{{asset($location->culture_file)}}"/>
                            </div>
                        @endif
                        <button type="button" onclick="$('#modalInputFile-lesson-{{$location->type}}').modal('show');" class="btn btn-outline-primary">Update new image</button>
                            @component('components.edit_image', [
                                           'url' => "/admin/location/$location->id/culture_image",
                                           'isSquare' => false,
                                           'random' => "lesson-$location->type"
                                          ]
                                      )
                            @endcomponent
                      @elseif($location_type === 'HISTORY')
                        @if ($location->history_file)
                            <p>Actual:</p>
                            <div class="text-center">
                                 <img class="img-fluid" src="{{asset($location->history_file)}}"/>
                            </div>
                        @endif
                        <button type="button" onclick="$('#modalInputFile-lesson-{{$location->type}}').modal('show');" class="btn btn-outline-primary">Update new image</button>
                            @component('components.edit_image', [
                                           'url' => "/admin/location/$location->id/history_image",
                                           'isSquare' => false,
                                           'random' => "lesson-$location->type"
                                          ]
                                      )
                            @endcomponent
                        @endif

0 个答案:

没有答案