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.

51 lines
1.5 KiB

2 months ago
  1. import { defineMixin } from '../../libs/vue'
  2. import defProps from '../../libs/config/props.js'
  3. export const props = defineMixin({
  4. props: {
  5. // 到顶部的距离
  6. top: {
  7. type: [String, Number],
  8. default: () => defProps.notify.top
  9. },
  10. // 是否展示组件
  11. // show: {
  12. // type: Boolean,
  13. // default: () => defProps.notify.show
  14. // },
  15. // type主题,primary,success,warning,error
  16. type: {
  17. type: String,
  18. default: () => defProps.notify.type
  19. },
  20. // 字体颜色
  21. color: {
  22. type: String,
  23. default: () => defProps.notify.color
  24. },
  25. // 背景颜色
  26. bgColor: {
  27. type: String,
  28. default: () => defProps.notify.bgColor
  29. },
  30. // 展示的文字内容
  31. message: {
  32. type: String,
  33. default: () => defProps.notify.message
  34. },
  35. // 展示时长,为0时不消失,单位ms
  36. duration: {
  37. type: [String, Number],
  38. default: () => defProps.notify.duration
  39. },
  40. // 字体大小
  41. fontSize: {
  42. type: [String, Number],
  43. default: () => defProps.notify.fontSize
  44. },
  45. // 是否留出顶部安全距离(状态栏高度)
  46. safeAreaInsetTop: {
  47. type: Boolean,
  48. default: () => defProps.notify.safeAreaInsetTop
  49. }
  50. }
  51. })