props.js 1.5 KB

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