mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-24 07:29:16 +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 = {
|
const fieldData = {
|
||||||
...this.$attrs,
|
...this.$attrs,
|
||||||
|
style: null,
|
||||||
|
class: null,
|
||||||
onKeypress(event) {
|
onKeypress(event) {
|
||||||
// press enter
|
// press enter
|
||||||
if (event.keyCode === 13) {
|
if (event.keyCode === 13) {
|
||||||
@ -86,8 +88,8 @@ export default createComponent({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
class={bem({ 'show-action': props.showAction })}
|
class={[bem({ 'show-action': props.showAction }), this.$attrs.class]}
|
||||||
style={{ background: props.background }}
|
style={{ background: props.background, ...this.$attrs.style }}
|
||||||
>
|
>
|
||||||
{slots.left?.()}
|
{slots.left?.()}
|
||||||
<div class={bem('content', props.shape)}>
|
<div class={bem('content', props.shape)}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user