[bugfix] Search: should inherit class & style (#3037)

This commit is contained in:
neverland 2019-03-22 14:13:08 +08:00 committed by GitHub
parent 01ef298abc
commit 2a4c2d86e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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