ソースを参照

feat(input): 添加小程序属性always-system (#1863)

mikasayw 3 年 前
コミット
8d0001ff2b

+ 2 - 1
src/packages/__VUE/input/doc.en-US.md

@@ -531,7 +531,8 @@ Use `label-align` prop to align the label, `input-align` prop to align the input
 | formatter      | Input value formatter    | `(val: string) => string` | - |
 | format-trigger | When to format value, eg `onChange`、`onBlur` | String | - |
 | confirm-type   | The text of the button in the lower right corner of the keyboard (`applets only`), only valid when `type='text'`, eg `send`, `search`, `next`, ` go`, `done` | String |   `done`   |
-| adjust-position| Whether to automatically push the page up when the keyboard pops up, only native     | Boolean | `true` |
+| adjust-position`v3.1.21` | Whether to automatically push the page up when the keyboard pops up (`applets only`)     | Boolean | `true` |
+| always-system`v3.2.8` | Whether to force the use of input elements created by system keyboard and Web-view. When true, `confirm-type`, `confirm-hold` may fail (`applets only`)     | Boolean | `false` |
 
 ### Events
 

+ 2 - 1
src/packages/__VUE/input/doc.md

@@ -534,7 +534,8 @@ app.use(Icon);
 | formatter      | 输入内容格式化函数    | `(val: string) => string` | - |
 | format-trigger | 格式化函数触发的时机,可选值为 `onChange`、`onBlur` | String | - |
 | confirm-type   | 键盘右下角按钮的文字(`仅支持小程序`),仅在`type='text'`时生效,可选值 `send`:发送、`search`:搜索、`next`:下一个、`go`:前往、`done`:完成 | String |   `done`   |
-| adjust-position| 键盘弹起时,是否自动上推页面,仅支持原生     | Boolean | `true` |
+| adjust-position`v3.1.21` | 键盘弹起时,是否自动上推页面(`仅支持小程序`)     | Boolean | `true` |
+| always-system`v3.2.8` | 是否强制使用系统键盘和 Web-view 创建的 input 元素。为 true 时,`confirm-type`、`confirm-hold` 可能失效(`仅支持小程序`)     | Boolean | `false` |
 
 ### Events
 

+ 6 - 0
src/packages/__VUE/input/index.taro.vue

@@ -55,6 +55,7 @@
               :value="modelValue"
               :formatTrigger="formatTrigger"
               :adjust-position="adjustPosition"
+              :always-system="alwaysSystem"
               @input="onInput"
               @focus="onFocus"
               @blur="onBlur"
@@ -75,6 +76,7 @@
               :formatTrigger="formatTrigger"
               :confirm-type="confirmType"
               :adjust-position="adjustPosition"
+              :always-system="alwaysSystem"
               @input="onInput"
               @focus="onFocus"
               @blur="onBlur"
@@ -261,6 +263,10 @@ export default create({
     adjustPosition: {
       type: Boolean,
       default: true
+    },
+    alwaysSystem: {
+      type: Boolean,
+      default: false
     }
   },