Home > front end >  Layerui data table operation menu to monitor doesn't trigger
Layerui data table operation menu to monitor doesn't trigger

Time:03-04

<body>




</script>
<script SRC="https://bbs.csdn.net/topics/~/Content/js/jquery.min.js" & gt; </script>
<script SRC="https://bbs.csdn.net/topics/~/Content/layui/layui.js" & gt; </script>
<script SRC="https://bbs.csdn.net/topics/~/Content/layui/layui.all.js" & gt; </script>
Layui. Use (' table ', function () {
Var table=layui. Table;
Table. The render ({
Id: "the dataTable,"
Elem: '# dataTable,
Url: 'XX'
Method: "post",
Limit: 10,
Cols: [[
{type: 'radio'},
{field: "Id", the title: "Id", sort: true},
{field: "FactoryName", the title: 'name'},
{fixed: 'right' and the title: 'operation, the align:' center ', the toolbar: '# barDemo}
]],
Page: true
}); //data table can display the
Table. On (' tool (dataTable) ', function (obj) {//monitoring tool does not trigger, point operation have no reaction, please instruct how be to return a responsibility?
Var checkStatus=table. CheckStatus (obj. Config. Id);
Var layEvent=obj. Event;
If (layEvent==='detail') {
Var data=https://bbs.csdn.net/topics/checkStatus.data;
Layer. Alert (JSON. Stringify (data));
} else if (layEvent==='edit') {
Layer. MSG (' edit operation);
}
});
});
</script>
 


CodePudding user response:

Layui. Use ([' table ', 'element', 'layer'], function () {}) to try to console without error?

CodePudding user response:

reference 1st floor a_b_a_b_a_b_a_b response:
layui. Use [[' table ', 'element', 'layer'], function () {}) to try to console without error?


The console without error, tried what you said or not to trigger,

CodePudding user response:

May be conflict, look have to monitor the same place

CodePudding user response:

Can you tell me the solution? I also encountered this problem
  • Related