Skip to content

Commit

Permalink
feat(search): add enterkeyhint
Browse files Browse the repository at this point in the history
  • Loading branch information
novlan1 committed Nov 27, 2024
1 parent fd49122 commit 369f30c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/navbar/__test__/__snapshots__/demo.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@ exports[`Navbar > Navbar mobileVue demo works fine 1`] = `
<input
class="t-input__keyword"
confirm-type="search"
enterkeyhint="search"
placeholder="搜索预设文案"
type="search"
/>
Expand Down Expand Up @@ -1312,6 +1313,7 @@ exports[`Navbar > Navbar searchVue demo works fine 1`] = `
<input
class="t-input__keyword"
confirm-type="search"
enterkeyhint="search"
placeholder="搜索预设文案"
type="search"
/>
Expand Down
8 changes: 8 additions & 0 deletions src/search/__test__/__snapshots__/demo.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ exports[`Search > Search actionVue demo works fine 1`] = `
autofocus=""
class="t-input__keyword t-search--center"
confirm-type="search"
enterkeyhint="search"
placeholder="搜索预设文案"
type="search"
/>
Expand Down Expand Up @@ -63,6 +64,7 @@ exports[`Search > Search baseVue demo works fine 1`] = `
<input
class="t-input__keyword"
confirm-type="search"
enterkeyhint="search"
placeholder="请输入关键字"
type="search"
/>
Expand Down Expand Up @@ -133,6 +135,7 @@ exports[`Search > Search mobileVue demo works fine 1`] = `
<input
class="t-input__keyword"
confirm-type="search"
enterkeyhint="search"
placeholder="请输入关键字"
type="search"
/>
Expand Down Expand Up @@ -187,6 +190,7 @@ exports[`Search > Search mobileVue demo works fine 1`] = `
autofocus=""
class="t-input__keyword t-search--center"
confirm-type="search"
enterkeyhint="search"
placeholder="搜索预设文案"
type="search"
/>
Expand Down Expand Up @@ -244,6 +248,7 @@ exports[`Search > Search mobileVue demo works fine 1`] = `
<input
class="t-input__keyword"
confirm-type="search"
enterkeyhint="search"
placeholder="请输入关键字"
type="search"
/>
Expand Down Expand Up @@ -301,6 +306,7 @@ exports[`Search > Search mobileVue demo works fine 1`] = `
<input
class="t-input__keyword"
confirm-type="search"
enterkeyhint="search"
placeholder="搜索预设文案"
type="search"
/>
Expand Down Expand Up @@ -341,6 +347,7 @@ exports[`Search > Search otherVue demo works fine 1`] = `
<input
class="t-input__keyword"
confirm-type="search"
enterkeyhint="search"
placeholder="搜索预设文案"
type="search"
/>
Expand Down Expand Up @@ -377,6 +384,7 @@ exports[`Search > Search shapeVue demo works fine 1`] = `
<input
class="t-input__keyword"
confirm-type="search"
enterkeyhint="search"
placeholder="请输入关键字"
type="search"
/>
Expand Down
1 change: 1 addition & 0 deletions src/search/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export default defineComponent({
onBlur={handleBlur}
onInput={handleInput}
confirm-type="search"
enterkeyhint="search"
onCompositionend={handleCompositionend}
/>
{readerClear()}
Expand Down

0 comments on commit 369f30c

Please sign in to comment.