格式化代码
All checks were successful
/ test (push) Successful in 27s
/ surge (push) Successful in 39s

This commit is contained in:
严浩
2024-11-26 09:17:20 +08:00
parent 8a1e055462
commit 8746997d36
5 changed files with 10 additions and 8 deletions

View File

@ -11,14 +11,16 @@
:key="message.key"
:id="`${context.id}-${message.key}`"
:data-message-type="message.type"
>{{ message.value }}</li>
>
{{ message.value }}
</li>
</ul>
<!-- </template> -->
</Message>
</template>
<script setup lang="ts">
import { FormKitFrameworkContext } from '@formkit/core';
import { type FormKitFrameworkContext } from '@formkit/core';
import Message from 'primevue/message';
defineProps<{ context: FormKitFrameworkContext }>();
</script>

View File

@ -1,4 +1,4 @@
import { FormKitTypeDefinition } from '@formkit/core';
import type { FormKitTypeDefinition } from '@formkit/core';
import { actions, submitInput, forms, disablesChildren, createSection } from '@formkit/inputs';
import { messages } from '../sections/messages';
import PButton from 'primevue/button';
@ -24,7 +24,7 @@ export const form: FormKitTypeDefinition = {
messages(),
actions(submitInput()),
createSection('button', () => ({
$cmp: markRaw(PButton) as any,
$cmp: markRaw(PButton) as never,
bind: '$submitAttrs',
props: {
type: 'submit',

View File

@ -1,4 +1,4 @@
import { FormKitTypeDefinition } from '@formkit/core';
import type { FormKitTypeDefinition } from '@formkit/core';
import type { FormKitInputs } from '@formkit/inputs';
import { casts, createSection, label, outer } from '@formkit/inputs';
import SchemaComponent from 'primevue/password';
@ -10,7 +10,7 @@ export const PInputPassword: FormKitTypeDefinition = {
schema: outer(
label('$label'),
createSection('input', () => ({
$cmp: markRaw(SchemaComponent) as any,
$cmp: markRaw(SchemaComponent) as never,
bind: '$attrs',
props: {
invalid: '$state.invalid',

View File

@ -1,4 +1,4 @@
import { FormKitTypeDefinition } from '@formkit/core';
import type { FormKitTypeDefinition } from '@formkit/core';
import type { FormKitInputs } from '@formkit/inputs';
import { casts, createSection, label, outer } from '@formkit/inputs';
import SchemaComponent from 'primevue/inputtext';

View File

@ -3,7 +3,7 @@ import { createSection } from '@formkit/inputs';
import { markRaw } from 'vue';
export const messages = createSection('messages', () => ({
$cmp: markRaw(MessagesCmp) as any, // [element = node.$cmp](https://github.com/formkit/formkit/blob/2d5387ba98597775cb2a752af65aee84bc438863/packages/vue/src/FormKitSchema.ts#L449)
$cmp: markRaw(MessagesCmp) as unknown as never, // [element = node.$cmp](https://github.com/formkit/formkit/blob/2d5387ba98597775cb2a752af65aee84bc438863/packages/vue/src/FormKitSchema.ts#L449)
props: { context: '$node.context' },
if: '$defaultMessagePlacement && $fns.length($messages)',
}));