Преглед изворни кода

[doc]Add NumKeyboard guide

dufu1991 пре 3 година
родитељ
комит
8a86ca1514
2 измењених фајлова са 8 додато и 0 уклоњено
  1. 4 0
      doc/components/numKeyboard/guide.md
  2. 4 0
      doc/components/numKeyboard/guide_en.md

+ 4 - 0
doc/components/numKeyboard/guide.md

@@ -20,6 +20,10 @@ NumKeyboard 组件的按键有 5 种类型,分别是 0-9 数字、删除、小
 
 按键文字大小会动态的跟随按键的高度变化。
 
+## 键盘高度
+
+移动端使用到键盘的地方需要注意键盘的高度,因为键盘可能会遮盖掉页面上需要显示输入内容的区域,所以 NumKeyboard 组件在打开的时候会自动计算键盘的高度,通过 open 事件派发出去,开发者可以根据这个值来处理键盘遮挡的问题。
+
 ## CSS 注入
 
 通过 injClass 参数可以向 NumKeyboard 的三个地方注入 CSS 名称(不仅限于 Tailwind CSS),这将使组件样式有更多自定义可能性,示例中通过 injClass 实现了自定义背景色与文字颜色。

+ 4 - 0
doc/components/numKeyboard/guide_en.md

@@ -20,6 +20,10 @@ When doneDisabled is set to true, the completion button will be disabled. In thi
 
 The key text size will dynamically adjust according to the height of the key.
 
+## Keyboard Height
+
+When using the keyboard on a mobile device, it is important to consider the height of the keyboard. The keyboard may cover the area where input content needs to be displayed on the page. Therefore, the NumKeyboard component automatically calculates the height of the keyboard when it is opened and dispatches it through the open event. Developers can use this value to handle the issue of keyboard covering content.
+
 ## CSS Injection
 
 The injClass parameter can be used to inject CSS class names (not limited to Tailwind CSS) into three parts of the NumKeyboard. This allows for more customization possibilities for the component's style. In the example, custom background color and text color are achieved through injClass.