File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,8 @@ provide(formContext, {
9595 errors ,
9696 /** 必填字段列表 */
9797 requiredKeys ,
98+ labelWidth : () => props .labelWidth ,
99+ labelPosition : () => props .labelPosition ,
98100});
99101
100102provide (formDisabledContext , () => props .disabled );
Original file line number Diff line number Diff line change 2020<script setup lang="ts">
2121import { Ref , computed , inject , provide } from ' vue' ;
2222import { formContext , formItemDisabledContext } from ' ../../utils/constant' ;
23+ import type { MaybeRefOrGetter } from ' vue' ;
2324
2425const props = withDefaults (
2526 defineProps <{
@@ -44,9 +45,13 @@ const props = withDefaults(
4445const defaultFormCtx: {
4546 errors? : Ref <Record <string , any >>;
4647 requiredKeys? : Ref <string []>;
48+ labelWidth: MaybeRefOrGetter <string | undefined >;
49+ labelPosition: MaybeRefOrGetter <' left' | ' right' | ' top' | undefined >;
4750} = {
4851 errors: undefined ,
4952 requiredKeys: undefined ,
53+ labelWidth : () => undefined ,
54+ labelPosition : () => undefined ,
5055};
5156let { errors, requiredKeys } = inject (formContext , defaultFormCtx );
5257
You can’t perform that action at this time.
0 commit comments