@zh-keyboard/vue 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,38 +1,105 @@
1
1
  import { KeyBoardMode, KeyEvent } from '../types';
2
- type __VLS_Props = {
2
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
3
3
  /**
4
4
  * 默认的键盘模式
5
5
  */
6
- defaultMode?: KeyBoardMode;
6
+ defaultMode: {
7
+ type: () => KeyBoardMode;
8
+ default: () => "symbol" | "zh" | "en" | "hand" | "num";
9
+ };
7
10
  /**
8
11
  * 是否启用手写输入
9
12
  */
10
- enableHandwriting?: boolean;
13
+ enableHandwriting: {
14
+ type: BooleanConstructor;
15
+ default: () => boolean;
16
+ };
11
17
  /**
12
18
  * 键盘定位模式
13
19
  * @default 'static'
14
20
  */
15
- position?: 'static' | 'float' | 'bottom';
21
+ position: {
22
+ type: () => "static" | "float" | "bottom";
23
+ default: () => "static" | "float" | "bottom";
24
+ };
25
+ /**
26
+ * 浮动模式下键盘与输入框的距离
27
+ * @default 10
28
+ */
29
+ floatMarginTop: {
30
+ type: NumberConstructor;
31
+ default: () => number;
32
+ };
16
33
  /**
17
34
  * 当没有input获得焦点时是否禁用键盘
18
35
  * @default true
19
36
  */
20
- disableWhenNoFocus?: boolean;
37
+ disableWhenNoFocus: {
38
+ type: BooleanConstructor;
39
+ default: () => boolean;
40
+ };
21
41
  /**
22
42
  * 数字键盘的行配置
23
43
  */
24
- numKeys?: string[][];
25
- };
26
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
44
+ numKeys: {
45
+ type: () => string[][];
46
+ };
47
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
27
48
  key: (payload: KeyEvent) => any;
28
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
49
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
50
+ /**
51
+ * 默认的键盘模式
52
+ */
53
+ defaultMode: {
54
+ type: () => KeyBoardMode;
55
+ default: () => "symbol" | "zh" | "en" | "hand" | "num";
56
+ };
57
+ /**
58
+ * 是否启用手写输入
59
+ */
60
+ enableHandwriting: {
61
+ type: BooleanConstructor;
62
+ default: () => boolean;
63
+ };
64
+ /**
65
+ * 键盘定位模式
66
+ * @default 'static'
67
+ */
68
+ position: {
69
+ type: () => "static" | "float" | "bottom";
70
+ default: () => "static" | "float" | "bottom";
71
+ };
72
+ /**
73
+ * 浮动模式下键盘与输入框的距离
74
+ * @default 10
75
+ */
76
+ floatMarginTop: {
77
+ type: NumberConstructor;
78
+ default: () => number;
79
+ };
80
+ /**
81
+ * 当没有input获得焦点时是否禁用键盘
82
+ * @default true
83
+ */
84
+ disableWhenNoFocus: {
85
+ type: BooleanConstructor;
86
+ default: () => boolean;
87
+ };
88
+ /**
89
+ * 数字键盘的行配置
90
+ */
91
+ numKeys: {
92
+ type: () => string[][];
93
+ };
94
+ }>> & Readonly<{
29
95
  onKey?: ((payload: KeyEvent) => any) | undefined;
30
96
  }>, {
31
97
  enableHandwriting: boolean;
32
98
  defaultMode: KeyBoardMode;
33
99
  position: "static" | "float" | "bottom";
100
+ floatMarginTop: number;
34
101
  disableWhenNoFocus: boolean;
35
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
102
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
36
103
  keyboardRef: HTMLDivElement;
37
104
  }, HTMLDivElement>;
38
105
  export default _default;
@@ -2,4 +2,4 @@ export interface KeyEvent {
2
2
  key: string;
3
3
  isControl?: boolean;
4
4
  }
5
- export type KeyBoardMode = 'zh' | 'en' | 'hand' | 'num' | 'symbol';
5
+ export type KeyBoardMode = 'zh' | 'en' | 'en_cap' | 'hand' | 'num' | 'symbol';