@aspire-ui/element-component-pro 1.0.14 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,8 +19,17 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
19
19
  labelField: string;
20
20
  valueField: string;
21
21
  lazy: boolean;
22
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
22
+ }>, {
23
+ options: import('vue').Ref<{
24
+ label: string;
25
+ value: unknown;
26
+ }[]>;
27
+ rawOptions: import('vue').Ref<unknown[]>;
28
+ loading: import('vue').Ref<boolean>;
29
+ fetchOptions: () => Promise<void>;
30
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
31
  input: (value: unknown) => void;
32
+ change: (value: unknown) => void;
24
33
  }, string, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
25
34
  value?: unknown;
26
35
  /** 拉取选项的接口,返回 Promise<Array<{ label, value }>> 或 { list: [] };可接收当前 params 作为参数 */
@@ -1,3 +1,4 @@
1
+ import { ComponentPublicInstance } from 'vue';
1
2
  import { ProFormSchema, ProFormProps, FormActionType, ColEx, ScrollToFieldOptions, FormListeners } from '../types';
2
3
 
3
4
  declare function __VLS_template(): Partial<Record<string, (_: {
@@ -112,11 +113,12 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
112
113
  };
113
114
  submitOnReset: boolean;
114
115
  }>, {
116
+ registerFieldInstance: (field: string, instance: Record<string, unknown> | null) => void;
115
117
  getFieldsValue: () => Record<string, unknown>;
116
118
  setFieldsValue: (values: Record<string, unknown>) => Promise<void>;
117
119
  resetFields: () => Promise<void>;
118
120
  validate: (nameList?: string[]) => Promise<unknown>;
119
- validateFields: (nameList?: string[]) => Promise<unknown>;
121
+ validateFields: (nameList? /** 自定义组件映射(组件名 -> 组件),供 schema.component 使用 */: string[]) => Promise<unknown>;
120
122
  submit: () => Promise<void>;
121
123
  scrollToField: (name: string, options?: ScrollToFieldOptions) => Promise<void>;
122
124
  clearValidate: (name?: string | string[]) => void;
@@ -124,6 +126,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
124
126
  appendSchemaByField: (schema: ProFormSchema, prefixField?: string, first?: boolean) => Promise<void>;
125
127
  removeSchemaByField: (field: string | string[]) => Promise<void>;
126
128
  setProps: (props: Partial<ProFormProps>) => Promise<void>;
129
+ getComponentInstance: (field: string) => ComponentPublicInstance | null;
130
+ getFieldOptions: import('..').GetFieldOptions;
131
+ isFieldLoading: (field: string) => boolean;
127
132
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
128
133
  submit: (values: Record<string, unknown>) => void;
129
134
  reset: () => void;
@@ -18,6 +18,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRu
18
18
  onFieldChange?: (field: string, value: unknown) => void;
19
19
  /** 自定义组件映射(由 ProForm 传入) */
20
20
  customComponents?: Record<string, unknown>;
21
+ /** 注册字段实例(由 ProForm 传入) */
22
+ registerFieldInstance?: (field: string, instance: Record<string, unknown> | null) => void;
21
23
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
22
24
  schema: ProFormSchema;
23
25
  formModel: Record<string, unknown>;
@@ -28,6 +30,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRu
28
30
  onFieldChange?: (field: string, value: unknown) => void;
29
31
  /** 自定义组件映射(由 ProForm 传入) */
30
32
  customComponents?: Record<string, unknown>;
33
+ /** 注册字段实例(由 ProForm 传入) */
34
+ registerFieldInstance?: (field: string, instance: Record<string, unknown> | null) => void;
31
35
  }>>>, {}>;
32
36
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
33
37
  export default _default;
@@ -24,5 +24,8 @@ export interface UseFormReturn {
24
24
  appendSchemaByField: (schema: ProFormSchema, prefixField?: string, first?: boolean) => Promise<void>;
25
25
  removeSchemaByField: (field: string | string[]) => Promise<void>;
26
26
  setProps: (props: Partial<ProFormProps>) => Promise<void>;
27
+ getComponentInstance: FormActionType['getComponentInstance'];
28
+ getFieldOptions: FormActionType['getFieldOptions'];
29
+ isFieldLoading: FormActionType['isFieldLoading'];
27
30
  }
28
31
  export declare function useForm(props?: UseFormPropsReactive): [UseFormReturn['register'], Omit<UseFormReturn, 'register'>];