@zh-keyboard/vue 0.2.3 → 0.3.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.
package/README.md CHANGED
@@ -32,6 +32,7 @@ pnpm add @zh-keyboard/vue
32
32
  | defaultMode | 'en' \| 'zh' \| 'hand' \| 'num' | 'en' | 默认的键盘模式 |
33
33
  | enableHandwriting| boolean | false | 是否启用手写输入 |
34
34
  | position | 'static' \| 'float' \| 'bottom' | 'static' | 键盘定位模式 |
35
+ | numKeys | string[][] | - | 数字键盘的行配置 |
35
36
 
36
37
  ### 事件
37
38
 
@@ -48,6 +49,7 @@ pnpm add @zh-keyboard/vue
48
49
  <script setup>
49
50
  import { ZhKeyboard } from '@zh-keyboard/vue'
50
51
  import { ref } from 'vue'
52
+ import '@zh-keyboard/vue/style.css'
51
53
 
52
54
  const inputText = ref('')
53
55
  </script>
@@ -1,9 +1,14 @@
1
1
  import { KeyEvent } from '../types';
2
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
2
+ type __VLS_Props = {
3
+ keyboardRows?: string[][];
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
6
  key: (payload: KeyEvent) => any;
4
7
  exit: () => any;
5
- }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
8
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
6
9
  onKey?: ((payload: KeyEvent) => any) | undefined;
7
10
  onExit?: (() => any) | undefined;
8
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
11
+ }>, {
12
+ keyboardRows: string[][];
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
9
14
  export default _default;
@@ -18,6 +18,10 @@ type __VLS_Props = {
18
18
  * @default true
19
19
  */
20
20
  disableWhenNoFocus?: boolean;
21
+ /**
22
+ * 数字键盘的行配置
23
+ */
24
+ numKeys?: string[][];
21
25
  };
22
26
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
23
27
  key: (payload: KeyEvent) => any;