diff --git a/packages/uni-components/src/components/input/index.tsx b/packages/uni-components/src/components/input/index.tsx index eb3e7dee1e2edca5ef221493346a95f07a6bf59f..736c780100597af371bf9154519978f51d3357fe 100644 --- a/packages/uni-components/src/components/input/index.tsx +++ b/packages/uni-components/src/components/input/index.tsx @@ -114,6 +114,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({ type={type.value} maxlength={state.maxlength} step={step.value} + // @ts-ignore enterkeyhint={props.confirmType} class="uni-input-input" autocomplete="off" @@ -132,7 +133,11 @@ export default /*#__PURE__*/ defineBuiltInComponent({ {props.placeholder} {props.confirmType === 'search' ? ( -
) : ( diff --git a/packages/uni-h5/dist/uni-h5.cjs.js b/packages/uni-h5/dist/uni-h5.cjs.js index 35867bcb36ab0ea8cab6bde053e4fa2072c34c88..434800a22627d9321701818f95b5253e0189eef8 100644 --- a/packages/uni-h5/dist/uni-h5.cjs.js +++ b/packages/uni-h5/dist/uni-h5.cjs.js @@ -3110,7 +3110,7 @@ var Input = /* @__PURE__ */ defineBuiltInComponent({ "class": ["uni-input-placeholder", props2.placeholderClass] }), [props2.placeholder], 16), [[vue.vShow, !(state.value.length || !valid.value)]]), props2.confirmType === "search" ? vue.createVNode("form", { "action": "", - "onSubmit": () => false, + "onSubmit": (event) => event.preventDefault(), "class": "uni-input-form" }, [inputNode], 40, ["onSubmit"]) : inputNode])], 512); }; diff --git a/packages/uni-h5/dist/uni-h5.es.js b/packages/uni-h5/dist/uni-h5.es.js index 2f4f213deb41808e23655282ee81d94d9f6cca30..353ad71f945af5a27c8550aa3e2fe1712924abeb 100644 --- a/packages/uni-h5/dist/uni-h5.es.js +++ b/packages/uni-h5/dist/uni-h5.es.js @@ -4883,7 +4883,7 @@ var Input = /* @__PURE__ */ defineBuiltInComponent({ "class": ["uni-input-placeholder", props2.placeholderClass] }), [props2.placeholder], 16), [[vShow, !(state2.value.length || !valid.value)]]), props2.confirmType === "search" ? createVNode("form", { "action": "", - "onSubmit": () => false, + "onSubmit": (event) => event.preventDefault(), "class": "uni-input-form" }, [inputNode], 40, ["onSubmit"]) : inputNode])], 512); };