排序和搜索的 JS 不起作用,控制台提示好像是与 vue 有关。

Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as

 错误好像是这句,有点像是少个div的原因。这个div是回发哪呢?
 @section('scriptsAfterJs') 有这么一段,没找到这个模板哪呢。

Laravel

排序和搜索的 JS 不起作用,控制台提示好像是与 vue 有关。

《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
讨论数量: 4
leo

说明少了一个 </div>,自己认真检查

5年前 评论

这个div往哪里加呢。

5年前 评论

@msmax 你贴下源码啊

5年前 评论

目测应该是少了个 endsection

@section('content')
...
...
...
@section('scriptsAlertJs')
    <script>
      var filters = {!! json_encode($filters) !!};
      $(function () {
          $('.search-form input[name=search]').val(filters.search);
          $('.search-form input[name=order]').val(filters.order);
           // 触发表单自动提交
          $('.search-form select[name=order]').on('change', function () {
              $('.search-form').submit();
          })
      })
    </script>
  @endsection
// 这个 endsection 为 section('content') 结尾
@endsection
3年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!