form.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. var runtime = require('../../../utils/vue/props/runtime.js');
  4. var size = require('../../../constants/size.js');
  5. var shared = require('@vue/shared');
  6. var types = require('../../../utils/types.js');
  7. const formMetaProps = runtime.buildProps({
  8. size: {
  9. type: String,
  10. values: size.componentSizes
  11. },
  12. disabled: Boolean
  13. });
  14. const formProps = runtime.buildProps({
  15. ...formMetaProps,
  16. model: Object,
  17. rules: {
  18. type: runtime.definePropType(Object)
  19. },
  20. labelPosition: {
  21. type: String,
  22. values: ["left", "right", "top"],
  23. default: "right"
  24. },
  25. requireAsteriskPosition: {
  26. type: String,
  27. values: ["left", "right"],
  28. default: "left"
  29. },
  30. labelWidth: {
  31. type: [String, Number],
  32. default: ""
  33. },
  34. labelSuffix: {
  35. type: String,
  36. default: ""
  37. },
  38. inline: Boolean,
  39. inlineMessage: Boolean,
  40. statusIcon: Boolean,
  41. showMessage: {
  42. type: Boolean,
  43. default: true
  44. },
  45. validateOnRuleChange: {
  46. type: Boolean,
  47. default: true
  48. },
  49. hideRequiredAsterisk: Boolean,
  50. scrollToError: Boolean,
  51. scrollIntoViewOptions: {
  52. type: [Object, Boolean]
  53. }
  54. });
  55. const formEmits = {
  56. validate: (prop, isValid, message) => (shared.isArray(prop) || shared.isString(prop)) && types.isBoolean(isValid) && shared.isString(message)
  57. };
  58. exports.formEmits = formEmits;
  59. exports.formMetaProps = formMetaProps;
  60. exports.formProps = formProps;
  61. //# sourceMappingURL=form.js.map