page.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. define(['jquery', 'table', 'form'], function($, Table, Form) {
  2. Yzn.config.openArea = ['90%', '90%'];
  3. var Controller = {
  4. // index: function() {
  5. // Table.init = {
  6. // table_elem: '#currentTable',
  7. // table_render_id: 'currentTable',
  8. // edit_url: "cms.page/edit",
  9. // };
  10. // Table.render({
  11. // init: Table.init,
  12. // toolbar: ['refresh'],
  13. // url: 'cms.page/index',
  14. // lineStyle: 'height: 50px;',
  15. // cols: [
  16. // [
  17. // { field: 'id', width: 70, title: 'ID' },
  18. // { field: 'title', align: "left", title: '标题' },
  19. // { field: 'category.catname', width: 120, align: "left", title: '所属栏目' },
  20. // { field: 'catid', width: 80, align: "left", title: '栏目ID' },
  21. // { field: 'thumb', width: 100, title: '缩略图', search: false, templet: Table.formatter.image },
  22. // { field: 'hits', width: 80, title: '点击量' },
  23. // { field: 'publish_time', width: 180, title: '发布时间', search: 'range', templet: Table.formatter.datetime },
  24. // { field: 'create_time', width: 180, title: '创建时间', search: 'range' },
  25. // { field: 'update_time', width: 180, title: '更新时间', search: 'range' },
  26. // { width: 60, title: '操作', templet: Table.formatter.tool, operat: ['edit'] }
  27. // ]
  28. // ],
  29. // page: {}
  30. // });
  31. // Table.api.bindevent();
  32. // },
  33. edit: function() {
  34. Controller.api.bindevent();
  35. },
  36. api: {
  37. bindevent: function() {
  38. Form.api.bindevent($("form.layui-form"));
  39. }
  40. }
  41. };
  42. return Controller;
  43. });