Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

55 linhas
1.6 KiB

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