Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
feat: actions 增加slot 'actions-prefix','actions-suffix'
Browse files Browse the repository at this point in the history
  • Loading branch information
jinmao88 committed Feb 7, 2023
1 parent aebbe28 commit e27bd27
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/vbenComponents/src/form/src/Form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,11 @@ onMounted(() => {
v-if="innerProps?.schemas.length > 0 && innerProps.actions"
v-bind="innerProps.actionsProps"
>
<slot name="actions">
<slot name="actions-prefix" v-bind="FormMethod || {}"></slot>
<slot name="actions" v-bind="FormMethod || {}">
<VbenButtonGroup
><VbenButton type="error" @click="formRef.restoreValidation">{{
innerProps.actionsProps.cancelText || '取消'
innerProps.actionsProps.cancelText || '重置'
}}</VbenButton>
<VbenButton
type="primary"
Expand All @@ -174,6 +175,7 @@ onMounted(() => {
></VbenButtonGroup
>
</slot>
<slot name="actions-suffix" v-bind="FormMethod || {}"></slot>
</VbenGridItem>
</VbenGrid>
</Form>
Expand Down

0 comments on commit e27bd27

Please sign in to comment.