You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.5 KiB

5 months ago
  1. import { defineMixin } from '../../libs/vue'
  2. import defProps from '../../libs/config/props.js'
  3. export const props = defineMixin({
  4. props: {
  5. // 当前form的需要验证字段的集合
  6. model: {
  7. type: Object,
  8. default: () => defProps.form.model
  9. },
  10. // 验证规则
  11. rules: {
  12. type: [Object, Function, Array],
  13. default: () => defProps.form.rules
  14. },
  15. // 有错误时的提示方式,message-提示信息,toast-进行toast提示
  16. // border-bottom-下边框呈现红色,none-无提示
  17. errorType: {
  18. type: String,
  19. default: () => defProps.form.errorType
  20. },
  21. // 是否显示表单域的下划线边框
  22. borderBottom: {
  23. type: Boolean,
  24. default: () => defProps.form.borderBottom
  25. },
  26. // label的位置,left-左边,top-上边
  27. labelPosition: {
  28. type: String,
  29. default: () => defProps.form.labelPosition
  30. },
  31. // label的宽度,单位px
  32. labelWidth: {
  33. type: [String, Number],
  34. default: () => defProps.form.labelWidth
  35. },
  36. // lable字体的对齐方式
  37. labelAlign: {
  38. type: String,
  39. default: () => defProps.form.labelAlign
  40. },
  41. // lable的样式,对象形式
  42. labelStyle: {
  43. type: Object,
  44. default: () => defProps.form.labelStyle
  45. }
  46. }
  47. })