From c38a1f824bcf3daef79211494aa6b9e5438c1495 Mon Sep 17 00:00:00 2001 From: Yunqi Bai Date: Mon, 1 Jul 2024 16:13:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(search):=20=E6=96=B0=E5=A2=9E=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=AE=8C=E6=88=90=E9=A1=B9=E9=A2=84=E8=A7=88=E5=88=97?= =?UTF-8?q?=E8=A1=A8.=20(#2432)=20(#2520)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- example/app.less | 3 +- src/input/__test__/demo.test.js | 16 +- src/rate/__test__/demo.test.js | 13 +- src/search/README.en-US.md | 58 +++++- src/search/README.md | 56 +++--- .../__test__/__snapshots__/demo.test.js.snap | 10 +- .../__test__/__snapshots__/index.test.js.snap | 2 +- src/search/_example/base/index.js | 17 ++ src/search/_example/base/index.wxml | 6 +- src/search/_example/base/index.wxss | 4 + src/search/props.ts | 136 +++++++------- src/search/search.json | 3 +- src/search/search.less | 14 ++ src/search/search.ts | 44 ++++- src/search/search.wxml | 15 ++ src/search/search.wxs | 6 + src/search/type.ts | 171 ++++++++---------- 17 files changed, 350 insertions(+), 224 deletions(-) create mode 100644 src/search/search.wxs diff --git a/example/app.less b/example/app.less index 2271f1fd3..3a94c53e6 100644 --- a/example/app.less +++ b/example/app.less @@ -3,7 +3,8 @@ @font-face { font-family: 'TCloudNumber'; - src: url('data:font/ttf;charset=utf-8;base64,AAEAAAANAIAAAwBQRkZUTZcMD6UAAB/UAAAAHEdERUYAKQBRAAAftAAAAB5PUy8yaSQEaAAAAVgAAABgY21hcHhknPwAAALcAAACFmdhc3D//wADAAAfrAAAAAhnbHlm71OdawAABYwAABNoaGVhZBwlK2YA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AAAALABoCZAABAAAAAAANAJADoQABAAAAAAAOABoEaAABAAAAAAAQAAwEnQABAAAAAAARAAcEugADAAEECQAAAEQAAAADAAEECQABABgAaQADAAEECQACAA4AkAADAAEECQADAD4AqAADAAEECQAEACgBCAADAAEECQAFAEIBRwADAAEECQAGACgBrQADAAEECQAIACoB7AADAAEECQALADQCLgADAAEECQANASACfwADAAEECQAOADQEMgADAAEECQAQABgEgwADAAEECQARAA4EqgBDAG8AcAB5AHIAaQBnAGgAdAAgACgAYwApACAAMgAwADIAMQAtAHAAcgBlAHMAZQBuAHQAIABUAEQAZQBzAGkAZwBuAABDb3B5cmlnaHQgKGMpIDIwMjEtcHJlc2VudCBURGVzaWduAABUAEMAbABvAHUAZABOAHUAbQBiAGUAcgAAVENsb3VkTnVtYmVyAABSAGUAZwB1AGwAYQByAABSZWd1bGFyAAAxAC4AMAAxADAAOwBVAEsAVwBOADsAVABDAGwAbwB1AGQATgB1AG0AYgBlAHIALQBSAGUAZwB1AGwAYQByAAAxLjAxMDtVS1dOO1RDbG91ZE51bWJlci1SZWd1bGFyAABUAEMAbABvAHUAZABOAHUAbQBiAGUAcgAgAFIAZQBnAHUAbABhAHIAAFRDbG91ZE51bWJlciBSZWd1bGFyAABWAGUAcgBzAGkAbwBuACAAMQAuADAAMQAwADsARwBsAHkAcABoAHMAIAAzAC4AMQAuADEAIAAoADMAMQAzADUAKQAAVmVyc2lvbiAxLjAxMDtHbHlwaHMgMy4xLjEgKDMxMzUpAABUAEMAbABvAHUAZABOAHUAbQBiAGUAcgAtAFIAZQBnAHUAbABhAHIAAFRDbG91ZE51bWJlci1SZWd1bGFyAABUAGUAbgBjAGUAbgB0ACAAVABEAGUAcwBpAGcAbgAgAE8AdABlAGEAbQAAVGVuY2VudCBURGVzaWduIE90ZWFtAABoAHQAdABwADoALwAvAHQAZABlAHMAaQBnAG4ALgB0AGUAbgBjAGUAbgB0AC4AYwBvAG0AAGh0dHA6Ly90ZGVzaWduLnRlbmNlbnQuY29t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AAAADeBipuAAAAANeCVUMAAAAA4YOP8w==') + format('truetype'); font-weight: normal; font-style: normal; font-display: swap; diff --git a/src/input/__test__/demo.test.js b/src/input/__test__/demo.test.js index 603f344e8..cdffa0aab 100644 --- a/src/input/__test__/demo.test.js +++ b/src/input/__test__/demo.test.js @@ -5,21 +5,7 @@ import path from 'path'; import simulate from 'miniprogram-simulate'; -const mapper = [ - 'align', - 'banner', - 'base', - 'bordered', - 'custom', - 'label', - 'layout', - 'maxlength', - 'prefix', - 'size', - 'special', - 'status', - 'suffix', -]; +const mapper = ['align', 'banner', 'base', 'bordered', 'custom', 'label', 'layout', 'maxlength', 'prefix', 'size', 'special', 'status', 'suffix']; describe('Input', () => { mapper.forEach((demoName) => { diff --git a/src/rate/__test__/demo.test.js b/src/rate/__test__/demo.test.js index 4d10e7c23..fe7849981 100644 --- a/src/rate/__test__/demo.test.js +++ b/src/rate/__test__/demo.test.js @@ -5,18 +5,7 @@ import path from 'path'; import simulate from 'miniprogram-simulate'; -const mapper = [ - 'action', - 'base', - 'color', - 'count', - 'custom', - 'custom-prefix', - 'show-text', - 'size', - 'special', - 'un-filled', -]; +const mapper = ['action', 'base', 'color', 'count', 'custom', 'custom-prefix', 'show-text', 'size', 'special', 'un-filled']; describe('Rate', () => { mapper.forEach((demoName) => { diff --git a/src/search/README.en-US.md b/src/search/README.en-US.md index 4517dc836..26d0ba14d 100644 --- a/src/search/README.en-US.md +++ b/src/search/README.en-US.md @@ -1,6 +1,62 @@ +## API + +### Search Props + +name | type | default | description | required +-- | -- | -- | -- | -- +style | Object | - | CSS(Cascading Style Sheets) | N +custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N +action | String / Slot | '' | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N +adjust-position | Boolean | true | \- | N +always-embed | Boolean | false | \- | N +center | Boolean | false | \- | N +clearable | Boolean | true | \- | N +confirm-hold | Boolean | false | \- | N +confirm-type | String | search | options: send/search/next/go/done | N +cursor | Number | - | required | Y +cursor-spacing | Number | 0 | \- | N +disabled | Boolean | false | \- | N +focus | Boolean | false | \- | N +hold-keyboard | Boolean | false | \- | N +label | String | '' | `deprecated` | N +left-icon | String / Slot | 'search' | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N +maxcharacter | Number | - | \- | N +maxlength | Number | -1 | \- | N +placeholder | String | '' | \- | N +placeholder-class | String | input-placeholder | \- | N +placeholder-style | String | - | required | Y +result-list | Array | [] | Typescript:`Array` | N +right-icon | String / Slot | 'close-circle-filled' | `deprecated`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N +selection-end | Number | -1 | \- | N +selection-start | Number | -1 | \- | N +shape | String | 'square' | options: square/round | N +type | String | 'text' | options: text/number/idcard/digit/nickname | N +value | String | '' | \- | N + +### Search Events + +name | params | description +-- | -- | -- +action-click | `({})` | \- +blur | `({ value: string })` | \- +change | `({ value: string })` | \- +clear | `({ value: string })` | \- +focus | `({ value: string })` | \- +submit | `({ value: string })` | \- +### Search External Classes + +className | Description +-- | -- +t-class | \- +t-class-action | \- +t-class-clear | \- +t-class-input | \- +t-class-input-container | \- +t-class-left | \- ### CSS Variables + The component provides the following CSS variables, which can be used to customize styles. Name | Default Value | Description -- | -- | -- @@ -14,4 +70,4 @@ Name | Default Value | Description --td-search-padding | 16rpx 24rpx | - --td-search-placeholder-color | @font-gray-3 | - --td-search-square-radius | @radius-default | - ---td-search-text-color | @font-gray-1 | - +--td-search-text-color | @font-gray-1 | - \ No newline at end of file diff --git a/src/search/README.md b/src/search/README.md index 668a5e85f..9b1ed5353 100644 --- a/src/search/README.md +++ b/src/search/README.md @@ -47,35 +47,39 @@ isComponent: true {{ other }} ## API + ### Search Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- -action | String / Slot | '' | 自定义右侧操作按钮文字 | N +style | Object | - | 样式 | N +custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N +action | String / Slot | '' | 自定义右侧操作按钮文字。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N +adjust-position | Boolean | true | 键盘弹起时,是否自动上推页面 | N +always-embed | Boolean | false | 强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效) | N center | Boolean | false | 是否居中 | N -disabled | Boolean | false | 是否禁用 | N +clearable | Boolean | true | 是否启用清除控件 | N +confirm-hold | Boolean | false | 点击键盘右下角按钮时是否保持键盘不收起 | N +confirm-type | String | search | 设置键盘右下角按钮的文字,仅在type='text'时生效。
具体释义:
`send` 右下角按钮为“发送”;
`search` 右下角按钮为“搜索”;
`next` 右下角按钮为“下一个”;
`go` 右下角按钮为“前往”;
`done` 右下角按钮为“完成”。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/input.html)。可选项:send/search/next/go/done | N +cursor | Number | - | 必需。指定 focus 时的光标位置 | Y cursor-spacing | Number | 0 | 搜索框聚焦时底部与键盘的距离 | N +disabled | Boolean | false | 是否禁用 | N focus | Boolean | false | 是否聚焦 | N +hold-keyboard | Boolean | false | focus时,点击页面的时候不收起键盘 | N label | String | '' | 已废弃。左侧文本 | N +left-icon | String / Slot | 'search' | 左侧图标。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N maxcharacter | Number | - | 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度。`maxcharacter` 和 `maxlength` 二选一使用 | N maxlength | Number | -1 | 用户最多可以输入的文本长度,一个中文等于一个计数长度。默认为 -1,不限制输入长度。`maxcharacter` 和 `maxlength` 二选一使用 | N -confirm-type | String | search | 设置键盘右下角按钮的文字,仅在type='text'时生效。
具体释义:
`send` 右下角按钮为“发送”;
`search` 右下角按钮为“搜索”;
`next` 右下角按钮为“下一个”;
`go` 右下角按钮为“前往”;
`done` 右下角按钮为“完成”。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/input.html)。可选项:send/search/next/go/done | N -always-embed | Boolean | false | 强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效) | N -confirm-hold | Boolean | false | 点击键盘右下角按钮时是否保持键盘不收起 | N -cursor | Number | - | 必需。指定 focus 时的光标位置 | Y -selection-start | Number | -1 | 光标起始位置,自动聚集时有效,需与 selection-end 搭配使用 | N -selection-end | Number | -1 | 光标结束位置,自动聚集时有效,需与 selection-start 搭配使用 | N -adjust-position | Boolean | true | 键盘弹起时,是否自动上推页面 | N -hold-keyboard | Boolean | false | focus时,点击页面的时候不收起键盘 | N -placeholder-style | String | - | 必需。指定 placeholder 的样式 | Y -placeholder-class | String | input-placeholder | 指定 placeholder 的样式类 | N -left-icon | String / Slot | 'search' | 左侧图标 | N placeholder | String | '' | 占位符 | N -right-icon | String / Slot | 'close-circle-filled' | 已废弃。右侧图标 | N -clearable | Boolean | true | 是否启用清除控件 | N +placeholder-class | String | input-placeholder | 指定 placeholder 的样式类 | N +placeholder-style | String | - | 必需。指定 placeholder 的样式 | Y +result-list | Array | [] | 预览结果列表。TS 类型:`Array` | N +right-icon | String / Slot | 'close-circle-filled' | 已废弃。右侧图标。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N +selection-end | Number | -1 | 光标结束位置,自动聚集时有效,需与 selection-start 搭配使用 | N +selection-start | Number | -1 | 光标起始位置,自动聚集时有效,需与 selection-end 搭配使用 | N shape | String | 'square' | 搜索框形状。可选项:square/round | N +type | String | 'text' | 拉起键盘的类型。可选项:text/number/idcard/digit/nickname | N value | String | '' | 值 | N -type | String | 'text' | 拉起键盘的类型,可选项:text/number/idcard/digit/nickname | N ### Search Events @@ -87,18 +91,19 @@ change | `({ value: string })` | 值发生变化时触发 clear | `({ value: string })` | 点击清除时触发 focus | `({ value: string })` | 聚焦时触发 submit | `({ value: string })` | 提交时触发 +### Search External Classes -### Search 外部样式类 -类名 | 说明 --- | -- +类名 | 描述 +-- | -- t-class | 根节点样式类 -t-class-input-container | 输入框容器样式类 -t-class-input | 输入框样式类 t-class-action | 操作按钮样式类 -t-class-left | 左侧图标样式类 t-class-clear | 右侧图标样式类 +t-class-input | 输入框样式类 +t-class-input-container | 输入框容器样式类 +t-class-left | 左侧图标样式类 + +### CSS Variables -### CSS 变量 组件提供了下列 CSS 变量,可用于自定义样式。 名称 | 默认值 | 描述 -- | -- | -- @@ -111,5 +116,6 @@ t-class-clear | 右侧图标样式类 --td-search-label-color | @font-gray-1 | - --td-search-padding | 16rpx 24rpx | - --td-search-placeholder-color | @font-gray-3 | - +--td-search-result-high-light-color | @brand-color | - --td-search-square-radius | @radius-default | - ---td-search-text-color | @font-gray-1 | - +--td-search-text-color | @font-gray-1 | - \ No newline at end of file diff --git a/src/search/__test__/__snapshots__/demo.test.js.snap b/src/search/__test__/__snapshots__/demo.test.js.snap index 0c1a7062c..6d165ba4c 100644 --- a/src/search/__test__/__snapshots__/demo.test.js.snap +++ b/src/search/__test__/__snapshots__/demo.test.js.snap @@ -26,7 +26,15 @@ exports[`Search Search base demo works fine 1`] = ` > + + + diff --git a/src/search/__test__/__snapshots__/index.test.js.snap b/src/search/__test__/__snapshots__/index.test.js.snap index 01d0fd3cc..9b50f8aec 100644 --- a/src/search/__test__/__snapshots__/index.test.js.snap +++ b/src/search/__test__/__snapshots__/index.test.js.snap @@ -42,7 +42,7 @@ exports[`search Props :base 1`] = ` maxlength="{{-1}}" name="input" placeholder="" - placeholderClass=" t-search__placeholder t-search__placeholder--normal" + placeholderClass="input-placeholder t-search__placeholder t-search__placeholder--normal" placeholderStyle="" selectionEnd="{{-1}}" selectionStart="{{-1}}" diff --git a/src/search/_example/base/index.js b/src/search/_example/base/index.js index d6ebd8e2d..3e47aac0f 100644 --- a/src/search/_example/base/index.js +++ b/src/search/_example/base/index.js @@ -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)) : [], + }); + }, }, }); diff --git a/src/search/_example/base/index.wxml b/src/search/_example/base/index.wxml index 5ec180077..6c1ae2827 100644 --- a/src/search/_example/base/index.wxml +++ b/src/search/_example/base/index.wxml @@ -1,3 +1,7 @@ - + + + + + diff --git a/src/search/_example/base/index.wxss b/src/search/_example/base/index.wxss index 1dabe66b9..bdfc5ff94 100644 --- a/src/search/_example/base/index.wxss +++ b/src/search/_example/base/index.wxss @@ -2,3 +2,7 @@ background-color: var(--bg-color-demo); padding: 16rpx 32rpx; } + +.example-search:not(:last-child) { + margin-bottom: 32rpx; +} \ No newline at end of file diff --git a/src/search/props.ts b/src/search/props.ts index 436ba7e7c..31721df6c 100644 --- a/src/search/props.ts +++ b/src/search/props.ts @@ -11,128 +11,124 @@ const props: TdSearchProps = { type: String, value: '', }, - /** 是否居中 */ - center: { + /** 键盘弹起时,是否自动上推页面 */ + adjustPosition: { type: Boolean, - value: false, + value: true, }, - /** 是否禁用 */ - disabled: { + /** 强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效) */ + alwaysEmbed: { type: Boolean, value: false, }, - /** 组件外部样式类名,分别用于设置组件外层类名、输入框类名、输入框容器类名、右侧 cancel 文本类名、左侧图标类名、右侧图标类型 */ - externalClasses: { - type: Array, - }, - /** 指定光标与键盘的距离,取 input 距离底部的距离和 cursor-spacing 指定的距离的最小值作为光标与键盘的距离 */ - cursorSpacing: { - type: Number, - value: 0, - }, - /** 是否聚焦 */ - focus: { + /** 是否居中 */ + center: { type: Boolean, value: false, }, - /** 左侧文本 */ - label: { - type: String, - value: '', - }, - /** 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度。`maxcharacter` 和 `maxlength` 二选一使用 */ - maxcharacter: { - type: Number, - }, - /** 用户最多可以输入的文本长度,一个中文等于一个计数长度,默认为 -1,不限制输入长度。`maxcharacter` 和 `maxlength` 二选一使用 */ - maxlength: { - type: Number, - value: -1, - }, - /** 设置键盘右下角按钮的文字,仅在type='text'时生效。
具体释义:
`send` 右下角按钮为“发送”;
`search` 右下角按钮为“搜索”;
`next` 右下角按钮为“下一个”;
`go` 右下角按钮为“前往”;
`done` 右下角按钮为“完成”。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/input.html) */ - confirmType: { - type: String, - value: 'search', - }, - /** 强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效) */ - alwaysEmbed: { + /** 是否启用清除控件 */ + clearable: { type: Boolean, - value: false, + value: true, }, /** 点击键盘右下角按钮时是否保持键盘不收起 */ confirmHold: { type: Boolean, value: false, }, - /** 指定focus时的光标位置 */ + /** 设置键盘右下角按钮的文字,仅在type='text'时生效。
具体释义:
`send` 右下角按钮为“发送”;
`search` 右下角按钮为“搜索”;
`next` 右下角按钮为“下一个”;
`go` 右下角按钮为“前往”;
`done` 右下角按钮为“完成”。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/input.html) */ + confirmType: { + type: String, + value: 'search', + }, + /** 指定 focus 时的光标位置 */ cursor: { type: Number, }, - /** 光标起始位置,自动聚集时有效,需与selection-end搭配使用 */ - selectionStart: { + /** 搜索框聚焦时底部与键盘的距离 */ + cursorSpacing: { type: Number, - value: -1, + value: 0, }, - /** 光标结束位置,自动聚集时有效,需与selection-start搭配使用 */ - selectionEnd: { - type: Number, - value: -1, + /** 是否禁用 */ + disabled: { + type: Boolean, + value: false, }, - /** 键盘弹起时,是否自动上推页面 */ - adjustPosition: { + /** 是否聚焦 */ + focus: { type: Boolean, - value: true, + value: false, }, /** focus时,点击页面的时候不收起键盘 */ holdKeyboard: { type: Boolean, value: false, }, - /** 指定 placeholder 的样式 */ - placeholderStyle: { - type: String, - value: '', - }, - /** 指定 placeholder 的样式类 */ - placeholderClass: { - type: String, - value: '', - }, /** 左侧图标 */ leftIcon: { type: String, value: 'search', }, + /** 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度。`maxcharacter` 和 `maxlength` 二选一使用 */ + maxcharacter: { + type: Number, + }, + /** 用户最多可以输入的文本长度,一个中文等于一个计数长度。默认为 -1,不限制输入长度。`maxcharacter` 和 `maxlength` 二选一使用 */ + maxlength: { + type: Number, + value: -1, + }, /** 占位符 */ placeholder: { type: String, value: '', }, - /** 右侧图标 */ - rightIcon: { + /** 指定 placeholder 的样式类 */ + placeholderClass: { type: String, - value: 'close-circle-filled', + value: 'input-placeholder', + }, + /** 指定 placeholder 的样式 */ + placeholderStyle: { + type: String, + value: '', + }, + /** 预览结果列表 */ + resultList: { + type: Array, + value: [], + }, + /** 光标结束位置,自动聚集时有效,需与 selection-start 搭配使用 */ + selectionEnd: { + type: Number, + value: -1, + }, + /** 光标起始位置,自动聚集时有效,需与 selection-end 搭配使用 */ + selectionStart: { + type: Number, + value: -1, }, /** 搜索框形状 */ shape: { type: String, value: 'square', }, - /** 值 */ - value: { + /** 自定义组件样式 */ + style: { type: String, value: '', }, - /** 是否启用清除控件 */ - clearable: { - type: Boolean, - value: true, - }, - /** 控制拉起的键盘类型 */ + /** 拉起键盘的类型 */ type: { type: String, value: 'text', }, + /** 值 */ + value: { + type: String, + value: '', + }, }; export default props; diff --git a/src/search/search.json b/src/search/search.json index f783dae79..ed5b2b621 100644 --- a/src/search/search.json +++ b/src/search/search.json @@ -2,6 +2,7 @@ "component": true, "styleIsolation": "apply-shared", "usingComponents": { - "t-icon": "../icon/icon" + "t-icon": "../icon/icon", + "t-cell": "../cell/cell" } } diff --git a/src/search/search.less b/src/search/search.less index 930b3e451..cd2c0bcd9 100644 --- a/src/search/search.less +++ b/src/search/search.less @@ -12,6 +12,7 @@ @search-round-radius: calc(@search-height / 2); @search-action-color: var(--td-search-action-color, @brand-color); @search-clear-icon-color: var(--td-search-clear-icon-color, @text-color-placeholder); +@search-result-high-light-color: var(--td-search-result-high-light-color, @brand-color); .@{prefix}-search { display: flex; @@ -84,4 +85,17 @@ text-align: center; } } + &__result-item { + &--highLight { + color: @search-result-high-light-color; + } + } + + &__result-list &__result-item { + padding-left: 0; + + &::after { + left: 0; + } + } } diff --git a/src/search/search.ts b/src/search/search.ts index 87bebfb11..fe82fca93 100644 --- a/src/search/search.ts +++ b/src/search/search.ts @@ -23,24 +23,49 @@ export default class Search extends SuperComponent { properties = props; - observers = {}; + observers = { + resultList(val) { + const { isSelected } = this.data; + if (val.length) { + if (isSelected) { + // 已选择 + this.setData({ + isShowResultList: false, + isSelected: false, + }); + } else { + this.setData({ + isShowResultList: true, + }); + } + } else { + this.setData({ + isShowResultList: false, + }); + } + }, + }; data = { classPrefix: name, prefix, + isShowResultList: false, + isSelected: false, }; onInput(e) { let { value } = e.detail; const { maxcharacter } = this.properties; - if (maxcharacter && typeof maxcharacter === 'number' && maxcharacter > 0) { const { characters } = getCharacterLength('maxcharacter', value, maxcharacter); value = characters; } - this.setData({ value }); + this.setData({ + value, + }); + this.triggerEvent('change', { value }); } @@ -59,6 +84,7 @@ export default class Search extends SuperComponent { handleClear() { this.setData({ value: '' }); this.triggerEvent('clear', { value: '' }); + this.triggerEvent('change', { value: '' }); } onConfirm(e) { @@ -69,4 +95,16 @@ export default class Search extends SuperComponent { onActionClick() { this.triggerEvent('action-click'); } + + onSelectResultItem(e) { + const { index } = e.currentTarget.dataset; + const item = this.properties.resultList[index]; + this.setData({ + value: item, + isSelected: true, + }); + + this.triggerEvent('change', { value: item }); + this.triggerEvent('selectresult', { index, item }); + } } diff --git a/src/search/search.wxml b/src/search/search.wxml index edb5a3ff2..7d393e77c 100644 --- a/src/search/search.wxml +++ b/src/search/search.wxml @@ -1,4 +1,5 @@ + + + + + + + diff --git a/src/search/search.wxs b/src/search/search.wxs new file mode 100644 index 000000000..ac86989cc --- /dev/null +++ b/src/search/search.wxs @@ -0,0 +1,6 @@ +var highLight = function (label, keyword) { + return label.replace(keyword, '' + keyword + ''); +}; +module.exports = { + highLight: highLight, +}; diff --git a/src/search/type.ts b/src/search/type.ts index 0ce847c52..574c24977 100644 --- a/src/search/type.ts +++ b/src/search/type.ts @@ -5,14 +5,6 @@ * */ export interface TdSearchProps { - /** - * 自定义组件样式 - * @default '' - */ - style?: { - type: StringConstructor; - value?: string; - }; /** * 自定义右侧操作按钮文字 * @default '' @@ -22,169 +14,162 @@ export interface TdSearchProps { value?: string; }; /** - * 是否居中 - * @default false + * 键盘弹起时,是否自动上推页面 + * @default true */ - center?: { + adjustPosition?: { type: BooleanConstructor; value?: boolean; }; /** - * 是否禁用 + * 强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效) * @default false */ - disabled?: { + alwaysEmbed?: { type: BooleanConstructor; value?: boolean; }; /** - * 组件外部样式类名,分别用于设置组件外层类名、输入框类名、输入框容器类名、右侧 cancel 文本类名、左侧图标类名、右侧图标类型 + * 是否居中 + * @default false */ - externalClasses?: { - type: ArrayConstructor; - value?: ['t-class', 't-class-input', 't-class-input-container', 't-class-cancel', 't-class-left', 't-class-right']; + center?: { + type: BooleanConstructor; + value?: boolean; }; /** - * 指定光标与键盘的距离,取 input 距离底部的距离和 cursor-spacing 指定的距离的最小值作为光标与键盘的距离 - * @default 0 + * 是否启用清除控件 + * @default true */ - cursorSpacing?: { - type: NumberConstructor; - value?: number; + clearable?: { + type: BooleanConstructor; + value?: boolean; }; /** - * 是否聚焦 + * 点击键盘右下角按钮时是否保持键盘不收起 * @default false */ - focus?: { + confirmHold?: { type: BooleanConstructor; value?: boolean; }; /** - * 左侧文本 - * @default '' + * 设置键盘右下角按钮的文字,仅在type='text'时生效。
具体释义:
`send` 右下角按钮为“发送”;
`search` 右下角按钮为“搜索”;
`next` 右下角按钮为“下一个”;
`go` 右下角按钮为“前往”;
`done` 右下角按钮为“完成”。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/input.html) + * @default search */ - label?: { + confirmType?: { type: StringConstructor; - value?: string; + value?: 'send' | 'search' | 'next' | 'go' | 'done'; }; /** - * 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度。`maxcharacter` 和 `maxlength` 二选一使用 + * 指定 focus 时的光标位置 */ - maxcharacter?: { + cursor: { type: NumberConstructor; value?: number; }; /** - * 用户最多可以输入的文本长度,一个中文等于一个计数长度,默认为 -1,不限制输入长度。`maxcharacter` 和 `maxlength` 二选一使用 - * @default -1 + * 搜索框聚焦时底部与键盘的距离 + * @default 0 */ - maxlength?: { + cursorSpacing?: { type: NumberConstructor; value?: number; }; /** - * 设置键盘右下角按钮的文字,仅在type='text'时生效。
具体释义:
`send` 右下角按钮为“发送”;
`search` 右下角按钮为“搜索”;
`next` 右下角按钮为“下一个”;
`go` 右下角按钮为“前往”;
`done` 右下角按钮为“完成”。
[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/input.html) - * @default search + * 是否禁用 + * @default false */ - confirmType?: { - type: StringConstructor; - value?: 'send' | 'search' | 'next' | 'go' | 'done'; + disabled?: { + type: BooleanConstructor; + value?: boolean; }; /** - * 强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效) + * 是否聚焦 * @default false */ - alwaysEmbed?: { + focus?: { type: BooleanConstructor; value?: boolean; }; /** - * 点击键盘右下角按钮时是否保持键盘不收起 + * focus时,点击页面的时候不收起键盘 * @default false */ - confirmHold?: { + holdKeyboard?: { type: BooleanConstructor; value?: boolean; }; /** - * 指定focus时的光标位置 + * 左侧图标 + * @default 'search' */ - cursor: { - type: NumberConstructor; - value?: number; + leftIcon?: { + type: StringConstructor; + value?: string; }; /** - * 光标起始位置,自动聚集时有效,需与selection-end搭配使用 - * @default -1 + * 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度。`maxcharacter` 和 `maxlength` 二选一使用 */ - selectionStart?: { + maxcharacter?: { type: NumberConstructor; value?: number; }; /** - * 光标结束位置,自动聚集时有效,需与selection-start搭配使用 + * 用户最多可以输入的文本长度,一个中文等于一个计数长度。默认为 -1,不限制输入长度。`maxcharacter` 和 `maxlength` 二选一使用 * @default -1 */ - selectionEnd?: { + maxlength?: { type: NumberConstructor; value?: number; }; /** - * 键盘弹起时,是否自动上推页面 - * @default true - */ - adjustPosition?: { - type: BooleanConstructor; - value?: boolean; - }; - /** - * focus时,点击页面的时候不收起键盘 - * @default false - */ - holdKeyboard?: { - type: BooleanConstructor; - value?: boolean; - }; - /** - * 指定 placeholder 的样式 + * 占位符 * @default '' */ - placeholderStyle: { + placeholder?: { type: StringConstructor; value?: string; }; /** * 指定 placeholder 的样式类 - * @default '' + * @default input-placeholder */ placeholderClass?: { type: StringConstructor; value?: string; }; /** - * 左侧图标 - * @default 'search' + * 指定 placeholder 的样式 + * @default '' */ - leftIcon?: { + placeholderStyle: { type: StringConstructor; value?: string; }; /** - * 占位符 - * @default '' + * 预览结果列表 + * @default [] */ - placeholder?: { - type: StringConstructor; - value?: string; + resultList?: { + type: ArrayConstructor; + value?: Array; }; /** - * 右侧图标 - * @default 'close' + * 光标结束位置,自动聚集时有效,需与 selection-start 搭配使用 + * @default -1 */ - rightIcon?: { - type: StringConstructor; - value?: string; + selectionEnd?: { + type: NumberConstructor; + value?: number; + }; + /** + * 光标起始位置,自动聚集时有效,需与 selection-end 搭配使用 + * @default -1 + */ + selectionStart?: { + type: NumberConstructor; + value?: number; }; /** * 搜索框形状 @@ -195,26 +180,26 @@ export interface TdSearchProps { value?: 'square' | 'round'; }; /** - * 值 + * 自定义组件样式 * @default '' */ - value?: { + style?: { type: StringConstructor; value?: string; }; /** - * 是否启用清除控件 - * @default true + * 拉起键盘的类型 + * @default 'text' */ - clearable: { - type: BooleanConstructor; - value?: boolean; + type?: { + type: StringConstructor; + value?: 'text' | 'number' | 'idcard' | 'digit' | 'nickname'; }; /** - * 可以控制拉起的键盘类型 - * @default 'text' + * 值 + * @default '' */ - type: { + value?: { type: StringConstructor; value?: string; };