2023年6月21日发(作者:)

layui动态加载表格数据1.引⼊css、js样式2.在body中创建table元素

中向指定元素刷数据(['element', 'table'], function () { var $ = , element = t, //Tab的切换功能,切换事件监听等,需要依赖element模块 table = ,

({ elem: "#followTable", url: '${ctx}/follow/followList', skin: 'line', page: false, cols: [[ {field: "id", title: "id", width: 50}, {field: "nickname", title: "会员昵称"}, {field: 'right', title: '操作', toolbar: '#barDemo'}, ]], done: function (res, curr, count) { table = ; } }) })4.后台封装数据,必须有code,其他的可以根据⾃⾝需要@RequestMapping("/followList") @ResponseBody public Map followList(){ List followList = llowByMemberId(f(2),null); Map result = new HashMap(); ("code", 0); ("data", y()); return result; }5.在表格后加⼊操作等按钮

2023年6月21日发(作者:)

layui动态加载表格数据1.引⼊css、js样式2.在body中创建table元素

中向指定元素刷数据(['element', 'table'], function () { var $ = , element = t, //Tab的切换功能,切换事件监听等,需要依赖element模块 table = ,

({ elem: "#followTable", url: '${ctx}/follow/followList', skin: 'line', page: false, cols: [[ {field: "id", title: "id", width: 50}, {field: "nickname", title: "会员昵称"}, {field: 'right', title: '操作', toolbar: '#barDemo'}, ]], done: function (res, curr, count) { table = ; } }) })4.后台封装数据,必须有code,其他的可以根据⾃⾝需要@RequestMapping("/followList") @ResponseBody public Map followList(){ List followList = llowByMemberId(f(2),null); Map result = new HashMap(); ("code", 0); ("data", y()); return result; }5.在表格后加⼊操作等按钮