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

@@ -16,16 +16,16 @@ const collapsed = defineModel({ default: false });
const resetButtonOptions = computed(() => {
return {
content: `${$t.value('reset')}`,
show: true,
text: `${$t.value('reset')}`,
...unref(rootProps).resetButtonOptions,
};
});
const submitButtonOptions = computed(() => {
return {
content: `${$t.value('submit')}`,
show: true,
text: `${$t.value('submit')}`,
...unref(rootProps).submitButtonOptions,
};
});
@@ -91,7 +91,7 @@ watch(
@click="handleReset"
v-bind="resetButtonOptions"
>
{{ resetButtonOptions.text }}
{{ resetButtonOptions.content }}
</component>
<component
@@ -101,7 +101,7 @@ watch(
@click="handleSubmit"
v-bind="submitButtonOptions"
>
{{ submitButtonOptions.text }}
{{ submitButtonOptions.content }}
</component>
<VbenExpandableArrow

View File

@@ -289,8 +289,8 @@ export interface FormRenderProps<
}
export interface ActionButtonOptions extends VbenButtonProps {
content?: string;
show?: boolean;
text?: string;
}
export interface VbenFormProps<