3
0

props.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import { defineMixin } from '../../libs/vue'
  2. import defProps from '../../libs/config/props.js'
  3. export const props = defineMixin({
  4. props: {
  5. // 内置图标名称,或图片路径,建议绝对路径
  6. icon: {
  7. type: String,
  8. default: () => defProps.empty.icon
  9. },
  10. // 提示文字
  11. text: {
  12. type: String,
  13. default: () => defProps.empty.text
  14. },
  15. // 文字颜色
  16. textColor: {
  17. type: String,
  18. default: () => defProps.empty.textColor
  19. },
  20. // 文字大小
  21. textSize: {
  22. type: [String, Number],
  23. default: () => defProps.empty.textSize
  24. },
  25. // 图标的颜色
  26. iconColor: {
  27. type: String,
  28. default: () => defProps.empty.iconColor
  29. },
  30. // 图标的大小
  31. iconSize: {
  32. type: [String, Number],
  33. default: () => defProps.empty.iconSize
  34. },
  35. // 选择预置的图标类型
  36. mode: {
  37. type: String,
  38. default: () => defProps.empty.mode
  39. },
  40. // 图标宽度,单位px
  41. width: {
  42. type: [String, Number],
  43. default: () => defProps.empty.width
  44. },
  45. // 图标高度,单位px
  46. height: {
  47. type: [String, Number],
  48. default: () => defProps.empty.height
  49. },
  50. // 是否显示组件
  51. show: {
  52. type: Boolean,
  53. default: () => defProps.empty.show
  54. },
  55. // 组件距离上一个元素之间的距离,默认px单位
  56. marginTop: {
  57. type: [String, Number],
  58. default: () => defProps.empty.marginTop
  59. }
  60. }
  61. })