pull/6697/head
Mert Sincan 2024-10-31 13:14:27 +00:00
parent daffb1b4f3
commit e8882ac9f7
3 changed files with 15 additions and 3 deletions

View File

@ -1,5 +1,5 @@
<template>
<form @submit.prevent="onSubmit" v-bind="ptmi('root')">
<form @submit.prevent="onSubmit" :class="cx('root')" v-bind="ptmi('root')">
<slot :register :valid :reset v-bind="states" />
</form>
</template>
@ -30,7 +30,7 @@ export default {
return {
register,
onSubmit,
...omit($form, ['defineField', 'handleSubmit'])
...omit($form, ['handleSubmit'])
};
}
};

View File

@ -7,4 +7,11 @@
*/
import type { BaseStyle } from '@primevue/core/base/style';
export enum FormClasses {
/**
* The class of root element
*/
root = 'p-form'
}
export interface FormStyle extends BaseStyle {}

View File

@ -1,5 +1,10 @@
import BaseStyle from '@primevue/core/base/style';
const classes = {
root: 'p-form p-component'
};
export default BaseStyle.extend({
name: 'form'
name: 'form',
classes
});