componentsConfig.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  1. export const basicComponents = [
  2. {
  3. type: 'input',
  4. icon: 'icon-input',
  5. options: {
  6. width: '100%',
  7. defaultValue: '',
  8. required: false,
  9. requiredMessage: '',
  10. dataType: '',
  11. dataTypeCheck: false,
  12. dataTypeMessage: '',
  13. pattern: '',
  14. patternCheck: false,
  15. patternMessage: '',
  16. placeholder: '',
  17. customClass: '',
  18. disabled: false,
  19. labelWidth: 100,
  20. isLabelWidth: false,
  21. hidden: false,
  22. dataBind: true,
  23. showPassword: false,
  24. }
  25. },
  26. {
  27. type: 'textarea',
  28. icon: 'icon-diy-com-textarea',
  29. options: {
  30. width: '100%',
  31. defaultValue: '',
  32. required: false,
  33. requiredMessage: '',
  34. disabled: false,
  35. pattern: '',
  36. patternMessage: '',
  37. placeholder: '',
  38. customClass: '',
  39. labelWidth: 100,
  40. isLabelWidth: false,
  41. hidden: false,
  42. dataBind: true
  43. }
  44. },
  45. {
  46. type: 'number',
  47. icon: 'icon-number',
  48. options: {
  49. width: '',
  50. required: false,
  51. requiredMessage: '',
  52. defaultValue: 0,
  53. min: 0,
  54. max: 9,
  55. step: 1,
  56. disabled: false,
  57. controlsPosition: '',
  58. customClass: '',
  59. labelWidth: 100,
  60. isLabelWidth: false,
  61. hidden: false,
  62. dataBind: true
  63. }
  64. },
  65. {
  66. type: 'radio',
  67. icon: 'icon-radio-active',
  68. options: {
  69. inline: false,
  70. defaultValue: '',
  71. showLabel: true,
  72. options: [
  73. {
  74. value: 'Option 1',
  75. label: 'Option 1'
  76. },
  77. {
  78. value: 'Option 2',
  79. label: 'Option 2'
  80. },
  81. {
  82. value: 'Option 3',
  83. label: 'Option 3'
  84. }
  85. ],
  86. required: false,
  87. requiredMessage: '',
  88. width: '',
  89. remote: false,
  90. remoteType: 'option',
  91. remoteOption: '',
  92. remoteOptions: [],
  93. props: {
  94. value: 'value',
  95. label: 'label'
  96. },
  97. remoteFunc: '',
  98. customClass: '',
  99. labelWidth: 100,
  100. isLabelWidth: false,
  101. hidden: false,
  102. dataBind: true,
  103. disabled: false
  104. }
  105. },
  106. {
  107. type: 'checkbox',
  108. icon: 'icon-check-box',
  109. options: {
  110. inline: false,
  111. defaultValue: [],
  112. showLabel: true,
  113. options: [
  114. {
  115. value: 'Option 1'
  116. },
  117. {
  118. value: 'Option 2'
  119. },
  120. {
  121. value: 'Option 3'
  122. }
  123. ],
  124. required: false,
  125. requiredMessage: '',
  126. width: '',
  127. remote: false,
  128. remoteType: 'option',
  129. remoteOption: '',
  130. remoteOptions: [],
  131. props: {
  132. value: 'value',
  133. label: 'label'
  134. },
  135. remoteFunc: '',
  136. customClass: '',
  137. labelWidth: 100,
  138. isLabelWidth: false,
  139. hidden: false,
  140. dataBind: true,
  141. disabled: false
  142. }
  143. },
  144. {
  145. type: 'time',
  146. icon: 'icon-time',
  147. options: {
  148. defaultValue: '',
  149. readonly: false,
  150. disabled: false,
  151. editable: true,
  152. clearable: true,
  153. placeholder: '',
  154. startPlaceholder: '',
  155. endPlaceholder: '',
  156. isRange: false,
  157. arrowControl: true,
  158. format: 'HH:mm:ss',
  159. required: false,
  160. requiredMessage: '',
  161. width: '',
  162. customClass: '',
  163. labelWidth: 100,
  164. isLabelWidth: false,
  165. hidden: false,
  166. dataBind: true
  167. }
  168. },
  169. {
  170. type: 'date',
  171. icon: 'icon-date',
  172. options: {
  173. defaultValue: '',
  174. readonly: false,
  175. disabled: false,
  176. editable: true,
  177. clearable: true,
  178. placeholder: '',
  179. startPlaceholder: '',
  180. endPlaceholder: '',
  181. type: 'date',
  182. format: 'yyyy-MM-dd',
  183. timestamp: false,
  184. required: false,
  185. requiredMessage: '',
  186. width: '',
  187. customClass: '',
  188. labelWidth: 100,
  189. isLabelWidth: false,
  190. hidden: false,
  191. dataBind: true
  192. }
  193. },
  194. {
  195. type: 'rate',
  196. icon: 'icon-pingfen1',
  197. options: {
  198. defaultValue: null,
  199. max: 5,
  200. disabled: false,
  201. allowHalf: false,
  202. required: false,
  203. requiredMessage: '',
  204. customClass: '',
  205. labelWidth: 100,
  206. isLabelWidth: false,
  207. hidden: false,
  208. dataBind: true,
  209. showScore: false
  210. }
  211. },
  212. {
  213. type: 'color',
  214. icon: 'icon-color',
  215. options: {
  216. defaultValue: '',
  217. disabled: false,
  218. showAlpha: false,
  219. required: false,
  220. requiredMessage: '',
  221. customClass: '',
  222. labelWidth: 100,
  223. isLabelWidth: false,
  224. hidden: false,
  225. dataBind: true
  226. }
  227. },
  228. {
  229. type: 'select',
  230. icon: 'icon-select',
  231. options: {
  232. defaultValue: '',
  233. multiple: false,
  234. disabled: false,
  235. clearable: false,
  236. placeholder: '',
  237. required: false,
  238. requiredMessage: '',
  239. showLabel: true,
  240. width: '',
  241. options: [
  242. {
  243. value: 'Option 1'
  244. },
  245. {
  246. value: 'Option 2'
  247. },{
  248. value: 'Option 3'
  249. }
  250. ],
  251. remote: false,
  252. remoteType: 'option',
  253. remoteOption: '',
  254. filterable: false,
  255. remoteOptions: [],
  256. props: {
  257. value: 'value',
  258. label: 'label'
  259. },
  260. remoteFunc: '',
  261. customClass: '',
  262. labelWidth: 100,
  263. isLabelWidth: false,
  264. hidden: false,
  265. dataBind: true
  266. }
  267. },
  268. {
  269. type: 'switch',
  270. icon: 'icon-switch',
  271. options: {
  272. defaultValue: false,
  273. required: false,
  274. requiredMessage: '',
  275. disabled: false,
  276. customClass: '',
  277. labelWidth: 100,
  278. isLabelWidth: false,
  279. hidden: false,
  280. dataBind: true
  281. }
  282. },
  283. {
  284. type: 'slider',
  285. icon: 'icon-slider',
  286. options: {
  287. defaultValue: 0,
  288. disabled: false,
  289. required: false,
  290. requiredMessage: '',
  291. min: 0,
  292. max: 100,
  293. step: 1,
  294. showInput: false,
  295. range: false,
  296. width: '',
  297. customClass: '',
  298. labelWidth: 100,
  299. isLabelWidth: false,
  300. hidden: false,
  301. dataBind: true
  302. }
  303. },
  304. {
  305. type: 'text',
  306. icon: 'icon-wenzishezhi-',
  307. options: {
  308. defaultValue: 'This is a text',
  309. customClass: '',
  310. labelWidth: 100,
  311. isLabelWidth: false,
  312. hidden: false,
  313. dataBind: true
  314. }
  315. },
  316. {
  317. type: 'html',
  318. icon: 'icon-html',
  319. options: {
  320. defaultValue: '<b style="color: red;">\n\tThis is a HTML5\n</b>',
  321. labelWidth: 100,
  322. isLabelWidth: false,
  323. hidden: false,
  324. dataBind: true
  325. }
  326. }
  327. ]
  328. export const advanceComponents = [
  329. {
  330. type: 'blank',
  331. icon: 'icon-zidingyishuju',
  332. options: {
  333. defaultType: 'String',
  334. defaultValue:'',
  335. customClass: '',
  336. width: '',
  337. labelWidth: 100,
  338. isLabelWidth: false,
  339. hidden: false,
  340. dataBind: true
  341. }
  342. },
  343. {
  344. type: 'component',
  345. icon: 'icon-component',
  346. options: {
  347. customClass: '',
  348. labelWidth: 100,
  349. isLabelWidth: false,
  350. hidden: false,
  351. dataBind: true,
  352. template: '<p>自定义内容</p>',
  353. required: false,
  354. }
  355. },
  356. {
  357. type: 'fileupload',
  358. icon: 'icon-wenjianshangchuan',
  359. options: {
  360. defaultValue: [],
  361. width: '',
  362. tokenFunc: 'funcGetToken',
  363. token: '',
  364. domain: 'http://tcdn.form.xiaoyaoji.cn/',
  365. disabled: false,
  366. tip: '',
  367. action: 'http://tools-server.making.link/api/transfer',
  368. customClass: '',
  369. limit: 9,
  370. multiple: false,
  371. isQiniu: true,
  372. labelWidth: 100,
  373. isLabelWidth: false,
  374. hidden: false,
  375. dataBind: true,
  376. headers: [],
  377. required: false,
  378. }
  379. },
  380. {
  381. type: 'imgupload',
  382. icon: 'icon-tupian',
  383. options: {
  384. defaultValue: [],
  385. size: {
  386. width: 100,
  387. height: 100,
  388. },
  389. width: '',
  390. tokenFunc: 'funcGetToken',
  391. token: '',
  392. domain: 'http://tcdn.form.xiaoyaoji.cn/',
  393. disabled: false,
  394. readonly: false,
  395. limit: 8,
  396. multiple: false,
  397. isQiniu: true,
  398. isDelete: false,
  399. min: 0,
  400. isEdit: false,
  401. action: 'http://tools-server.making.link/api/transfer',
  402. customClass: '',
  403. labelWidth: 100,
  404. isLabelWidth: false,
  405. hidden: false,
  406. dataBind: true,
  407. headers: [],
  408. required: false,
  409. }
  410. },
  411. {
  412. type: 'editor',
  413. icon: 'icon-fuwenbenkuang',
  414. options: {
  415. defaultValue: '',
  416. width: '',
  417. customClass: '',
  418. labelWidth: 100,
  419. isLabelWidth: false,
  420. hidden: false,
  421. dataBind: true,
  422. customToolbar: [
  423. [ 'bold', 'italic', 'underline', 'strike',
  424. { 'color': [] },
  425. { 'background': [] },
  426. { 'align': [] },
  427. { 'list': 'ordered'},
  428. { 'list': 'bullet' },
  429. { 'indent': '-1'},
  430. { 'indent': '+1' }
  431. ],
  432. [{ 'font': [] },{ 'header': [1, 2, 3, 4, 5, 6, false] }],
  433. [{ 'script': 'sub'}, { 'script': 'super' }],
  434. ['link', 'image','blockquote', 'code-block'],
  435. [{ 'direction': 'rtl' }],
  436. ['clean']
  437. ],
  438. disabled: false,
  439. required: false,
  440. }
  441. },
  442. {
  443. type: 'cascader',
  444. icon: 'icon-jilianxuanze',
  445. options: {
  446. defaultValue: [],
  447. width: '',
  448. placeholder: '',
  449. disabled: false,
  450. clearable: false,
  451. remote: true,
  452. remoteType: 'option',
  453. remoteOption: '',
  454. remoteOptions: [],
  455. props: {
  456. value: 'value',
  457. label: 'label',
  458. children: 'children'
  459. },
  460. remoteFunc: '',
  461. customClass: '',
  462. labelWidth: 100,
  463. isLabelWidth: false,
  464. hidden: false,
  465. dataBind: true,
  466. required: false,
  467. }
  468. },
  469. {
  470. type: 'table',
  471. icon: 'icon-table',
  472. options: {
  473. defaultValue: [],
  474. customClass: '',
  475. labelWidth: 100,
  476. isLabelWidth: false,
  477. hidden: false,
  478. dataBind: true,
  479. disabled: false,
  480. required: false,
  481. },
  482. tableColumns: []
  483. }
  484. ]
  485. export const layoutComponents = [
  486. {
  487. type: 'grid',
  488. icon: 'icon-RectangleCopy',
  489. columns: [
  490. {
  491. span: 12,
  492. xs: 12,
  493. sm: 12,
  494. md: 12,
  495. lg: 12,
  496. xl: 12,
  497. list: []
  498. },
  499. {
  500. span: 12,
  501. xs: 12,
  502. sm: 12,
  503. md: 12,
  504. lg: 12,
  505. xl: 12,
  506. list: []
  507. }
  508. ],
  509. options: {
  510. gutter: 0,
  511. justify: 'start',
  512. align: 'top',
  513. customClass: '',
  514. hidden: false,
  515. flex: true,
  516. responsive: false
  517. }
  518. },
  519. {
  520. type: 'tabs',
  521. icon: 'icon-tabs',
  522. tabs: [
  523. {
  524. label: 'Tab 1',
  525. name: 'tab_1',
  526. list: []
  527. }
  528. ],
  529. options: {
  530. type: '',
  531. tabPosition: 'top',
  532. customClass: '',
  533. hidden: false,
  534. }
  535. },
  536. {
  537. type: 'divider',
  538. icon: 'icon-fengexian',
  539. options: {
  540. hidden: false,
  541. contentPosition: 'left'
  542. }
  543. }
  544. ]