refactor: change the form button field from text to content to prevent conflicts with the frame (#4586)

* refactor: change the form button field from text to content to prevent conflicts with the frame
This commit is contained in:
Vben
2024-10-07 16:30:41 +08:00
committed by GitHub
parent ab44926ec8
commit 2d019b3c8a
7 changed files with 13 additions and 17 deletions

View File

@@ -62,15 +62,11 @@ setupVbenForm<FormComponentType>({
DatePicker: NDatePicker,
// 自定义默认的重置按钮
DefaultResetActionButton: (props, { attrs, slots }) => {
return h(NButton, { ...props, attrs, text: false, type: 'info' }, slots);
return h(NButton, { ...props, attrs, type: 'info' }, slots);
},
// 自定义默认的提交按钮
DefaultSubmitActionButton: (props, { attrs, slots }) => {
return h(
NButton,
{ ...props, attrs, text: false, type: 'primary' },
slots,
);
return h(NButton, { ...props, attrs, type: 'primary' }, slots);
},
Divider: NDivider,
Input: withDefaultPlaceholder(NInput, 'input'),