diff --git a/src/calendar/__test__/__snapshots__/index.test.jsx.snap b/src/calendar/__test__/__snapshots__/index.test.jsx.snap
deleted file mode 100644
index 4111e78f3..000000000
--- a/src/calendar/__test__/__snapshots__/index.test.jsx.snap
+++ /dev/null
@@ -1,597 +0,0 @@
-// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
-
-exports[`calendar > props > : format 1`] = `
-
-`;
diff --git a/src/cascader/__test__/__snapshots__/index.test.jsx.snap b/src/cascader/__test__/__snapshots__/index.test.jsx.snap
deleted file mode 100644
index fc5970ee9..000000000
--- a/src/cascader/__test__/__snapshots__/index.test.jsx.snap
+++ /dev/null
@@ -1,167 +0,0 @@
-// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
-
-exports[`cascader > events > : pick 1`] = `
-
-
-
-
-
-
-`;
diff --git a/src/navbar/__test__/__snapshots__/demo.test.jsx.snap b/src/navbar/__test__/__snapshots__/demo.test.jsx.snap
index 89297e2b2..25a199569 100644
--- a/src/navbar/__test__/__snapshots__/demo.test.jsx.snap
+++ b/src/navbar/__test__/__snapshots__/demo.test.jsx.snap
@@ -752,6 +752,7 @@ exports[`Navbar > Navbar mobileVue demo works fine 1`] = `
@@ -1310,6 +1311,7 @@ exports[`Navbar > Navbar searchVue demo works fine 1`] = `
diff --git a/src/search/__test__/__snapshots__/demo.test.jsx.snap b/src/search/__test__/__snapshots__/demo.test.jsx.snap
index 4fb88b149..d6c202aed 100644
--- a/src/search/__test__/__snapshots__/demo.test.jsx.snap
+++ b/src/search/__test__/__snapshots__/demo.test.jsx.snap
@@ -26,6 +26,7 @@ exports[`Search > Search actionVue demo works fine 1`] = `
@@ -61,6 +62,7 @@ exports[`Search > Search baseVue demo works fine 1`] = `
@@ -78,7 +80,7 @@ exports[`Search > Search mobileVue demo works fine 1`] = `
- Search 搜索框123
+ Search 搜索框
Search mobileVue demo works fine 1`] = `
@@ -183,6 +186,7 @@ exports[`Search > Search mobileVue demo works fine 1`] = `
@@ -239,6 +243,7 @@ exports[`Search > Search mobileVue demo works fine 1`] = `
@@ -295,6 +300,7 @@ exports[`Search > Search mobileVue demo works fine 1`] = `
@@ -334,6 +340,7 @@ exports[`Search > Search otherVue demo works fine 1`] = `
@@ -369,6 +376,7 @@ exports[`Search > Search shapeVue demo works fine 1`] = `
diff --git a/src/search/demos/mobile.vue b/src/search/demos/mobile.vue
index ab498c806..08ff29f69 100644
--- a/src/search/demos/mobile.vue
+++ b/src/search/demos/mobile.vue
@@ -1,6 +1,6 @@
-
Search 搜索框123
+
Search 搜索框
用于用户输入搜索信息,并进行页面内容搜索。
diff --git a/src/search/search.tsx b/src/search/search.tsx
index c74626a55..d821276b3 100644
--- a/src/search/search.tsx
+++ b/src/search/search.tsx
@@ -89,9 +89,11 @@ export default defineComponent({
// 如果按的是 enter 键, 13是 enter
if (ENTER_REG.test(e.code) || ENTER_REG.test(e.key)) {
preventDefault(e, false);
+ inputRef.value?.blur();
props.onSubmit?.({ value: searchValue.value, e });
}
};
+
return () => {
const readerLeftIcon = () => {
const leftIcon = renderTNodeJSX('leftIcon');
@@ -122,6 +124,10 @@ export default defineComponent({
return null;
};
+ const extraProps = {
+ enterkeyhint: 'search',
+ };
+
return (
@@ -140,6 +146,7 @@ export default defineComponent({
onBlur={handleBlur}
onInput={handleInput}
onCompositionend={handleCompositionend}
+ {...extraProps}
/>
{readerClear()}