-
zhangwei
2025-01-22 9f0f5d7767506658ab5ca47ba8ff4ede423e47e3
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
import { AllowedComponentProps, VNodeProps } from './_common'
 
declare interface TooltipProps {
  /**
   * 需要显示的提示文字
   */
  text?: string | number
  /**
   * 点击复制按钮时,复制的文本,为空则使用text值
   */
  copyText?: string | number
  /**
   * 文本大小
   * @default 14
   */
  size?: string | number
  /**
   * 字体颜色
   * @default "#606266"
   */
  color?: string
  /**
   * 弹出提示框时,文本的背景色
   * @default "transparent"
   */
  bgColor?: string
  /**
   * 弹出提示的方向
   * @default "top"
   */
  direction?: 'top' | 'bottom'
  /**
   * 弹出提示的z-index,nvue无效
   * @default 10071
   */
  zIndex?: string | number
  /**
   * 是否显示复制按钮
   * @default true
   */
  showCopy?: boolean
  /**
   * 扩展的按钮组
   */
  buttons?: any[]
  /**
   * 是否显示透明遮罩以防止触摸穿透
   * @default true
   */
  overlay?: boolean
  /**
   * 是否显示复制成功或者失败的`toast`
   * @default true
   */
  showToast?: boolean
  /**
   * 点击触发事件
   * @param index 被点击按钮的索引
   */
  onClick?: (index: number) => any
}
 
declare interface _Tooltip {
  new (): {
    $props: AllowedComponentProps &
      VNodeProps &
      TooltipProps
  }
}
 
export declare const Tooltip: _Tooltip