You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.1 KiB

5 months ago
  1. import { defineMixin } from '../../libs/vue'
  2. import defProps from '../../libs/config/props.js'
  3. export const props = defineMixin({
  4. props: {
  5. // 默认的显示占位高度
  6. showHeight: {
  7. type: [String, Number],
  8. default: () => defProps.readMore.showHeight
  9. },
  10. // 展开后是否显示"收起"按钮
  11. toggle: {
  12. type: Boolean,
  13. default: () => defProps.readMore.toggle
  14. },
  15. // 关闭时的提示文字
  16. closeText: {
  17. type: String,
  18. default: () => defProps.readMore.closeText
  19. },
  20. // 展开时的提示文字
  21. openText: {
  22. type: String,
  23. default: () => defProps.readMore.openText
  24. },
  25. // 提示的文字颜色
  26. color: {
  27. type: String,
  28. default: () => defProps.readMore.color
  29. },
  30. // 提示文字的大小
  31. fontSize: {
  32. type: [String, Number],
  33. default: () => defProps.readMore.fontSize
  34. },
  35. // 是否显示阴影
  36. // 此参数不能写在props/readMore.js中进行默认配置,因为使用了条件编译,在外部js中
  37. // uni无法准确识别当前是否处于nvue还是非nvue下
  38. shadowStyle: {
  39. type: Object,
  40. default: () => ({
  41. // #ifndef APP-NVUE
  42. backgroundImage: 'linear-gradient(-180deg, rgba(255, 255, 255, 0) 0%, #fff 80%)',
  43. // #endif
  44. // #ifdef APP-NVUE
  45. // nvue上不支持设置复杂的backgroundImage属性
  46. backgroundImage: 'linear-gradient(to top, #fff, rgba(255, 255, 255, 0.5))',
  47. // #endif
  48. paddingTop: '100px',
  49. marginTop: '-100px'
  50. })
  51. },
  52. // 段落首行缩进的字符个数
  53. textIndent: {
  54. type: String,
  55. default: () => defProps.readMore.textIndent
  56. },
  57. // open和close事件时,将此参数返回在回调参数中
  58. name: {
  59. type: [String, Number],
  60. default: () => defProps.readMore.name
  61. }
  62. }
  63. })