https://fly.layui.com/extend/selectN,selectM/
selectM.js selectN.js
The introduction of two file E: \ project \ public \ static \ admin \ layuiadmin under \ admin_xjzm
use ([ '' selectM ' , ' selectN '' ]) // infinite level SELECT var cateurl = ' {{route ( ' admin.item.category ' )}} ' ; . $ GET (cateurl, '' , function ( RES) { catIns = selectN ({ // container elements [required] elem: ' #categorys ' , Search: [ to false , to true ] // candidate data [required] , data: RES , Tips:' Please select ' , }); }); # Data Format [ ' ID ' => . 1 , ' name ' => ' a ' , ' Children ' => [ ' ID ' => 2 , ' name ' = > ' two ' , ] ]