feat: 优化 PInputPassword 组件,直接使用 SchemaComponent,移除不必要的组件名称定义
All checks were successful
/ test (push) Successful in 26s
/ surge (push) Successful in 38s

This commit is contained in:
严浩
2024-11-25 15:03:59 +08:00
parent 0f45fcbf25
commit e4907efab5

View File

@ -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',
};