From 97b17b574983b63c530354482ec85441eb3ee8ec Mon Sep 17 00:00:00 2001 From: anlyyao Date: Thu, 27 Jun 2024 19:26:10 +0800 Subject: [PATCH] fix: fix cr --- src/search/__test__/__snapshots__/demo.test.js.snap | 2 +- src/search/__test__/__snapshots__/index.test.js.snap | 4 ---- src/search/_example/base/index.wxml | 2 +- src/search/search.less | 10 +++++++++- src/search/search.wxml | 5 +++-- src/search/search.wxs | 6 +++--- 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/search/__test__/__snapshots__/demo.test.js.snap b/src/search/__test__/__snapshots__/demo.test.js.snap index 26595e5fe..6d165ba4c 100644 --- a/src/search/__test__/__snapshots__/demo.test.js.snap +++ b/src/search/__test__/__snapshots__/demo.test.js.snap @@ -32,7 +32,7 @@ exports[`Search Search base demo works fine 1`] = ` class="example-search" > diff --git a/src/search/__test__/__snapshots__/index.test.js.snap b/src/search/__test__/__snapshots__/index.test.js.snap index 9371575aa..01d0fd3cc 100644 --- a/src/search/__test__/__snapshots__/index.test.js.snap +++ b/src/search/__test__/__snapshots__/index.test.js.snap @@ -64,10 +64,6 @@ exports[`search Props :base 1`] = ` - `; diff --git a/src/search/_example/base/index.wxml b/src/search/_example/base/index.wxml index e3e61c42c..6c1ae2827 100644 --- a/src/search/_example/base/index.wxml +++ b/src/search/_example/base/index.wxml @@ -3,5 +3,5 @@ - + diff --git a/src/search/search.less b/src/search/search.less index 2840677ae..8c6e53922 100644 --- a/src/search/search.less +++ b/src/search/search.less @@ -85,8 +85,16 @@ } } &__result-item { - &--hightlight { + &--highLight { color: @brand-color; } } + + &__result-list &__result-item { + padding-left: 0; + + &::after { + left: 0; + } + } } diff --git a/src/search/search.wxml b/src/search/search.wxml index bb9ad6cca..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 index ebb8266ee..ac86989cc 100644 --- a/src/search/search.wxs +++ b/src/search/search.wxs @@ -1,6 +1,6 @@ -var hightLight = function (label, keyword) { - return label.replace(keyword, '' + keyword + ''); +var highLight = function (label, keyword) { + return label.replace(keyword, '' + keyword + ''); }; module.exports = { - hightLight: hightLight, + highLight: highLight, };