@zh-keyboard/react 0.4.4 → 0.5.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 +16 -0
- package/dist/lib.d.ts +1 -1
- package/dist/zh-keyboard-react.js +1341 -1325
- package/dist/zh-keyboard-react.js.map +1 -1
- package/dist/zh-keyboard-react.umd.cjs +14 -14
- package/dist/zh-keyboard-react.umd.cjs.map +1 -1
- package/package.json +3 -3
- package/dist/utils/handwriting.d.ts +0 -11
package/README.md
CHANGED
|
@@ -44,6 +44,22 @@ pnpm add @zh-keyboard/react
|
|
|
44
44
|
|
|
45
45
|
## 基本使用
|
|
46
46
|
|
|
47
|
+
### 全局配置
|
|
48
|
+
|
|
49
|
+
可以在项目入口文件中设置全局配置:
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import { setKeyboardConfig } from '@zh-keyboard/react'
|
|
53
|
+
|
|
54
|
+
setKeyboardConfig({
|
|
55
|
+
defaultMode: 'zh',
|
|
56
|
+
enableHandwriting: true,
|
|
57
|
+
position: 'float'
|
|
58
|
+
})
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 基础用法
|
|
62
|
+
|
|
47
63
|
- 为了防止移动端设备弹出系统默认的键盘,建议在输入框上设置 `inputMode="none"` 属性。
|
|
48
64
|
- 此外,可以通过在输入框上设置 `data-inputmode` 属性来指定组件默认打开的键盘类型 (可选值为 `'en'`, `'zh'`, `'hand'`, `'num'`),具体键盘模式的说明请参考 `defaultMode` 属性。
|
|
49
65
|
|
package/dist/lib.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as ZhKeyboard } from './components/ZhKeyboard';
|
|
2
|
-
export
|
|
2
|
+
export { getHandwritingRecognizer, getKeyboardConfig, registerHandwritingRecognizer, setKeyboardConfig, } from '@zh-keyboard/core';
|
|
3
3
|
export { ZhKeyboard };
|
|
4
4
|
export default ZhKeyboard;
|