props.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', {
  3. value: true
  4. });
  5. exports.textareaProps = exports.inputProps = exports.commonProps = void 0;
  6. exports.commonProps = {
  7. value: {
  8. type: String,
  9. observer: function (value) {
  10. if (value !== this.value) {
  11. this.setData({
  12. innerValue: value
  13. });
  14. this.value = value;
  15. }
  16. }
  17. },
  18. placeholder: String,
  19. placeholderStyle: String,
  20. placeholderClass: String,
  21. disabled: Boolean,
  22. maxlength: {
  23. type: Number,
  24. value: -1
  25. },
  26. cursorSpacing: {
  27. type: Number,
  28. value: 50
  29. },
  30. autoFocus: Boolean,
  31. focus: Boolean,
  32. cursor: {
  33. type: Number,
  34. value: -1
  35. },
  36. selectionStart: {
  37. type: Number,
  38. value: -1
  39. },
  40. selectionEnd: {
  41. type: Number,
  42. value: -1
  43. },
  44. adjustPosition: {
  45. type: Boolean,
  46. value: true
  47. },
  48. holdKeyboard: Boolean
  49. };
  50. exports.inputProps = {
  51. type: {
  52. type: String,
  53. value: 'text'
  54. },
  55. password: Boolean,
  56. confirmType: String,
  57. confirmHold: Boolean
  58. };
  59. exports.textareaProps = {
  60. autoHeight: Boolean,
  61. fixed: Boolean,
  62. showConfirmBar: {
  63. type: Boolean,
  64. value: true
  65. },
  66. disableDefaultPadding: {
  67. type: Boolean,
  68. value: true
  69. }
  70. };