Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

78 rader
2.1 KiB

  1. /*
  2. * @Author : jry
  3. * @Description :
  4. * @version : 3.0
  5. * @LastAuthor : jry
  6. * @lastTime : 2025-08-17 17:23:53
  7. * @FilePath : /uview-plus/libs/config/props/props.js
  8. */
  9. import { defineMixin } from '../../libs/vue'
  10. import AlertDefaultProps from './alert'
  11. import { registerComponentProps } from '../../libs/config/props.js'
  12. const defProps = registerComponentProps(AlertDefaultProps)
  13. export const props = defineMixin({
  14. props: {
  15. // 显示文字
  16. title: {
  17. type: String,
  18. default: () => defProps.alert.title
  19. },
  20. // 主题,success/warning/info/error
  21. type: {
  22. type: String,
  23. default: () => defProps.alert.type
  24. },
  25. // 辅助性文字
  26. description: {
  27. type: String,
  28. default: () => defProps.alert.description
  29. },
  30. // 是否可关闭
  31. closable: {
  32. type: Boolean,
  33. default: () => defProps.alert.closable
  34. },
  35. // 是否显示图标
  36. showIcon: {
  37. type: Boolean,
  38. default: () => defProps.alert.showIcon
  39. },
  40. // 浅或深色调,light-浅色,dark-深色
  41. effect: {
  42. type: String,
  43. default: () => defProps.alert.effect
  44. },
  45. // 文字是否居中
  46. center: {
  47. type: Boolean,
  48. default: () => defProps.alert.center
  49. },
  50. // 字体大小
  51. fontSize: {
  52. type: [String, Number],
  53. default: () => defProps.alert.fontSize
  54. },
  55. // 动画类型
  56. transitionMode: {
  57. type: [String],
  58. default: () => defProps.alert.transitionMode
  59. },
  60. // 自动定时关闭毫秒
  61. duration: {
  62. type: [Number],
  63. default: () => defProps.alert.duration
  64. },
  65. // 自定义图标
  66. icon: {
  67. type: [String],
  68. default: () => defProps.alert.icon
  69. },
  70. // 是否显示
  71. modelValue: {
  72. type: [Boolean],
  73. default: () => defProps.alert.value
  74. }
  75. }
  76. })