props.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { defineProps } from '../../libs/util/props';
  2. import theme from '../../libs/config/theme.js'
  3. export default defineProps('ellipsis', {
  4. // 文本内容
  5. content: {
  6. type: String,
  7. default: ''
  8. },
  9. // 省略位置:start, end, middle
  10. position: {
  11. type: String,
  12. default: 'end'
  13. },
  14. lineHeight: {
  15. type: [Number, String],
  16. default: 20
  17. },
  18. // 行数
  19. rows: {
  20. type: [Number, String],
  21. default: 1
  22. },
  23. // 展开文本
  24. expandText: {
  25. type: String,
  26. default: ''
  27. },
  28. // 收起文本
  29. collapseText: {
  30. type: String,
  31. default: ''
  32. },
  33. // 省略符号
  34. symbol: {
  35. type: String,
  36. default: '...'
  37. },
  38. // 文本颜色
  39. color: {
  40. type: String,
  41. default: theme.mainColor
  42. },
  43. // 文本大小
  44. fontSize: {
  45. type: [String, Number],
  46. default: 14
  47. },
  48. // 展开/收起按钮颜色
  49. actionColor: {
  50. type: String,
  51. default: theme.primary
  52. }
  53. })