From 5ef53f25e02cbdf85dfeaa57c4e688292074a940 Mon Sep 17 00:00:00 2001 From: landluck Date: Wed, 14 Dec 2022 10:12:32 +0800 Subject: [PATCH] fix(search): optimize the Cancel button click area (#5148) * fix(search): optimize the Cancel button click area * test(search): fix test case failed --- packages/search/index.less | 5 ++++- packages/search/index.wxml | 2 +- packages/search/test/__snapshots__/demo.spec.ts.snap | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/search/index.less b/packages/search/index.less index 5fc44e05..3b7fd8a4 100644 --- a/packages/search/index.less +++ b/packages/search/index.less @@ -38,7 +38,6 @@ } &__action { - padding: var(--search-action-padding, @search-action-padding); font-size: var(--search-action-font-size, @search-action-font-size); line-height: var(--search-input-height, @search-input-height); color: var(--search-action-text-color, @search-action-text-color); @@ -46,5 +45,9 @@ &--hover { background-color: @active-color; } + + &-button { + padding: var(--search-action-padding, @search-action-padding); + } } } diff --git a/packages/search/index.wxml b/packages/search/index.wxml index 0068cfe7..e772ee4b 100644 --- a/packages/search/index.wxml +++ b/packages/search/index.wxml @@ -48,6 +48,6 @@ hover-stay-time="70" > - {{ actionText }} + {{ actionText }} diff --git a/packages/search/test/__snapshots__/demo.spec.ts.snap b/packages/search/test/__snapshots__/demo.spec.ts.snap index cc72ecb9..e5e7fe89 100644 --- a/packages/search/test/__snapshots__/demo.spec.ts.snap +++ b/packages/search/test/__snapshots__/demo.spec.ts.snap @@ -222,7 +222,7 @@ exports[`should render demo and match snapshot 1`] = ` hoverStayTime="70" > 取消