zhangwei
2025-01-16 ea44321752674bc97efb7bfa987c19121c3d6881
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
import { AllowedComponentProps, VNodeProps } from './_common'
 
declare interface CodeInputProps {
  /**
   * 键盘弹起时,是否自动上推页面
   * @default true
   */
  adjustPosition?: boolean
  /**
   * 输入字符个数
   * @default 6
   */
  maxlength?: string | number
  /**
   * 是否用圆点填充
   * @default false
   */
  dot?: boolean
  /**
   * 模式选择
   * @default "box"
   */
  mode?: 'box' | 'bottomLine' | 'middleLine'
  /**
   * 是否细边框
   * @default false
   */
  hairline?: boolean
  /**
   * 字符间的距离
   * @default 10
   */
  space?: string | number
  /**
   * 预置值
   */
  value?: string | number
  /**
   * 是否自动获取焦点
   * @default false
   */
  focus?: boolean
  /**
   * 字体和输入横线是否加粗
   * @default false
   */
  bold?: boolean
  /**
   * 字体颜色
   * @default "#606266"
   */
  color?: string
  /**
   * 字体大小,单位rpx
   * @default 18
   */
  fontSize?: string | number
  /**
   * 输入框的大小,宽等于高
   * @default 35
   */
  size?: string | number
  /**
   * 禁止点击输入框唤起系统键盘
   * @default false
   */
  disabledKeyboard?: boolean
  /**
   * 边框和线条颜色
   * @default "#c9cacc"
   */
  borderColor?: string
  /**
   * 是否禁止输入"."符号
   * @default true
   */
  disabledDot?: boolean
  /**
   * 输入内容发生改变时触发
   * @param value 当前输入的值
   */
  onChange?: (value: any) => any
  /**
   * 输入字符个数达`maxlength`值时触发
   * @param value 当前输入的值
   */
  onFinish?: (value: any) => any
}
 
declare interface _CodeInput {
  new (): {
    $props: AllowedComponentProps &
      VNodeProps &
      CodeInputProps
  }
}
 
export declare const CodeInput: _CodeInput