layui table.on打印的obj里面的data为空

weixin_46000137 weixin_46000137 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<table class="layui-hide" id="shopLsit" lay-filter="test"></table>
<script type="text/html" id="barDemo">
<button class="layui-btn layui-btn-xs" lay-event="del">删除</button>
</script>
上面的是html里面的
table.render({
elem: '#shopLsit'
,cols: [[
// {type:'checkbox', fixed: 'left',unresize:true}

// ,{field: 'yishou', title: '卖出总和',unresize:true, width:'100'}
// ,{field: 'time', title: '创建时间',unresize:true, width:'300'}
,{fixed: 'right', title: '操作',align:'center', toolbar: '#barDemo',unresize:true, width:'250'}
]]
,data: basedto.list.list
//,skin: 'line' //表格风格
// ,even: true
,page: true //是否显示分页
这个是表格的数据
table.on('tool(test)', function(obj){
// var data =obj.data;
console.log(obj);
})
这个是监听,就是不知道为什么打印出来的obj里面的data就是为空,求大神指导
...全文

相关推荐

评论 7
收藏 已收藏
分享
返回顶部
weixin_46000137
HTML5 43,737 成员 5,570 内容