mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-25 19:06:36 +08:00
[bugfix] Search: should inherit class & style (#3037)
This commit is contained in:
parent
01ef298abc
commit
2a4c2d86e9
@ -1,5 +1,5 @@
|
|||||||
import { use } from '../utils';
|
import { use } from '../utils';
|
||||||
import { emit } from '../utils/functional';
|
import { inherit, emit } from '../utils/functional';
|
||||||
import Field from '../field';
|
import Field from '../field';
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
@ -78,10 +78,14 @@ function Search(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const inheritData = inherit(ctx);
|
||||||
|
delete inheritData.attrs;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
class={bem({ 'show-action': props.showAction })}
|
class={bem({ 'show-action': props.showAction })}
|
||||||
style={{ background: props.background }}
|
style={{ background: props.background }}
|
||||||
|
{...inheritData}
|
||||||
>
|
>
|
||||||
<div class={bem('content', props.shape)}>
|
<div class={bem('content', props.shape)}>
|
||||||
{Label()}
|
{Label()}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user