fieldsConfig.js 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  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. }
  148. }, {
  149. type: 'cascader',
  150. label: '级联选择器',
  151. icon: 'icon-link',
  152. span: 24,
  153. display: true,
  154. dicData: [
  155. {
  156. label: '选项一',
  157. value: 0,
  158. children: [{
  159. label: '选项1-1',
  160. value: 11,
  161. }, {
  162. label: '选项1-2',
  163. value: 12,
  164. }]
  165. },
  166. { label: '选项二', value: '1' },
  167. { label: '选项三', value: '2' },
  168. ],
  169. cascaderIndex: 1,
  170. // 用于做级联配置
  171. cascaderItem: [],
  172. showAllLevels: true,
  173. dicOption: 'static',
  174. separator: "/",
  175. props: {
  176. label: 'label',
  177. value: 'value'
  178. }
  179. }, {
  180. type: 'tree',
  181. label: '树形选择器',
  182. icon: 'icon-tree',
  183. span: 24,
  184. display: true,
  185. dicOption: 'static',
  186. dicData: [
  187. {
  188. label: '选项一',
  189. value: 0,
  190. children: [{
  191. label: '选项1-1',
  192. value: '11',
  193. }, {
  194. label: '选项1-2',
  195. value: '12',
  196. }]
  197. },
  198. { label: '选项二', value: '1' },
  199. { label: '选项三', value: '2' },
  200. ],
  201. parent: true,
  202. // 用于做级联配置
  203. cascaderItem: [],
  204. props: {
  205. label: 'label',
  206. value: 'value'
  207. }
  208. }]
  209. },
  210. {
  211. title: '上传字段',
  212. list: [{
  213. type: 'upload',
  214. label: '上传',
  215. icon: 'icon-upload',
  216. span: 24,
  217. display: true,
  218. showFileList: true,
  219. multiple: true,
  220. limit: 10,
  221. // props: {},
  222. propsHttp: {},
  223. canvasOption: {},
  224. headersConfig: [],
  225. dataConfig: []
  226. }],
  227. },
  228. {
  229. title: '日期时间字段',
  230. list: [{
  231. type: 'year',
  232. label: '年',
  233. icon: 'icon-year',
  234. span: 24,
  235. display: true,
  236. format: 'yyyy',
  237. valueFormat: 'yyyy'
  238. }, {
  239. type: 'month',
  240. label: '月',
  241. icon: 'icon-month',
  242. span: 24,
  243. display: true,
  244. format: 'MM',
  245. valueFormat: 'MM'
  246. }, {
  247. type: 'week',
  248. label: '周',
  249. icon: 'icon-week',
  250. span: 24,
  251. display: true,
  252. format: 'yyyy 第 WW 周',
  253. }, {
  254. type: 'date',
  255. label: '日期',
  256. icon: 'icon-date',
  257. span: 24,
  258. display: true,
  259. format: 'yyyy-MM-dd',
  260. valueFormat: 'yyyy-MM-dd'
  261. }, {
  262. type: 'time',
  263. label: '时间',
  264. icon: 'icon-time',
  265. span: 24,
  266. display: true,
  267. format: 'HH:mm:ss',
  268. valueFormat: 'HH:mm:ss'
  269. }, {
  270. type: 'datetime',
  271. label: '日期时间',
  272. icon: 'icon-datetime',
  273. span: 24,
  274. display: true,
  275. format: 'yyyy-MM-dd HH:mm:ss',
  276. valueFormat: 'yyyy-MM-dd HH:mm:ss'
  277. }, {
  278. type: 'daterange',
  279. label: '日期范围',
  280. icon: 'icon-date-range',
  281. span: 24,
  282. display: true,
  283. format: 'yyyy-MM-dd',
  284. valueFormat: 'yyyy-MM-dd'
  285. }, {
  286. type: 'timerange',
  287. label: '时间范围',
  288. icon: 'icon-time-range',
  289. span: 24,
  290. display: true,
  291. format: 'HH:mm:ss',
  292. valueFormat: 'HH:mm:ss'
  293. }, {
  294. type: 'datetimerange',
  295. label: '日期时间范围',
  296. icon: 'icon-datetime-range',
  297. span: 24,
  298. display: true,
  299. format: 'yyyy-MM-dd HH:mm:ss',
  300. valueFormat: 'yyyy-MM-dd HH:mm:ss'
  301. }],
  302. },
  303. {
  304. title: '插件字段(需单独引入依赖)',
  305. list: [{
  306. type: 'ueditor',
  307. component: 'avue-ueditor',
  308. label: '富文本',
  309. icon: 'icon-richtext',
  310. span: 24,
  311. display: true,
  312. options: {
  313. action: '',
  314. oss: '',
  315. props: {},
  316. ali: {},
  317. qiniu: {}
  318. },
  319. },],
  320. },
  321. {
  322. title: '其他字段',
  323. list: [{
  324. type: 'icon',
  325. label: '图标',
  326. component: 'avue-input-icon',
  327. icon: 'icon-icon',
  328. span: 24,
  329. display: true,
  330. params: {
  331. iconList: [{
  332. label: '基本图标',
  333. list: ['el-icon-info', 'el-icon-error', 'el-icon-error', 'el-icon-success', 'el-icon-warning', 'el-icon-question']
  334. }, {
  335. label: '方向图标',
  336. list: ['el-icon-info', 'el-icon-back', 'el-icon-arrow-left', 'el-icon-arrow-down', 'el-icon-arrow-right', 'el-icon-arrow-up']
  337. }, {
  338. label: '符号图标',
  339. list: ['el-icon-plus', 'el-icon-minus', 'el-icon-close', 'el-icon-check']
  340. }]
  341. }
  342. }, {
  343. type: 'switch',
  344. label: '开关',
  345. icon: 'icon-switch',
  346. span: 24,
  347. display: true,
  348. value: '0',
  349. dicData: [{ label: '', value: '0' }, { label: '', value: '1' }]
  350. }, {
  351. type: 'rate',
  352. label: '评价',
  353. icon: 'icon-star',
  354. span: 24,
  355. display: true,
  356. max: 5,
  357. value: 0,
  358. texts: ['极差', '失望', '一般', '满意', '惊喜'],
  359. colors: ['#99A9BF', '#F7BA2A', '#FF9900'],
  360. }, {
  361. type: 'slider',
  362. label: '滑块',
  363. icon: 'icon-slider',
  364. span: 24,
  365. display: true,
  366. min: 0,
  367. max: 10
  368. }, {
  369. type: 'color',
  370. label: '颜色选择器',
  371. icon: 'icon-color',
  372. span: 24,
  373. display: true
  374. }]
  375. }
  376. ]