props.js 1.4 KB

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