diff --git a/apps/web-antd/src/adapter/component/index.ts b/apps/web-antd/src/adapter/component/index.ts index 36ac97f92..9aa3c0043 100644 --- a/apps/web-antd/src/adapter/component/index.ts +++ b/apps/web-antd/src/adapter/component/index.ts @@ -702,7 +702,7 @@ async function initComponentAdapter() { DatePicker, // 自定义默认按钮 DefaultButton: (props, { attrs, slots }) => { - return h(Button, { ...props, attrs, type: 'default' }, slots); + return h(Button, { ...props, ...attrs, type: 'default' }, slots); }, Divider, IconPicker: withDefaultPlaceholder(IconPicker, 'select', { @@ -718,7 +718,7 @@ async function initComponentAdapter() { Mentions: withDefaultPlaceholder(Mentions, 'input'), // 自定义主要按钮 PrimaryButton: (props, { attrs, slots }) => { - return h(Button, { ...props, attrs, type: 'primary' }, slots); + return h(Button, { ...props, ...attrs, type: 'primary' }, slots); }, Radio, RadioGroup, diff --git a/apps/web-antdv-next/src/adapter/component/index.ts b/apps/web-antdv-next/src/adapter/component/index.ts index 74f89517d..721a93e7d 100644 --- a/apps/web-antdv-next/src/adapter/component/index.ts +++ b/apps/web-antdv-next/src/adapter/component/index.ts @@ -716,7 +716,7 @@ async function initComponentAdapter() { DatePicker, // 自定义默认按钮 DefaultButton: (props, { attrs, slots }) => { - return h(Button, { ...props, attrs, type: 'default' }, slots); + return h(Button, { ...props, ...attrs, type: 'default' }, slots); }, Divider, IconPicker: withDefaultPlaceholder(IconPicker, 'select', { @@ -732,7 +732,7 @@ async function initComponentAdapter() { Mentions: withDefaultPlaceholder(Mentions, 'input'), // 自定义主要按钮 PrimaryButton: (props, { attrs, slots }) => { - return h(Button, { ...props, attrs, type: 'primary' }, slots); + return h(Button, { ...props, ...attrs, type: 'primary' }, slots); }, Radio, RadioGroup, diff --git a/apps/web-ele/src/adapter/component/index.ts b/apps/web-ele/src/adapter/component/index.ts index 34fea138d..dca63d02e 100644 --- a/apps/web-ele/src/adapter/component/index.ts +++ b/apps/web-ele/src/adapter/component/index.ts @@ -319,11 +319,11 @@ async function initComponentAdapter() { // 自定义默认按钮 DefaultButton: (props, { attrs, slots }) => { // 调整 type 为 default ,info 有点丑 - return h(ElButton, { ...props, attrs, type: 'default' }, slots); + return h(ElButton, { ...props, ...attrs, type: 'default' }, slots); }, // 自定义主要按钮 PrimaryButton: (props, { attrs, slots }) => { - return h(ElButton, { ...props, attrs, type: 'primary' }, slots); + return h(ElButton, { ...props, ...attrs, type: 'primary' }, slots); }, Divider: ElDivider, IconPicker: withDefaultPlaceholder(IconPicker, 'select', { @@ -356,7 +356,7 @@ async function initComponentAdapter() { ); }, Select: (props, { attrs, slots }) => { - return h(ElSelectV2, { ...props, attrs }, slots); + return h(ElSelectV2, { ...props, ...attrs }, slots); }, Space: ElSpace, Switch: ElSwitch, diff --git a/apps/web-naive/src/adapter/component/index.ts b/apps/web-naive/src/adapter/component/index.ts index f6769f25f..d1c8a0771 100644 --- a/apps/web-naive/src/adapter/component/index.ts +++ b/apps/web-naive/src/adapter/component/index.ts @@ -221,11 +221,11 @@ async function initComponentAdapter() { DatePicker: NDatePicker, // 自定义默认按钮 DefaultButton: (props, { attrs, slots }) => { - return h(NButton, { ...props, attrs, type: 'default' }, slots); + return h(NButton, { ...props, ...attrs, type: 'default' }, slots); }, // 自定义主要按钮 PrimaryButton: (props, { attrs, slots }) => { - return h(NButton, { ...props, attrs, type: 'primary' }, slots); + return h(NButton, { ...props, ...attrs, type: 'primary' }, slots); }, Divider: NDivider, IconPicker: withDefaultPlaceholder(IconPicker, 'select', { diff --git a/apps/web-tdesign/src/adapter/component/index.ts b/apps/web-tdesign/src/adapter/component/index.ts index 37a3055e7..02bb7dd34 100644 --- a/apps/web-tdesign/src/adapter/component/index.ts +++ b/apps/web-tdesign/src/adapter/component/index.ts @@ -228,7 +228,7 @@ async function initComponentAdapter() { } return h( Button, - { ...props, ghost, variant, attrs, theme: 'default' }, + { ...props, ...attrs, ghost, variant, theme: 'default' }, slots, ); }, @@ -254,7 +254,7 @@ async function initComponentAdapter() { } return h( Button, - { ...props, ghost, variant, attrs, theme: 'primary' }, + { ...props, ...attrs, ghost, variant, theme: 'primary' }, slots, ); }, @@ -263,7 +263,7 @@ async function initComponentAdapter() { RangePicker: (props, { attrs, slots }) => { return h( RangePicker, - { ...props, modelValue: props.modelValue ?? [], attrs }, + { ...props, ...attrs, modelValue: props.modelValue ?? [] }, slots, ); },