引用layui.table
表格重载的时候,发现报错。The ID option was not found in the table instance,意思为:在表实例中未找到ID选项
原因是table.render()内没有正确写id
如
<table class="layui-hide" id="user" lay-filter="user"></table>
那么可能是table.render内的id错误
table.render({
id: 'user',
//...剩余省略
});
也可能是 表格重载的时候没有正确书写
table.reload('user',{
where: { //设定异步数据接口的额外参数,任意设
type: type
}
, page: {
curr: 1 //重新从第 1 页开始
}
})