提交 b2709b64 编写于 作者: Q qiang

fix: input 组件 number 类型在 iOS 平台使用仅数字键盘

上级 6a45061c
...@@ -130,6 +130,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({ ...@@ -130,6 +130,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({
step={step.value} step={step.value}
// @ts-ignore // @ts-ignore
enterkeyhint={props.confirmType} enterkeyhint={props.confirmType}
pattern={props.type === 'number' ? '[0-9]*' : undefined}
class="uni-input-input" class="uni-input-input"
autocomplete="off" autocomplete="off"
onKeyup={onKeyUpEnter} onKeyup={onKeyUpEnter}
......
...@@ -3238,10 +3238,11 @@ var Input = /* @__PURE__ */ defineBuiltInComponent({ ...@@ -3238,10 +3238,11 @@ var Input = /* @__PURE__ */ defineBuiltInComponent({
"maxlength": state.maxlength, "maxlength": state.maxlength,
"step": step.value, "step": step.value,
"enterkeyhint": props2.confirmType, "enterkeyhint": props2.confirmType,
"pattern": props2.type === "number" ? "[0-9]*" : void 0,
"class": "uni-input-input", "class": "uni-input-input",
"autocomplete": "off", "autocomplete": "off",
"onKeyup": onKeyUpEnter "onKeyup": onKeyUpEnter
}, null, 40, ["value", "disabled", "type", "maxlength", "step", "enterkeyhint", "onKeyup"]); }, null, 40, ["value", "disabled", "type", "maxlength", "step", "enterkeyhint", "pattern", "onKeyup"]);
return vue.createVNode("uni-input", { return vue.createVNode("uni-input", {
"ref": rootRef "ref": rootRef
}, { }, {
......
...@@ -8258,10 +8258,11 @@ var Input = /* @__PURE__ */ defineBuiltInComponent({ ...@@ -8258,10 +8258,11 @@ var Input = /* @__PURE__ */ defineBuiltInComponent({
"maxlength": state2.maxlength, "maxlength": state2.maxlength,
"step": step.value, "step": step.value,
"enterkeyhint": props2.confirmType, "enterkeyhint": props2.confirmType,
"pattern": props2.type === "number" ? "[0-9]*" : void 0,
"class": "uni-input-input", "class": "uni-input-input",
"autocomplete": "off", "autocomplete": "off",
"onKeyup": onKeyUpEnter "onKeyup": onKeyUpEnter
}, null, 40, ["value", "disabled", "type", "maxlength", "step", "enterkeyhint", "onKeyup"]); }, null, 40, ["value", "disabled", "type", "maxlength", "step", "enterkeyhint", "pattern", "onKeyup"]);
return createVNode("uni-input", { return createVNode("uni-input", {
"ref": rootRef "ref": rootRef
}, { }, {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册