form.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. (function () {
  2. var page = {
  3. isScroll: true,
  4. init: function ($page) {
  5. $page.find('#select1').lrpicker({
  6. placeholder: '请选择(必填)',
  7. data: cityData
  8. });
  9. $page.find('#select2').lrpicker({
  10. placeholder: '请选择(必填)',
  11. data: cityData,
  12. level: 2
  13. });
  14. $page.find('#select3').lrpicker({
  15. placeholder: '请选择(必填)',
  16. data: cityData,
  17. level: 3
  18. });
  19. $page.find('#switch1').lrswitch();
  20. $page.find('#date1').lrdate();
  21. $page.find('#date2').lrdate({
  22. type: 'date'
  23. });
  24. $page.find('#date3').lrdate({
  25. type: 'time'
  26. });
  27. $page.find('#date4').lrdate({
  28. type: 'month'
  29. });
  30. $page.find('#checkbox1').lrcheckbox({
  31. data: [{
  32. text: '第一项',
  33. value: '1'
  34. }, {
  35. text: '第二项',
  36. value: '2'
  37. }, {
  38. text: '第三项',
  39. value: '3'
  40. }, {
  41. text: '第四项',
  42. value: '4'
  43. }, {
  44. text: '第五项',
  45. value: '5'
  46. }, {
  47. text: '第六项',
  48. value: '6'
  49. }, {
  50. text: '第五项',
  51. value: '7'
  52. }, {
  53. text: '第五项',
  54. value: '8'
  55. }, {
  56. text: '第五项',
  57. value: '9'
  58. }, {
  59. text: '第五项',
  60. value: '10'
  61. }, {
  62. text: '第五项',
  63. value: '11'
  64. }, {
  65. text: '第五项',
  66. value: '12'
  67. }, {
  68. text: '第五项',
  69. value: '13'
  70. }, {
  71. text: '第五项',
  72. value: '14'
  73. }, {
  74. text: '第五项',
  75. value: '15'
  76. }, {
  77. text: '第五项',
  78. value: '16'
  79. }, {
  80. text: '第五项',
  81. value: '17'
  82. }]
  83. });
  84. }
  85. };
  86. return page;
  87. })();