Refactor #6601
parent
daffb1b4f3
commit
e8882ac9f7
|
@ -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'])
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -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
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue