mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-23 23:19:15 +08:00
fix(Search): inherit style/class
This commit is contained in:
parent
47cb515979
commit
742872a4aa
@ -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)}>
|
||||
|
Loading…
x
Reference in New Issue
Block a user