fieldsConfig.js 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. export default [
  2. {
  3. title: '布局字段',
  4. list: [{
  5. type: 'group',
  6. label: '分组',
  7. icon: 'icon-group',
  8. display: true,
  9. arrow: false,
  10. collapse: true,
  11. children: {
  12. column: []
  13. }
  14. }, {
  15. type: 'dynamic',
  16. label: '子表单',
  17. icon: 'icon-table',
  18. span: 24,
  19. display: true,
  20. children: {
  21. align: 'center',
  22. headerAlign: 'center',
  23. index: false,
  24. addBtn: true,
  25. delBtn: true,
  26. column: []
  27. }
  28. }, {
  29. type: 'title',
  30. icon: 'icon-title',
  31. span: 24,
  32. display: true,
  33. styles: {
  34. fontSize: '18px',
  35. color: '#000'
  36. },
  37. label: '标题',
  38. labelWidth: '0px',
  39. value: '标题',
  40. }]
  41. },
  42. {
  43. title: '输入字段',
  44. list: [{
  45. type: 'input',
  46. label: '单行文本',
  47. icon: 'icon-input',
  48. span: 24,
  49. display: true
  50. }, {
  51. type: 'password',
  52. label: '密码',
  53. icon: 'icon-password',
  54. span: 24,
  55. display: true
  56. }, {
  57. type: 'textarea',
  58. label: '多行文本',
  59. icon: 'icon-textarea',
  60. span: 24,
  61. display: true
  62. }, {
  63. type: 'number',
  64. label: '计数器',
  65. icon: 'icon-number',
  66. controls: true,
  67. span: 24,
  68. display: true,
  69. }, {
  70. type: 'url',
  71. label: '超链接',
  72. icon: 'icon-url',
  73. span: 24,
  74. display: true
  75. }, {
  76. type: 'array',
  77. label: '数组',
  78. icon: 'icon-array',
  79. span: 24,
  80. display: true,
  81. }, {
  82. type: 'img',
  83. label: '图片',
  84. icon: 'icon-img',
  85. span: 24,
  86. display: true,
  87. }, {
  88. type: 'map',
  89. component: 'avue-input-map',
  90. label: '地图选择器',
  91. icon: 'icon-map',
  92. span: 24,
  93. display: true
  94. }]
  95. },
  96. {
  97. title: '选择字段',
  98. list: [{
  99. type: 'radio',
  100. label: '单选框组',
  101. icon: 'icon-radio',
  102. dicData: [
  103. { label: '选项一', value: '0' },
  104. { label: '选项二', value: '1' },
  105. { label: '选项三', value: '2' },
  106. ],
  107. span: 24,
  108. display: true,
  109. dicOption: 'static',
  110. props: {
  111. label: 'label',
  112. value: 'value'
  113. }
  114. }, {
  115. type: 'checkbox',
  116. label: '多选框组',
  117. icon: 'icon-checkbox',
  118. dicData: [
  119. { label: '选项一', value: '0' },
  120. { label: '选项二', value: '1' },
  121. { label: '选项三', value: '2' },
  122. ],
  123. span: 24,
  124. display: true,
  125. dicOption: 'static',
  126. props: {
  127. label: 'label',
  128. value: 'value'
  129. }
  130. }, {
  131. type: 'select',
  132. label: '下拉选择器',
  133. icon: 'icon-select',
  134. dicData: [
  135. { label: '选项一', value: '0' },
  136. { label: '选项二', value: '1' },
  137. { label: '选项三', value: '2' },
  138. ],
  139. // 用于做级联配置
  140. cascaderItem: [],
  141. span: 24,
  142. display: true,
  143. dicOption: 'static',
  144. props: {
  145. label: 'label',
  146. value: 'value',
  147. desc: 'desc'
  148. }
  149. }, {
  150. type: 'cascader',
  151. label: '级联选择器',
  152. icon: 'icon-link',
  153. span: 24,
  154. display: true,
  155. dicData: [
  156. {
  157. label: '选项一',
  158. value: 0,
  159. children: [{
  160. label: '选项1-1',
  161. value: 11,
  162. }, {
  163. label: '选项1-2',
  164. value: 12,
  165. }]
  166. },
  167. { label: '选项二', value: '1' },
  168. { label: '选项三', value: '2' },
  169. ],
  170. cascaderIndex: 1,
  171. // 用于做级联配置
  172. cascaderItem: [],
  173. showAllLevels: true,
  174. dicOption: 'static',
  175. separator: "/",
  176. props: {
  177. label: 'label',
  178. value: 'value',
  179. desc: 'desc'
  180. }
  181. }, {
  182. type: 'tree',
  183. label: '树形选择器',
  184. icon: 'icon-tree',
  185. span: 24,
  186. display: true,
  187. dicOption: 'static',
  188. dicData: [
  189. {
  190. label: '选项一',
  191. value: 0,
  192. children: [{
  193. label: '选项1-1',
  194. value: '11',
  195. }, {
  196. label: '选项1-2',
  197. value: '12',
  198. }]
  199. },
  200. { label: '选项二', value: '1' },
  201. { label: '选项三', value: '2' },
  202. ],
  203. parent: true,
  204. // 用于做级联配置
  205. cascaderItem: [],
  206. props: {
  207. label: 'label',
  208. value: 'value',
  209. desc: 'desc'
  210. }
  211. }, {
  212. type: 'table',
  213. label: '表格选择器',
  214. icon: 'icon-table',
  215. display: true,
  216. span: 24,
  217. children: {
  218. border: true,
  219. searchMenuSpan: 6,
  220. searchIcon: true,
  221. column: [],
  222. props: {
  223. url: '',
  224. method: 'get',
  225. rowKey: 'id',
  226. needPage: true,
  227. currentPageKey: 'current',
  228. pageSizeKey: 'size',
  229. totalKey: 'total',
  230. recordsKey: 'records',
  231. resKey: 'data.data',
  232. auto: true
  233. }
  234. },
  235. formatter: (row) => {
  236. return row.name
  237. },
  238. props: {
  239. label: 'name',
  240. value: 'id'
  241. },
  242. }]
  243. },
  244. {
  245. title: '上传字段',
  246. list: [{
  247. type: 'upload',
  248. label: '上传',
  249. icon: 'icon-upload',
  250. span: 24,
  251. display: true,
  252. showFileList: true,
  253. multiple: true,
  254. limit: 10,
  255. // props: {},
  256. propsHttp: {},
  257. headersConfig: [],
  258. dataConfig: []
  259. }],
  260. },
  261. {
  262. title: '日期时间字段',
  263. list: [{
  264. type: 'year',
  265. label: '年',
  266. icon: 'icon-year',
  267. span: 24,
  268. display: true,
  269. format: 'yyyy',
  270. valueFormat: 'yyyy'
  271. }, {
  272. type: 'month',
  273. label: '月',
  274. icon: 'icon-month',
  275. span: 24,
  276. display: true,
  277. format: 'MM',
  278. valueFormat: 'MM'
  279. }, {
  280. type: 'week',
  281. label: '周',
  282. icon: 'icon-week',
  283. span: 24,
  284. display: true,
  285. format: 'yyyy 第 WW 周',
  286. }, {
  287. type: 'date',
  288. label: '日期',
  289. icon: 'icon-date',
  290. span: 24,
  291. display: true,
  292. format: 'yyyy-MM-dd',
  293. valueFormat: 'yyyy-MM-dd'
  294. }, {
  295. type: 'time',
  296. label: '时间',
  297. icon: 'icon-time',
  298. span: 24,
  299. display: true,
  300. format: 'HH:mm:ss',
  301. valueFormat: 'HH:mm:ss'
  302. }, {
  303. type: 'datetime',
  304. label: '日期时间',
  305. icon: 'icon-datetime',
  306. span: 24,
  307. display: true,
  308. format: 'yyyy-MM-dd HH:mm:ss',
  309. valueFormat: 'yyyy-MM-dd HH:mm:ss'
  310. }, {
  311. type: 'daterange',
  312. label: '日期范围',
  313. icon: 'icon-date-range',
  314. span: 24,
  315. display: true,
  316. format: 'yyyy-MM-dd',
  317. valueFormat: 'yyyy-MM-dd'
  318. }, {
  319. type: 'timerange',
  320. label: '时间范围',
  321. icon: 'icon-time-range',
  322. span: 24,
  323. display: true,
  324. format: 'HH:mm:ss',
  325. valueFormat: 'HH:mm:ss'
  326. }, {
  327. type: 'datetimerange',
  328. label: '日期时间范围',
  329. icon: 'icon-datetime-range',
  330. span: 24,
  331. display: true,
  332. format: 'yyyy-MM-dd HH:mm:ss',
  333. valueFormat: 'yyyy-MM-dd HH:mm:ss'
  334. }],
  335. },
  336. {
  337. title: '插件字段(需单独引入依赖)',
  338. list: [{
  339. type: 'ueditor',
  340. component: 'avue-ueditor',
  341. label: '富文本',
  342. icon: 'icon-richtext',
  343. span: 24,
  344. display: true,
  345. options: {
  346. action: '',
  347. oss: '',
  348. props: {},
  349. ali: {},
  350. qiniu: {}
  351. },
  352. },],
  353. },
  354. {
  355. title: '其他字段',
  356. list: [{
  357. type: 'icon',
  358. label: '图标',
  359. component: 'avue-input-icon',
  360. icon: 'icon-icon',
  361. span: 24,
  362. display: true,
  363. params: {
  364. iconList: [{
  365. label: '基本图标',
  366. list: ['el-icon-info', 'el-icon-error', 'el-icon-error', 'el-icon-success', 'el-icon-warning', 'el-icon-question']
  367. }, {
  368. label: '方向图标',
  369. list: ['el-icon-info', 'el-icon-back', 'el-icon-arrow-left', 'el-icon-arrow-down', 'el-icon-arrow-right', 'el-icon-arrow-up']
  370. }, {
  371. label: '符号图标',
  372. list: ['el-icon-plus', 'el-icon-minus', 'el-icon-close', 'el-icon-check']
  373. }]
  374. }
  375. }, {
  376. type: 'switch',
  377. label: '开关',
  378. icon: 'icon-switch',
  379. span: 24,
  380. display: true,
  381. value: '0',
  382. dicData: [{ label: '', value: '0' }, { label: '', value: '1' }]
  383. }, {
  384. type: 'rate',
  385. label: '评价',
  386. icon: 'icon-star',
  387. span: 24,
  388. display: true,
  389. max: 5,
  390. value: 0,
  391. texts: ['极差', '失望', '一般', '满意', '惊喜'],
  392. colors: ['#99A9BF', '#F7BA2A', '#FF9900'],
  393. }, {
  394. type: 'slider',
  395. label: '滑块',
  396. icon: 'icon-slider',
  397. span: 24,
  398. display: true,
  399. min: 0,
  400. max: 10
  401. }, {
  402. type: 'color',
  403. label: '颜色选择器',
  404. icon: 'icon-color',
  405. span: 24,
  406. display: true
  407. }]
  408. }
  409. ]