props.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import defProps from '../../libs/config/props.js';
  2. export default {
  3. props: {
  4. // input的label提示语
  5. label: {
  6. type: String,
  7. default: () => defProps.formItem.label
  8. },
  9. // 绑定的值
  10. prop: {
  11. type: String,
  12. default: () => defProps.formItem.prop
  13. },
  14. // 绑定的规则
  15. rule: {
  16. type: String,
  17. default: () => defProps.formItem.rule
  18. },
  19. // 是否显示表单域的下划线边框
  20. borderBottom: {
  21. type: [String, Boolean],
  22. default: () => defProps.formItem.borderBottom
  23. },
  24. // label的位置,left-左边,top-上边
  25. labelPosition: {
  26. type: String,
  27. default: () => defProps.formItem.labelPosition
  28. },
  29. // label的宽度,单位px
  30. labelWidth: {
  31. type: [String, Number],
  32. default: () => defProps.formItem.labelWidth
  33. },
  34. // 右侧图标
  35. rightIcon: {
  36. type: String,
  37. default: () => defProps.formItem.rightIcon
  38. },
  39. // 左侧图标
  40. leftIcon: {
  41. type: String,
  42. default: () => defProps.formItem.leftIcon
  43. },
  44. // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
  45. required: {
  46. type: Boolean,
  47. default: () => defProps.formItem.required
  48. },
  49. leftIconStyle: {
  50. type: [String, Object],
  51. default: () => defProps.formItem.leftIconStyle,
  52. }
  53. }
  54. }