props.js 990 B

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