diff --git a/src/search/Search.tsx b/src/search/Search.tsx index 7c6989bbc..685a93da1 100644 --- a/src/search/Search.tsx +++ b/src/search/Search.tsx @@ -103,6 +103,7 @@ export default defineComponent({ v-slots={pick(slots, ['left-icon', 'right-icon'])} ref={filedRef} type="search" + class={bem('field')} border={false} onKeypress={onKeypress} {...fieldAttrs} diff --git a/src/search/index.less b/src/search/index.less index c12269149..e80339f50 100644 --- a/src/search/index.less +++ b/src/search/index.less @@ -40,12 +40,12 @@ line-height: var(--van-search-input-height); } - .van-cell { + &__field { flex: 1; padding: 5px var(--van-padding-xs) 5px 0; background-color: transparent; - &__left-icon { + .van-field__left-icon { color: var(--van-search-left-icon-color); } } diff --git a/src/search/test/__snapshots__/demo.spec.ts.snap b/src/search/test/__snapshots__/demo.spec.ts.snap index b26658344..1ded04c5a 100644 --- a/src/search/test/__snapshots__/demo.spec.ts.snap +++ b/src/search/test/__snapshots__/demo.spec.ts.snap @@ -4,7 +4,7 @@ exports[`should render demo and match snapshot 1`] = `