style(Search): fix incorrect left icon color (#9100)

This commit is contained in:
neverland 2021-07-23 10:16:58 +08:00 committed by GitHub
parent 11b81c27cd
commit ffa3763e0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 9 deletions

View File

@ -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}

View File

@ -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);
}
}

View File

@ -4,7 +4,7 @@ exports[`should render demo and match snapshot 1`] = `
<div>
<div class="van-search">
<div class="van-search__content van-search__content--square">
<div class="van-cell van-cell--borderless van-field">
<div class="van-cell van-cell--borderless van-field van-search__field">
<div class="van-field__left-icon">
<i class="van-badge__wrapper van-icon van-icon-search">
</i>
@ -25,7 +25,7 @@ exports[`should render demo and match snapshot 1`] = `
<form action="/">
<div class="van-search van-search--show-action">
<div class="van-search__content van-search__content--square">
<div class="van-cell van-cell--borderless van-field">
<div class="van-cell van-cell--borderless van-field van-search__field">
<div class="van-field__left-icon">
<i class="van-badge__wrapper van-icon van-icon-search">
</i>
@ -52,7 +52,7 @@ exports[`should render demo and match snapshot 1`] = `
<div>
<div class="van-search">
<div class="van-search__content van-search__content--square">
<div class="van-cell van-cell--borderless van-field">
<div class="van-cell van-cell--borderless van-field van-search__field">
<div class="van-field__left-icon">
<i class="van-badge__wrapper van-icon van-icon-search">
</i>
@ -72,7 +72,7 @@ exports[`should render demo and match snapshot 1`] = `
<div>
<div class="van-search">
<div class="van-search__content van-search__content--square">
<div class="van-cell van-cell--borderless van-field van-field--disabled">
<div class="van-cell van-cell--borderless van-field van-field--disabled van-search__field">
<div class="van-field__left-icon">
<i class="van-badge__wrapper van-icon van-icon-search">
</i>
@ -95,7 +95,7 @@ exports[`should render demo and match snapshot 1`] = `
style="background: rgb(79, 192, 141);"
>
<div class="van-search__content van-search__content--round">
<div class="van-cell van-cell--borderless van-field">
<div class="van-cell van-cell--borderless van-field van-search__field">
<div class="van-field__left-icon">
<i class="van-badge__wrapper van-icon van-icon-search">
</i>
@ -118,7 +118,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-search__label">
Address
</div>
<div class="van-cell van-cell--borderless van-field">
<div class="van-cell van-cell--borderless van-field van-search__field">
<div class="van-field__left-icon">
<i class="van-badge__wrapper van-icon van-icon-search">
</i>

View File

@ -26,7 +26,7 @@ exports[`should render left slot correctly 1`] = `
<div class="van-search">
Custom Left Content
<div class="van-search__content van-search__content--square">
<div class="van-cell van-cell--borderless van-field">
<div class="van-cell van-cell--borderless van-field van-search__field">
<div class="van-field__left-icon">
<i class="van-badge__wrapper van-icon van-icon-search">
</i>