tabbar.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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. 'list' => true,
  53. 'edit' => true,
  54. ),
  55. 'name' => array
  56. (
  57. 'type' => 'varchar-60',
  58. 'name' => '菜单名',
  59. 'default' => '',
  60. 'desc' => '菜单名',
  61. 'match' => 'is_string',
  62. 'update' => 'text',
  63. 'list' => true,
  64. 'edit' => true,
  65. ),
  66. 'template_id' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '小程序模板',
  70. 'default' => '1',
  71. 'desc' => '小程序模板',
  72. 'match' => 'is_numeric',
  73. 'update' => 'select',
  74. 'option' => $template,
  75. 'list' => true,
  76. 'edit' => true,
  77. ),
  78. /*
  79. 'pagepath' => array
  80. (
  81. 'type' => 'varchar-60',
  82. 'name' => '菜单路径',
  83. 'default' => '',
  84. 'desc' => '菜单路径',
  85. 'match' => 'is_string',
  86. 'update' => 'text',
  87. 'list' => true,
  88. ),
  89. */
  90. 'page_id' => array
  91. (
  92. 'type' => 'int-11',
  93. 'name' => '菜单页面',
  94. 'default' => '1',
  95. 'desc' => '菜单页面',
  96. 'match' => 'is_numeric',
  97. 'update' => 'select',
  98. 'option' => $page,
  99. 'list' => true,
  100. 'edit' => true,
  101. ),
  102. 'iconpath' => array
  103. (
  104. 'type' => 'varchar-60',
  105. 'name' => '图标路径',
  106. 'default' => '',
  107. 'desc' => '图标路径',
  108. 'match' => 'is_string',
  109. 'update' => 'text',
  110. //'list' => true,
  111. ),
  112. 'selectediconpath' => array
  113. (
  114. 'type' => 'varchar-60',
  115. 'name' => '选中图标路径',
  116. 'default' => '',
  117. 'desc' => '选中图标路径',
  118. 'match' => 'is_string',
  119. 'update' => 'text',
  120. //'list' => true,
  121. ),
  122. 'reorder' => array
  123. (
  124. 'type' => 'int-11',
  125. 'name' => '排序(数值越大越靠前)',
  126. 'default' => '1',
  127. 'desc' => '请输入排序',
  128. 'match' => 'option',
  129. 'update' => 'text',
  130. 'search' => 'order',
  131. 'list_name' => '排序',
  132. 'list' => true,
  133. 'order' => 'desc',
  134. 'edit' => true,
  135. ),
  136. 'state' => array
  137. (
  138. 'type' => 'tinyint-1',
  139. 'name' => '状态',
  140. 'default' => '1',
  141. 'desc' => '请选择状态',
  142. 'match' => 'is_numeric',
  143. ),
  144. 'cdate' => array
  145. (
  146. 'type' => 'int-11',
  147. 'name' => '录入时间',
  148. 'match' => array('is_numeric', time()),
  149. 'desc' => '',
  150. # 只有insert时才生效
  151. 'insert' => true,
  152. ),
  153. ),
  154. 'top' => Dever::config('base', 'component')->top,
  155. 'manage' => array
  156. (
  157. ),
  158. );