tabbar.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <?php
  2. /**
  3. * tester
  4. */
  5. $template = function()
  6. {
  7. $array = array();
  8. $info = Dever::load('component/template-state');
  9. if($info)
  10. {
  11. $array += $info;
  12. }
  13. return $array;
  14. };
  15. $page = function()
  16. {
  17. $array = array();
  18. $info = Dever::load('component/page-state');
  19. if($info)
  20. {
  21. $array += $info;
  22. }
  23. return $array;
  24. };
  25. return array
  26. (
  27. # 表名
  28. 'name' => 'tabbar',
  29. # 显示给用户看的名称
  30. 'lang' => '底部菜单',
  31. 'order' => 93,
  32. # 数据结构
  33. 'struct' => array
  34. (
  35. 'id' => array
  36. (
  37. 'type' => 'int-11',
  38. 'name' => 'ID',
  39. 'default' => '',
  40. 'desc' => '',
  41. 'match' => 'is_numeric',
  42. 'search' => 'order',
  43. 'list' => true,
  44. ),
  45. 'project_id' => array
  46. (
  47. 'type' => 'int-11',
  48. 'name' => '项目',
  49. 'default' => '',
  50. 'desc' => '请输入项目',
  51. 'match' => 'is_numeric',
  52. ),
  53. 'name' => array
  54. (
  55. 'type' => 'varchar-60',
  56. 'name' => '菜单名',
  57. 'default' => '',
  58. 'desc' => '菜单名',
  59. 'match' => 'is_string',
  60. 'update' => 'text',
  61. 'list' => true,
  62. 'edit' => true,
  63. ),
  64. 'template_id' => array
  65. (
  66. 'type' => 'int-11',
  67. 'name' => '小程序模板',
  68. 'default' => '1',
  69. 'desc' => '小程序模板',
  70. 'match' => 'is_numeric',
  71. 'update' => 'select',
  72. 'option' => $template,
  73. 'list' => true,
  74. 'edit' => true,
  75. ),
  76. /*
  77. 'pagepath' => array
  78. (
  79. 'type' => 'varchar-60',
  80. 'name' => '菜单路径',
  81. 'default' => '',
  82. 'desc' => '菜单路径',
  83. 'match' => 'is_string',
  84. 'update' => 'text',
  85. 'list' => true,
  86. ),
  87. */
  88. 'page_id' => array
  89. (
  90. 'type' => 'int-11',
  91. 'name' => '菜单页面',
  92. 'default' => '1',
  93. 'desc' => '菜单页面',
  94. 'match' => 'is_numeric',
  95. 'update' => 'select',
  96. 'option' => $page,
  97. 'list' => true,
  98. 'edit' => true,
  99. ),
  100. 'iconpath' => array
  101. (
  102. 'type' => 'varchar-60',
  103. 'name' => '图标路径',
  104. 'default' => '',
  105. 'desc' => '图标路径',
  106. 'match' => 'is_string',
  107. 'update' => 'text',
  108. //'list' => true,
  109. ),
  110. 'selectediconpath' => array
  111. (
  112. 'type' => 'varchar-60',
  113. 'name' => '选中图标路径',
  114. 'default' => '',
  115. 'desc' => '选中图标路径',
  116. 'match' => 'is_string',
  117. 'update' => 'text',
  118. //'list' => true,
  119. ),
  120. 'reorder' => array
  121. (
  122. 'type' => 'int-11',
  123. 'name' => '排序(数值越大越靠前)',
  124. 'default' => '1',
  125. 'desc' => '请输入排序',
  126. 'match' => 'option',
  127. 'update' => 'text',
  128. 'search' => 'order',
  129. 'list_name' => '排序',
  130. 'list' => true,
  131. 'order' => 'desc',
  132. 'edit' => true,
  133. ),
  134. 'state' => array
  135. (
  136. 'type' => 'tinyint-1',
  137. 'name' => '状态',
  138. 'default' => '1',
  139. 'desc' => '请选择状态',
  140. 'match' => 'is_numeric',
  141. ),
  142. 'cdate' => array
  143. (
  144. 'type' => 'int-11',
  145. 'name' => '录入时间',
  146. 'match' => array('is_numeric', time()),
  147. 'desc' => '',
  148. # 只有insert时才生效
  149. 'insert' => true,
  150. ),
  151. ),
  152. 'top' => Dever::config('base')->top,
  153. 'manage' => array
  154. (
  155. ),
  156. );