feat: 优化 PInputPassword 组件,直接使用 SchemaComponent,移除不必要的组件名称定义
This commit is contained in:
@ -5,14 +5,12 @@ import SchemaComponent from 'primevue/password';
|
||||
import { markRaw } from 'vue';
|
||||
import { messages } from '../sections/messages';
|
||||
|
||||
const cmpName = `SchemaComponent${SchemaComponent.name}`;
|
||||
|
||||
export const PInputPassword: FormKitTypeDefinition = {
|
||||
type: 'input',
|
||||
schema: outer(
|
||||
label('$label'),
|
||||
createSection('input', () => ({
|
||||
$cmp: cmpName,
|
||||
$cmp: markRaw(SchemaComponent) as any,
|
||||
bind: '$attrs',
|
||||
props: {
|
||||
invalid: '$state.invalid',
|
||||
@ -27,9 +25,6 @@ export const PInputPassword: FormKitTypeDefinition = {
|
||||
}))(),
|
||||
messages(),
|
||||
),
|
||||
library: {
|
||||
[cmpName]: markRaw(SchemaComponent),
|
||||
},
|
||||
features: [casts],
|
||||
// schemaMemoKey: 'g2f31c24kjh',
|
||||
};
|
||||
|
Reference in New Issue
Block a user