Browse Source

Merge branch 'next' of https://github.com/jdf2e/nutui into next

yangxiaolu3 3 years ago
parent
commit
e27e346e4a

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

@@ -530,7 +530,7 @@ Use `label-align` prop to align the label, `input-align` prop to align the input
 | error-message-align | Error message align, eg `left`、`center`、`right`          | String | - |
 | error-message-align | Error message align, eg `left`、`center`、`right`          | String | - |
 | formatter      | Input value formatter    | `(val: string) => string` | - |
 | formatter      | Input value formatter    | `(val: string) => string` | - |
 | format-trigger | When to format value, eg `onChange`、`onBlur` | 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`   |
+| confirm-type `H5(v3.2.8)` | The text of the button in the lower right corner of the keyboard, only valid when `type='text'`, eg `send`, `search`, `next`, ` go`, `done` | String |   `done`   |
 | adjust-position`v3.1.21` | Whether to automatically push the page up when the keyboard pops up (`applets only`)     | 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` |
 | 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` |
 
 

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

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

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

@@ -54,6 +54,7 @@
               :value="modelValue"
               :value="modelValue"
               :formatTrigger="formatTrigger"
               :formatTrigger="formatTrigger"
               :autofocus="autofocus"
               :autofocus="autofocus"
+              :enterkeyhint="confirmType"
               @input="onInput"
               @input="onInput"
               @focus="onFocus"
               @focus="onFocus"
               @blur="onBlur"
               @blur="onBlur"
@@ -72,6 +73,7 @@
               :value="modelValue"
               :value="modelValue"
               :formatTrigger="formatTrigger"
               :formatTrigger="formatTrigger"
               :autofocus="autofocus"
               :autofocus="autofocus"
+              :enterkeyhint="confirmType"
               @input="onInput"
               @input="onInput"
               @focus="onFocus"
               @focus="onFocus"
               @blur="onBlur"
               @blur="onBlur"
@@ -249,6 +251,10 @@ export default create({
     autofocus: {
     autofocus: {
       type: Boolean,
       type: Boolean,
       default: false
       default: false
+    },
+    confirmType: {
+      type: String as PropType<import('./type').ConfirmTextType>,
+      default: 'done'
     }
     }
   },
   },