props.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import { defineProps } from '../../libs/util/props';
  2. import theme from '../../libs/config/theme.js'
  3. export default defineProps('noticeBar', {
  4. // 显示的内容,数组
  5. text: {
  6. type: [Array, String],
  7. default: () => []
  8. },
  9. // 通告滚动模式,row-横向滚动,column-竖向滚动
  10. direction: {
  11. type: String,
  12. default: 'row'
  13. },
  14. // direction = row时,是否使用步进形式滚动
  15. step: {
  16. type: Boolean,
  17. default: false
  18. },
  19. // 是否显示左侧的音量图标
  20. icon: {
  21. type: String,
  22. default: 'volume'
  23. },
  24. // 通告模式,link-显示右箭头,closable-显示右侧关闭图标
  25. mode: {
  26. type: String,
  27. default: ''
  28. },
  29. // 文字颜色,各图标也会使用文字颜色
  30. color: {
  31. type: String,
  32. default: theme.warning
  33. },
  34. // 背景颜色
  35. bgColor: {
  36. type: String,
  37. default: theme.bgColor
  38. },
  39. // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度
  40. speed: {
  41. type: [String, Number],
  42. default: 80
  43. },
  44. // 字体大小
  45. fontSize: {
  46. type: [String, Number],
  47. default: 14
  48. },
  49. // 滚动一个周期的时间长,单位ms
  50. duration: {
  51. type: [String, Number],
  52. default: 2000
  53. },
  54. // 是否禁止用手滑动切换
  55. // 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序
  56. disableTouch: {
  57. type: Boolean,
  58. default: true
  59. },
  60. // 跳转的页面路径
  61. url: {
  62. type: String,
  63. default: ''
  64. },
  65. // 页面跳转的类型
  66. linkType: {
  67. type: String,
  68. default: 'navigateTo'
  69. }
  70. })