控制台应用,yzncms本身基于tp5.1框架,里面的队列用不了,bug,坑
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

recyclebin.stub 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. {extend name="index_layout"/}
  2. {block name="main"}
  3. <div class="layui-card">
  4. <div class="layui-card-header">{%tableComment%}</div>
  5. <div class="layui-card-body">
  6. <div class="layui-form">
  7. <table class="layui-hide" id="currentTable" lay-filter="currentTable"
  8. data-auth-restore="{:$auth->check('{%controllerUrl%}/restore')}"
  9. data-auth-destroy="{:$auth->check('{%controllerUrl%}/destroy')}"
  10. ></table>
  11. </div>
  12. </div>
  13. </div>
  14. {/block}
  15. {block name="script"}
  16. <script type="text/javascript">
  17. layui.use('yznTable', function() {
  18. var table = layui.yznTable;
  19. var init = {
  20. table_elem: '#currentTable',
  21. table_render_id: 'currentTable',
  22. restore_url: '{:url("{%controllerUrl%}/restore")}',
  23. destroy_url: '{:url("{%controllerUrl%}/destroy")}',
  24. modify_url: "{:url('{%controllerUrl%}/multi')}",
  25. };
  26. table.render({
  27. init: init,
  28. toolbar: ['refresh', 'restore', 'destroy'],
  29. url: '{:url("{%controllerUrl%}/recyclebin")}',
  30. cols: [
  31. [
  32. { type: 'checkbox', fixed: 'left' },
  33. { field: 'id', width: 70, title: 'ID' },{%recyclebinTitleJs%}
  34. { field: '{%deleteTimeField%}', width: 160, title: '删除时间', search: 'range', templet: yznTable.formatter.datetime},
  35. { fixed: 'right', width: 140, title: '操作', templet: yznTable.formatter.tool,operat: ['restore','destroy']}
  36. ]
  37. ],
  38. page: {}
  39. });
  40. yznTable.bindevent();
  41. });
  42. </script>
  43. {/block}