早上好。我用數(shù)據(jù)表進(jìn)行了數(shù)據(jù)搜索和過(guò)濾,它起作用了……但是當(dāng)我移動(dòng)頁(yè)面并返回到該頁(yè)面時(shí),數(shù)據(jù)仍然卡?。ㄎ粗刂茫?。在視圖中我做了如下圖:在js文件中我是這樣寫(xiě)的brandmanage = $('#brandmanage').DataTable({ dom : 'rtpi', pageLength: {{ $limit ?? '10' }}, language : { paginate : { previous : '<i class="fa fa-angle-left"></i>', // or '←' next : '<i class="fa fa-angle-right"></i>', // or '→' }, }, processing : true, drawCallback : function( settings ) { $('#lengthInput option[value={{ $limit ?? '10' }}]').attr('selected','selected'); }, serverSide : true, stateSave : true, ajax : { url : "{{ route('lms.brand.getdata',['pfx'=>$pfx]) }}", dataType : "json", type : "POST", data : { _token: "{{csrf_token()}}" } }, columns : [ { data : "brand" }, { data : "corporate" }, { data : "num_of_company" }, { data : "primary" }, { data : "secondary" }, { data : "status" }, { data : "action", orderable : false, className : "text-center", }, ], }); $('#brandDataLength').on('change', function () { brandmanage.page.len( $(this).val() ).draw(); }); $('#searchBrand').on('keyup', function () { brandmanage.search( this.value ).draw(); });我該怎么做才能在移動(dòng)頁(yè)面后重置搜索結(jié)果?
重置搜索結(jié)果
LEATH
2023-03-03 09:55:55