text-time.js 845 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // components/my-form/my-input.js
  2. Component({
  3. /**
  4. * 组件的初始数据
  5. */
  6. options: {
  7. addGlobalClass: true,
  8. },
  9. properties: {
  10. label: {
  11. type: String,
  12. value: '',
  13. },
  14. formid: {
  15. type: String,
  16. value: '',
  17. },
  18. forminfo: {
  19. type: Object,
  20. value: {}
  21. }
  22. },
  23. data: {
  24. input_text: '',
  25. },
  26. behaviors: ['wx://component-export'],
  27. //组件最终对外导出的数据
  28. export() {
  29. return {
  30. input_text: this.data.input_text,
  31. force: this.properties.forminfo.force,
  32. role: this.properties.forminfo.role }
  33. },
  34. /**
  35. * 组件的方法列表
  36. */
  37. ready: function () {
  38. console.log(this.properties.forminfo);
  39. },
  40. methods: {
  41. bindPickerChange: function (e) {
  42. this.setData({
  43. input_text: e.detail.value
  44. });
  45. }
  46. }
  47. })