-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat(search): 新增自动完成项预览列表. (#2432) fix #2432 * fix(search): 更新快照. (#2432) fix #2432 * test: update snapshots * fix(search): 预览效果优化. (#2432) * fix: fix cr * chore: update api docs * test: update snapshots --------- Co-authored-by: anlyyao <[email protected]>
- Loading branch information
Showing
17 changed files
with
350 additions
and
224 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,22 @@ | ||
Component({ | ||
data: { | ||
value: '', | ||
resultList: [], | ||
}, | ||
methods: { | ||
onChangeValue(e) { | ||
const { value } = e.detail; | ||
const list = [ | ||
'tdesign-vue', | ||
'tdesign-react', | ||
'tdesign-miniprogram', | ||
'tdesign-angular', | ||
'tdesign-mobile-vue', | ||
'tdesign-mobile-react', | ||
]; | ||
this.setData({ | ||
resultList: value ? list.filter((v) => v.includes(value)) : [], | ||
}); | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
<view class="example-search"> | ||
<t-search model:value="{{value}}" placeholder="搜索预设文案" /> | ||
<t-search placeholder="搜索预设文案" /> | ||
</view> | ||
|
||
<view class="example-search"> | ||
<t-search placeholder="输入tdesign,有预览结果" resultList="{{resultList}}" bind:change="onChangeValue" /> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.