floatLabel
All checks were successful
/ test (push) Successful in 26s
/ surge (push) Successful in 40s

This commit is contained in:
严浩
2024-11-26 10:53:12 +08:00
parent 20ce563e32
commit 7d850957a6
9 changed files with 70 additions and 137 deletions

View File

@ -4,29 +4,35 @@ import { casts, createSection, label, outer } from '@formkit/inputs';
import SchemaComponent from 'primevue/password';
import { markRaw } from 'vue';
import { messages } from '../sections/messages';
import { floatLabel } from '../sections/floatLabel';
const input = createSection('input', () => ({
$cmp: markRaw(SchemaComponent) as never,
bind: '$attrs',
props: {
invalid: '$state.invalid',
disabled: '$disabled',
// name: '$node.name',
// inputProps: {}
onInput: '$handlers.DOMInput',
onBlur: '$handlers.blur',
modelValue: '$_value',
inputId: '$id',
fluid: true,
},
}));
export const PInputPassword: FormKitTypeDefinition = {
type: 'input',
schema: outer(
label('$label'),
createSection('input', () => ({
$cmp: markRaw(SchemaComponent) as never,
bind: '$attrs',
props: {
invalid: '$state.invalid',
disabled: '$disabled',
// name: '$node.name',
// inputProps: {}
onInput: '$handlers.DOMInput',
onBlur: '$handlers.blur',
modelValue: '$_value',
inputId: '$id',
},
}))(),
floatLabel(
input(), //
label('$label'),
),
messages(),
),
features: [casts],
// schemaMemoKey: 'g2f31c24kjh',
// schemaMemoKey: 'g2f31c24kjh', // Math.random().toString(36).substring(2, 15)
};
declare module '@formkit/inputs' {