fix(Search): inherit style/class

This commit is contained in:
chenjiahan 2020-08-17 20:17:50 +08:00
parent 47cb515979
commit 742872a4aa

View File

@ -74,6 +74,8 @@ export default createComponent({
const fieldData = {
...this.$attrs,
style: null,
class: null,
onKeypress(event) {
// press enter
if (event.keyCode === 13) {
@ -86,8 +88,8 @@ export default createComponent({
return (
<div
class={bem({ 'show-action': props.showAction })}
style={{ background: props.background }}
class={[bem({ 'show-action': props.showAction }), this.$attrs.class]}
style={{ background: props.background, ...this.$attrs.style }}
>
{slots.left?.()}
<div class={bem('content', props.shape)}>