-
zhangwei
2025-03-05 16213c0f85aa3ac8317797bf4a05fd12940e16d3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import { AllowedComponentProps, VNodeProps } from './_common'
 
declare interface ReadMoreProps {
  /**
   * 内容超出此高度才会显示展开全文按钮,单位rpx
   * @default 400
   */
  showHeight?: string | number
  /**
   * 展开后是否显示收起按钮
   * @default false
   */
  toggle?: boolean
  /**
   * 关闭时的提示文字
   * @default "展开阅读全文"
   */
  closeText?: string
  /**
   * 展开时的提示文字
   * @default "收起"
   */
  openText?: string
  /**
   * 提示文字的颜色
   * @default "#2979ff"
   */
  color?: string
  /**
   * 提示文字的大小,默认单位px
   * @default 14
   */
  fontSize?: string | number
  /**
   * 对阴影的自定义处理
   */
  shadowStyle?: {
    backgroundImage?: string
    paddingTop?: string
    marginTop?: string
  }
  /**
   * 段落首行缩进的字符个数
   * @default "2em"
   */
  textIndent?: string
  /**
   * 用于在`open`和`close`事件中当作回调参数返回
   */
  name?: string | number
  /**
   * 内容被展开时触发
   * @param name props中传入的`name`参数值
   */
  onOpen?: (name: any) => any
  /**
   * 内容被收起时触发
   * @param name props中传入的`name`参数值
   */
  onClose?: (name: any) => any
}
 
declare interface _ReadMoreRef {
  /**
   * 重新初始化组件内部高度计算过程,如果内嵌u-parse组件时可能需要用到
   */
  init: () => void
}
 
declare interface _ReadMore {
  new (): {
    $props: AllowedComponentProps &
      VNodeProps &
      ReadMoreProps
  }
}
 
export declare const ReadMore: _ReadMore
 
export declare const ReadMoreRef: _ReadMoreRef