@robot-admin/naive-ui-components 0.7.2 → 0.8.1

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.
Files changed (59) hide show
  1. package/CHANGELOG.md +76 -60
  2. package/dist/C_Form.cjs +1 -1
  3. package/dist/C_Form.d.cts +2 -2
  4. package/dist/C_Form.d.ts +2 -2
  5. package/dist/C_Form.js +1 -1
  6. package/dist/C_Form.js.map +1 -1
  7. package/dist/C_Form2.js +1 -1
  8. package/dist/C_Form2.js.map +1 -1
  9. package/dist/C_Table.js.map +1 -1
  10. package/dist/C_Table2.js +3 -3
  11. package/dist/C_Table2.js.map +1 -1
  12. package/dist/constants.d.ts +4 -4
  13. package/dist/constants2.d.ts +4 -4
  14. package/dist/constants3.d.ts +2 -2
  15. package/dist/constants4.d.ts +3 -3
  16. package/dist/constants5.d.ts +4 -4
  17. package/dist/data.d.ts +2 -2
  18. package/dist/index.cjs +1 -1
  19. package/dist/index.d.cts +2 -2
  20. package/dist/index.d.ts +2 -2
  21. package/dist/index.js +1 -1
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.vue.d.ts +1 -1
  24. package/dist/index10.vue.d.ts +3 -3
  25. package/dist/index11.vue.d.ts +2 -2
  26. package/dist/index12.vue.d.ts +2 -2
  27. package/dist/index13.vue.d.ts +4 -4
  28. package/dist/index14.vue.d.ts +3 -3
  29. package/dist/index15.vue.d.ts +5 -5
  30. package/dist/index16.vue.d.ts +2 -2
  31. package/dist/index17.vue.d.ts +1 -1
  32. package/dist/index18.vue.d.ts +6 -6
  33. package/dist/index2.vue.d.ts +2 -2
  34. package/dist/index20.vue.d.ts +1 -1
  35. package/dist/index21.vue.d.ts +3 -3
  36. package/dist/index22.vue.d.ts +3 -3
  37. package/dist/index24.vue.d.ts +1 -1
  38. package/dist/index26.vue.d.ts +2 -2
  39. package/dist/index27.vue.d.ts +3 -3
  40. package/dist/index28.vue.d.ts +2 -2
  41. package/dist/index4.vue.d.ts +5 -5
  42. package/dist/index6.vue.d.ts +5 -5
  43. package/dist/index7.vue.d.ts +2 -2
  44. package/dist/index9.vue.d.ts +2 -2
  45. package/dist/useCalendarEvents.d.ts +1 -1
  46. package/dist/useCollapsePanel.d.ts +5 -5
  47. package/dist/useCropperCore.d.ts +9 -9
  48. package/dist/useDraggableLayout.d.ts +3 -3
  49. package/dist/useDynamicFormState.d.ts +111 -37
  50. package/dist/useEdgeInteraction.d.ts +1 -1
  51. package/dist/useInfiniteScroll.d.ts +1 -1
  52. package/dist/useQRCode.d.ts +4 -4
  53. package/dist/useSearchState.d.ts +2 -2
  54. package/dist/useSignatureHistory.d.ts +3 -3
  55. package/dist/useSplitResize.d.ts +6 -6
  56. package/dist/useTimeSelection.d.ts +3 -3
  57. package/dist/useTreeOperations.d.ts +4 -4
  58. package/dist/useWorkflowValidation.d.ts +6 -6
  59. package/package.json +1 -1
@@ -1,12 +1,18 @@
1
1
  import * as naive_ui0 from "naive-ui";
2
2
  import * as vue from "vue";
3
3
  import { CSSProperties, Component, ComputedRef, Ref, VNode } from "vue";
4
+ import * as _robot_admin_form_validate0 from "@robot-admin/form-validate";
4
5
  import { FieldRule } from "@robot-admin/form-validate";
5
6
  import { FormInst } from "naive-ui/es";
6
7
  import * as naive_ui_es_form_src_interface0 from "naive-ui/es/form/src/interface";
7
8
  import { FormInst as FormInst$1, FormRules } from "naive-ui/es/form";
8
9
 
9
10
  //#region src/components/C_Form/types.d.ts
11
+ /**
12
+ * 表单模式
13
+ * @description create = 新建(空白表单),edit = 编辑(回填已有数据 + 脏检查)
14
+ */
15
+ type FormMode = "create" | "edit";
10
16
  /**
11
17
  * 支持的布局类型
12
18
  * @description 定义表单支持的所有布局模式
@@ -230,6 +236,18 @@ interface FormOption {
230
236
  required?: boolean;
231
237
  dependsOn?: string | string[];
232
238
  showWhen?: (formModel: Record<string, any>) => boolean;
239
+ /** 字段级禁用(优先级高于全局 config.disabled) */
240
+ disabled?: boolean | ((formModel: Record<string, any>) => boolean);
241
+ /** 字段级只读(优先级高于全局 config.readonly) */
242
+ readonly?: boolean | ((formModel: Record<string, any>) => boolean);
243
+ /** 联动赋值:其他字段变化时自动计算本字段的值 */
244
+ valueWhen?: (formModel: Record<string, any>) => any;
245
+ /** 异步数据源:select / cascader / checkbox / radio 的远程选项加载 */
246
+ asyncOptions?: (formModel: Record<string, any>) => Promise<OptionItem[]>;
247
+ /** 联动校验规则:根据表单数据动态返回校验规则 */
248
+ rulesWhen?: (formModel: Record<string, any>) => FieldRule[];
249
+ /** 跨字段校验:需要引用多个字段值的验证函数,返回错误消息或 null */
250
+ crossFieldValidator?: (formModel: Record<string, any>) => string | null;
233
251
  }
234
252
  /**
235
253
  * 表单提交事件参数
@@ -261,6 +279,16 @@ interface FormInstance {
261
279
  initialize(): void;
262
280
  layoutType: ComputedRef<LayoutType>;
263
281
  shouldShowDefaultActions: ComputedRef<boolean>;
282
+ /** 表单是否被修改过 */
283
+ isDirty: Ref<boolean>;
284
+ /** 获取被修改的字段列表 */
285
+ getChangedFields(): string[];
286
+ /** 检查某字段是否被修改 */
287
+ isFieldDirty(field: string): boolean;
288
+ /** 将当前值设为初始快照(常用于编辑模式加载数据后) */
289
+ markAsClean(): void;
290
+ /** 字段异步选项的 loading 状态 */
291
+ asyncLoadingMap: Ref<Record<string, boolean>>;
264
292
  }
265
293
  /**
266
294
  * 表单数据模型类型(泛型)
@@ -322,7 +350,7 @@ interface FormConfig extends LayoutCallbacks {
322
350
  /** 标签宽度,默认 'auto' */
323
351
  labelWidth?: string | number;
324
352
  /** 尺寸,默认 'medium' */
325
- size?: "small" | "medium" | "large";
353
+ size?: 'small' | 'medium' | 'large';
326
354
  /** 禁用整个表单,默认 false */
327
355
  disabled?: boolean;
328
356
  /** 只读,默认 false */
@@ -331,6 +359,10 @@ interface FormConfig extends LayoutCallbacks {
331
359
  showActions?: boolean;
332
360
  /** 值变化时自动校验,默认 false */
333
361
  validateOnChange?: boolean;
362
+ /** 表单模式:create = 新建(默认),edit = 编辑(配合 initialValues 实现回填 + 脏检查) */
363
+ mode?: FormMode;
364
+ /** 编辑模式初始值:设置后自动作为脏检查基准 */
365
+ initialValues?: Record<string, any>;
334
366
  grid?: GridLayoutConfig;
335
367
  inline?: InlineLayoutConfig;
336
368
  card?: CardLayoutConfig;
@@ -340,7 +372,7 @@ interface FormConfig extends LayoutCallbacks {
340
372
  custom?: CustomLayoutConfig;
341
373
  }
342
374
  /** 解析后的配置(所有必填字段均已设置默认值) */
343
- interface ResolvedFormConfig extends Required<Omit<FormConfig, keyof LayoutCallbacks | "grid" | "inline" | "card" | "tabs" | "steps" | "dynamic" | "custom">> {
375
+ interface ResolvedFormConfig extends Required<Omit<FormConfig, keyof LayoutCallbacks | 'grid' | 'inline' | 'card' | 'tabs' | 'steps' | 'dynamic' | 'custom' | 'initialValues'>> {
344
376
  grid?: GridLayoutConfig;
345
377
  inline?: InlineLayoutConfig;
346
378
  card?: CardLayoutConfig;
@@ -348,19 +380,20 @@ interface ResolvedFormConfig extends Required<Omit<FormConfig, keyof LayoutCallb
348
380
  steps?: StepsLayoutConfig;
349
381
  dynamic?: DynamicLayoutConfig;
350
382
  custom?: CustomLayoutConfig;
351
- onTabChange?: LayoutCallbacks["onTabChange"];
352
- onTabValidate?: LayoutCallbacks["onTabValidate"];
353
- onStepChange?: LayoutCallbacks["onStepChange"];
354
- onStepBeforeChange?: LayoutCallbacks["onStepBeforeChange"];
355
- onStepValidate?: LayoutCallbacks["onStepValidate"];
356
- onFieldAdd?: LayoutCallbacks["onFieldAdd"];
357
- onFieldRemove?: LayoutCallbacks["onFieldRemove"];
358
- onFieldToggle?: LayoutCallbacks["onFieldToggle"];
359
- onFieldsClear?: LayoutCallbacks["onFieldsClear"];
360
- onRenderModeChange?: LayoutCallbacks["onRenderModeChange"];
361
- onGroupToggle?: LayoutCallbacks["onGroupToggle"];
362
- onGroupReset?: LayoutCallbacks["onGroupReset"];
363
- onFieldsChange?: LayoutCallbacks["onFieldsChange"];
383
+ onTabChange?: LayoutCallbacks['onTabChange'];
384
+ onTabValidate?: LayoutCallbacks['onTabValidate'];
385
+ onStepChange?: LayoutCallbacks['onStepChange'];
386
+ onStepBeforeChange?: LayoutCallbacks['onStepBeforeChange'];
387
+ onStepValidate?: LayoutCallbacks['onStepValidate'];
388
+ onFieldAdd?: LayoutCallbacks['onFieldAdd'];
389
+ onFieldRemove?: LayoutCallbacks['onFieldRemove'];
390
+ onFieldToggle?: LayoutCallbacks['onFieldToggle'];
391
+ onFieldsClear?: LayoutCallbacks['onFieldsClear'];
392
+ onRenderModeChange?: LayoutCallbacks['onRenderModeChange'];
393
+ onGroupToggle?: LayoutCallbacks['onGroupToggle'];
394
+ onGroupReset?: LayoutCallbacks['onGroupReset'];
395
+ onFieldsChange?: LayoutCallbacks['onFieldsChange'];
396
+ initialValues?: Record<string, any>;
364
397
  }
365
398
  declare const FORM_DEFAULTS: ResolvedFormConfig;
366
399
  /** 拥有自身控制按钮的布局(不显示默认操作按钮) */
@@ -427,16 +460,21 @@ declare const __VLS_base: vue.DefineComponent<CFormProps, {
427
460
  initialize: () => void;
428
461
  layoutType: vue.ComputedRef<LayoutType>;
429
462
  shouldShowDefaultActions: vue.ComputedRef<boolean>;
463
+ isDirty: vue.Ref<boolean, boolean>;
464
+ getChangedFields: () => string[];
465
+ isFieldDirty: (field: string) => boolean;
466
+ markAsClean: () => void;
467
+ asyncLoadingMap: vue.Ref<Record<string, boolean>, Record<string, boolean>>;
430
468
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
431
469
  "update:modelValue": (model: Record<string, any>) => any;
432
470
  submit: (payload: SubmitEventPayload) => any;
433
- "validate-success": (model: Record<string, any>) => any;
434
471
  "validate-error": (errors: unknown) => any;
472
+ "validate-success": (model: Record<string, any>) => any;
435
473
  }, string, vue.PublicProps, Readonly<CFormProps> & Readonly<{
436
474
  "onUpdate:modelValue"?: ((model: Record<string, any>) => any) | undefined;
437
475
  onSubmit?: ((payload: SubmitEventPayload) => any) | undefined;
438
- "onValidate-success"?: ((model: Record<string, any>) => any) | undefined;
439
476
  "onValidate-error"?: ((errors: unknown) => any) | undefined;
477
+ "onValidate-success"?: ((model: Record<string, any>) => any) | undefined;
440
478
  }>, {
441
479
  config: FormConfig;
442
480
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
@@ -450,11 +488,7 @@ type __VLS_WithSlots<T, S> = T & {
450
488
  //#endregion
451
489
  //#region src/components/C_Form/composables/useFormState.d.ts
452
490
  /**
453
- * C_Form 状态引擎 — 管理表单数据模型、校验规则、验证 API、字段操作
454
- * @param options - 表单配置项(响应式)
455
- * @param config - 解析后的表单配置(响应式)
456
- * @param formRef - NForm 实例引用
457
- * @param emit - 组件事件发射器
491
+ * C_Form 状态引擎 — 管理表单数据模型、校验规则、验证 API、字段操作、脏检查、联动
458
492
  */
459
493
  declare function useFormState(options: ComputedRef<FormOption[]>, config: ComputedRef<ResolvedFormConfig>, formRef: Ref<FormInst$1 | null>, emit: {
460
494
  (e: 'update:modelValue', model: FormModel): void;
@@ -482,27 +516,44 @@ declare function useFormState(options: ComputedRef<FormOption[]>, config: Comput
482
516
  setFieldsValue: (fields: FormModel, shouldValidate?: boolean) => Promise<void>;
483
517
  handleSubmit: () => Promise<void>;
484
518
  handleReset: () => void;
519
+ isDirty: Ref<boolean, boolean>;
520
+ getChangedFields: () => string[];
521
+ isFieldDirty: (field: string) => boolean;
522
+ markAsClean: () => void;
523
+ asyncOptionsCache: Ref<Record<string, OptionItem[]>, Record<string, OptionItem[]>>;
524
+ asyncLoadingMap: Ref<Record<string, boolean>, Record<string, boolean>>;
485
525
  };
486
526
  //#endregion
487
527
  //#region src/components/C_Form/composables/useFormRenderer.d.ts
488
- /** 组件映射表 — 由调用方(C_Form)注入已解析的组件引用 */
489
528
  type ComponentMap = Record<string, Component>;
490
- /** 单个控件的渲染函数签名 */
491
529
  type FormRenderer = (baseProps: Record<string, any>, item: FormOption, config: ResolvedFormConfig, ctx?: {
492
530
  slots?: Record<string, any>;
493
531
  components?: ComponentMap;
494
532
  }) => VNode | null;
533
+ interface UseFormRendererOptions {
534
+ formModel: FormModel;
535
+ visibleOptions: ComputedRef<FormOption[]>;
536
+ config: ComputedRef<ResolvedFormConfig>;
537
+ handleFieldChange: (field: string) => void;
538
+ componentMap: ComponentMap;
539
+ instanceSlots?: Record<string, any>;
540
+ asyncOptionsCache: Ref<Record<string, OptionItem[]>>;
541
+ asyncLoadingMap: Ref<Record<string, boolean>>;
542
+ }
495
543
  /**
496
544
  * 运行时注册自定义渲染器 — 开闭原则
497
- * @param type - 控件类型名
498
- * @param renderer - 渲染函数
499
545
  */
500
546
  declare function registerRenderer(type: string, renderer: FormRenderer): void;
501
547
  /**
502
548
  * 渲染引擎 Composable — 生成 formItems VNode 数组
503
- * @param componentMap - 已解析的组件映射表(由 C_Form 的 <script setup> 提供)
549
+ *
550
+ * v0.8.0 增强:
551
+ * - 字段级 disabled / readonly
552
+ * - help / tooltip label 渲染
553
+ * - asyncOptions 远程选项合并
554
+ * - loading 占位
504
555
  */
505
- declare function useFormRenderer(formModel: FormModel, visibleOptions: ComputedRef<FormOption[]>, config: ComputedRef<ResolvedFormConfig>, handleFieldChange: (field: string) => void, componentMap: ComponentMap, instanceSlots?: Record<string, any>): {
556
+ declare function useFormRenderer(opts: UseFormRendererOptions): {
506
557
  renderFormItem: (item: FormOption) => VNode | null;
507
558
  formItems: ComputedRef<VNode<vue.RendererNode, vue.RendererElement, {
508
559
  [key: string]: any;
@@ -510,6 +561,23 @@ declare function useFormRenderer(formModel: FormModel, visibleOptions: ComputedR
510
561
  getBaseProps: (item: FormOption) => Record<string, unknown>;
511
562
  };
512
563
  //#endregion
564
+ //#region src/components/C_Form/composables/useFormDirty.d.ts
565
+ interface UseFormDirtyReturn {
566
+ /** 表单是否已修改 */
567
+ isDirty: Ref<boolean>;
568
+ /** 获取发生变化的字段名列表 */
569
+ getChangedFields: () => string[];
570
+ /** 检查指定字段是否脏 */
571
+ isFieldDirty: (field: string) => boolean;
572
+ /** 保存当前值为干净快照 */
573
+ markAsClean: () => void;
574
+ }
575
+ /**
576
+ * 脏检查 Composable — 追踪 formModel 相对于初始快照的变化
577
+ * @param formModel 响应式表单数据对象(reactive)
578
+ */
579
+ declare function useFormDirty(formModel: FormModel): UseFormDirtyReturn;
580
+ //#endregion
513
581
  //#region node_modules/async-validator/dist-types/interface.d.ts
514
582
  declare type RuleType = 'string' | 'number' | 'boolean' | 'method' | 'regexp' | 'integer' | 'float' | 'array' | 'object' | 'enum' | 'date' | 'url' | 'hex' | 'email' | 'pattern' | 'any';
515
583
  interface ValidateOption {
@@ -1294,9 +1362,11 @@ declare const useDynamicFormState: () => {
1294
1362
  readonly value?: any;
1295
1363
  readonly placeholder?: string | undefined;
1296
1364
  readonly rules?: readonly {
1297
- readonly max?: number | undefined;
1298
1365
  readonly type?: RuleType | undefined;
1299
1366
  readonly required?: boolean | undefined;
1367
+ readonly max?: number | undefined;
1368
+ readonly level?: "warning" | "error" | undefined;
1369
+ readonly key?: string | undefined;
1300
1370
  readonly options?: {
1301
1371
  readonly suppressWarning?: boolean | undefined;
1302
1372
  readonly suppressValidatorError?: boolean | undefined;
@@ -1354,6 +1424,7 @@ declare const useDynamicFormState: () => {
1354
1424
  } | undefined;
1355
1425
  readonly trigger?: string | readonly string[] | undefined;
1356
1426
  readonly pattern?: (RegExp | string) | undefined;
1427
+ readonly message?: string | ((a?: string) => string) | undefined;
1357
1428
  readonly asyncValidator?: naive_ui_es_form_src_interface0.FormItemRuleAsyncValidator | undefined;
1358
1429
  readonly min?: number | undefined;
1359
1430
  readonly len?: number | undefined;
@@ -1928,10 +1999,7 @@ declare const useDynamicFormState: () => {
1928
1999
  readonly validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
1929
2000
  }[] | undefined;
1930
2001
  readonly transform?: ((value: Value) => Value) | undefined;
1931
- readonly message?: string | ((a?: string) => string) | undefined;
1932
- readonly key?: string | undefined;
1933
2002
  readonly renderMessage?: (() => vue.VNodeChild) | undefined;
1934
- readonly level?: "warning" | "error" | undefined;
1935
2003
  readonly validator: NonNullable<naive_ui0.FormItemRule["validator"]>;
1936
2004
  }[] | undefined;
1937
2005
  readonly attrs?: {
@@ -3557,6 +3625,12 @@ declare const useDynamicFormState: () => {
3557
3625
  readonly required?: boolean | undefined;
3558
3626
  readonly dependsOn?: string | readonly string[] | undefined;
3559
3627
  readonly showWhen?: ((formModel: Record<string, any>) => boolean) | undefined;
3628
+ readonly disabled?: boolean | ((formModel: Record<string, any>) => boolean) | undefined;
3629
+ readonly readonly?: boolean | ((formModel: Record<string, any>) => boolean) | undefined;
3630
+ readonly valueWhen?: ((formModel: Record<string, any>) => any) | undefined;
3631
+ readonly asyncOptions?: ((formModel: Record<string, any>) => Promise<OptionItem[]>) | undefined;
3632
+ readonly rulesWhen?: ((formModel: Record<string, any>) => _robot_admin_form_validate0.FieldRule[]) | undefined;
3633
+ readonly crossFieldValidator?: ((formModel: Record<string, any>) => string | null) | undefined;
3560
3634
  }[];
3561
3635
  readonly dynamicFields: readonly {
3562
3636
  readonly id: string;
@@ -3571,9 +3645,11 @@ declare const useDynamicFormState: () => {
3571
3645
  readonly span?: number | undefined;
3572
3646
  } | undefined;
3573
3647
  readonly rules?: readonly {
3574
- readonly max?: number | undefined;
3575
3648
  readonly type?: RuleType | undefined;
3576
3649
  readonly required?: boolean | undefined;
3650
+ readonly max?: number | undefined;
3651
+ readonly level?: "warning" | "error" | undefined;
3652
+ readonly key?: string | undefined;
3577
3653
  readonly options?: {
3578
3654
  readonly suppressWarning?: boolean | undefined;
3579
3655
  readonly suppressValidatorError?: boolean | undefined;
@@ -3631,6 +3707,7 @@ declare const useDynamicFormState: () => {
3631
3707
  } | undefined;
3632
3708
  readonly trigger?: string | readonly string[] | undefined;
3633
3709
  readonly pattern?: (RegExp | string) | undefined;
3710
+ readonly message?: string | ((a?: string) => string) | undefined;
3634
3711
  readonly asyncValidator?: naive_ui_es_form_src_interface0.FormItemRuleAsyncValidator | undefined;
3635
3712
  readonly min?: number | undefined;
3636
3713
  readonly len?: number | undefined;
@@ -4205,10 +4282,7 @@ declare const useDynamicFormState: () => {
4205
4282
  readonly validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
4206
4283
  }[] | undefined;
4207
4284
  readonly transform?: ((value: Value) => Value) | undefined;
4208
- readonly message?: string | ((a?: string) => string) | undefined;
4209
- readonly key?: string | undefined;
4210
4285
  readonly renderMessage?: (() => vue.VNodeChild) | undefined;
4211
- readonly level?: "warning" | "error" | undefined;
4212
4286
  readonly validator: NonNullable<naive_ui0.FormItemRule["validator"]>;
4213
4287
  }[] | undefined;
4214
4288
  }[];
@@ -4244,5 +4318,5 @@ type DynamicFormStateType = ReturnType<typeof useDynamicFormState>;
4244
4318
  */
4245
4319
  declare const DYNAMIC_FORM_STATE_KEY: unique symbol;
4246
4320
  //#endregion
4247
- export { LayoutConfig as A, DynamicFormState as C, GridLayoutConfig as D, FormOption as E, StepsLayoutConfig as M, SubmitEventPayload as N, InlineLayoutConfig as O, TabsLayoutConfig as P, DynamicFormConfig as S, FormModel as T, shouldShowActions as _, ComponentMap as a, CustomLayoutConfig as b, useFormRenderer as c, FORM_DEFAULTS as d, FormConfig as f, resolveFormConfig as g, ResolvedFormConfig as h, useDynamicFormState as i, LayoutType as j, LabelPlacement as k, useFormState as l, LayoutCallbacks as m, DynamicFormStateType as n, FormRenderer as o, LAYOUTS_WITH_OWN_CONTROLS as p, FIELD_TYPE_OPTIONS as r, registerRenderer as s, DYNAMIC_FORM_STATE_KEY as t, _default as u, CardLayoutConfig as v, FormInstance as w, DynamicFieldConfig as x, ComponentType as y };
4321
+ export { FormOption as A, CustomLayoutConfig as C, FormInstance as D, DynamicFormState as E, LayoutType as F, StepsLayoutConfig as I, SubmitEventPayload as L, InlineLayoutConfig as M, LabelPlacement as N, FormMode as O, LayoutConfig as P, TabsLayoutConfig as R, ComponentType as S, DynamicFormConfig as T, LayoutCallbacks as _, UseFormDirtyReturn as a, shouldShowActions as b, FormRenderer as c, useFormRenderer as d, useFormState as f, LAYOUTS_WITH_OWN_CONTROLS as g, FormConfig as h, useDynamicFormState as i, GridLayoutConfig as j, FormModel as k, UseFormRendererOptions as l, FORM_DEFAULTS as m, DynamicFormStateType as n, useFormDirty as o, _default as p, FIELD_TYPE_OPTIONS as r, ComponentMap as s, DYNAMIC_FORM_STATE_KEY as t, registerRenderer as u, ResolvedFormConfig as v, DynamicFieldConfig as w, CardLayoutConfig as x, resolveFormConfig as y };
4248
4322
  //# sourceMappingURL=useDynamicFormState.d.ts.map
@@ -259,9 +259,9 @@ declare const __VLS_export: vue.DefineComponent<Props, {
259
259
  onReady?: ((graph: any) => any) | undefined;
260
260
  "onData-change"?: ((data: DiagramData) => any) | undefined;
261
261
  }>, {
262
- theme: "light" | "dark";
263
262
  width: string | number;
264
263
  height: string | number;
264
+ theme: "light" | "dark";
265
265
  readonly: boolean;
266
266
  showToolbar: boolean;
267
267
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
@@ -89,9 +89,9 @@ declare const __VLS_base: vue.DefineComponent<WaterFallProps, WaterFallExpose, {
89
89
  "onImage-loaded"?: ((item: WaterFallItem) => any) | undefined;
90
90
  "onImage-error"?: ((item: WaterFallItem) => any) | undefined;
91
91
  }>, {
92
+ columns: number;
92
93
  loading: boolean;
93
94
  animationDuration: number;
94
- columns: number;
95
95
  gap: number;
96
96
  infinite: boolean;
97
97
  lazy: boolean;
@@ -50,13 +50,13 @@ declare const __VLS_export: vue.DefineComponent<Props, QRCodeExpose, {}, {}, {},
50
50
  }, string, vue.PublicProps, Readonly<Props> & Readonly<{
51
51
  onError?: ((error: Error) => any) | undefined;
52
52
  }>, {
53
- size: number;
54
- mode: RenderMode;
53
+ showBorder: boolean;
55
54
  label: string;
55
+ showLabel: boolean;
56
+ size: number;
56
57
  color: string;
58
+ mode: RenderMode;
57
59
  margin: number;
58
- showBorder: boolean;
59
- showLabel: boolean;
60
60
  bgColor: string;
61
61
  errorCorrectionLevel: ErrorCorrectionLevel;
62
62
  logo: LogoOptions;
@@ -55,12 +55,12 @@ declare const __VLS_export: vue.DefineComponent<Props, {
55
55
  cleanFn: () => void;
56
56
  changeFoldState: () => void;
57
57
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
58
- reset: () => any;
59
58
  search: (params: SearchFormParams) => any;
59
+ reset: () => any;
60
60
  "change-params": (params: SearchFormParams) => any;
61
61
  }, string, vue.PublicProps, Readonly<Props> & Readonly<{
62
- onReset?: (() => any) | undefined;
63
62
  onSearch?: ((params: SearchFormParams) => any) | undefined;
63
+ onReset?: (() => any) | undefined;
64
64
  "onChange-params"?: ((params: SearchFormParams) => any) | undefined;
65
65
  }>, {
66
66
  size: "small" | "medium" | "large";
@@ -91,25 +91,25 @@ interface SignatureEmits {
91
91
  //#endregion
92
92
  //#region src/components/C_Signature/index.vue.d.ts
93
93
  declare const __VLS_export: vue.DefineComponent<SignatureProps, SignatureExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
94
- change: (data: SignatureStroke[]) => any;
95
94
  clear: () => any;
95
+ change: (data: SignatureStroke[]) => any;
96
96
  "start-draw": () => any;
97
97
  drawing: (point: SignaturePoint) => any;
98
98
  "end-draw": (stroke: SignatureStroke) => any;
99
99
  undo: () => any;
100
100
  redo: () => any;
101
101
  }, string, vue.PublicProps, Readonly<SignatureProps> & Readonly<{
102
- onChange?: ((data: SignatureStroke[]) => any) | undefined;
103
102
  onClear?: (() => any) | undefined;
103
+ onChange?: ((data: SignatureStroke[]) => any) | undefined;
104
104
  "onStart-draw"?: (() => any) | undefined;
105
105
  onDrawing?: ((point: SignaturePoint) => any) | undefined;
106
106
  "onEnd-draw"?: ((stroke: SignatureStroke) => any) | undefined;
107
107
  onUndo?: (() => any) | undefined;
108
108
  onRedo?: (() => any) | undefined;
109
109
  }>, {
110
- disabled: boolean;
111
110
  width: number | string;
112
111
  height: number | string;
112
+ disabled: boolean;
113
113
  readonly: boolean;
114
114
  showToolbar: boolean;
115
115
  maxHistory: number;
@@ -66,27 +66,27 @@ type __VLS_Slots = {} & {
66
66
  second?: (props: typeof __VLS_13) => any;
67
67
  };
68
68
  declare const __VLS_base: vue.DefineComponent<Props, SplitPaneExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
69
- expand: (target: CollapseTarget) => any;
70
- collapse: (target: CollapseTarget) => any;
71
69
  resize: (firstSize: number, secondSize: number) => any;
70
+ collapse: (target: CollapseTarget) => any;
71
+ expand: (target: CollapseTarget) => any;
72
72
  "drag-start": (size: number) => any;
73
73
  "drag-end": (size: number) => any;
74
74
  }, string, vue.PublicProps, Readonly<Props> & Readonly<{
75
- onExpand?: ((target: CollapseTarget) => any) | undefined;
76
- onCollapse?: ((target: CollapseTarget) => any) | undefined;
77
75
  onResize?: ((firstSize: number, secondSize: number) => any) | undefined;
76
+ onCollapse?: ((target: CollapseTarget) => any) | undefined;
77
+ onExpand?: ((target: CollapseTarget) => any) | undefined;
78
78
  "onDrag-start"?: ((size: number) => any) | undefined;
79
79
  "onDrag-end"?: ((size: number) => any) | undefined;
80
80
  }>, {
81
81
  direction: SplitDirection;
82
82
  disabled: boolean;
83
- step: number;
84
- maxSize: number;
85
83
  collapsible: boolean;
86
84
  defaultSize: number;
87
85
  minSize: number;
86
+ maxSize: number;
88
87
  showCollapseButton: boolean;
89
88
  gutterSize: number;
89
+ step: number;
90
90
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
91
91
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
92
92
  declare const _default: typeof __VLS_export;
@@ -48,12 +48,11 @@ declare const __VLS_export: vue.DefineComponent<TimeProps, TimeExpose, {}, {}, {
48
48
  "onChange-start"?: ((time: number | null) => any) | undefined;
49
49
  "onChange-end"?: ((time: number | null) => any) | undefined;
50
50
  }>, {
51
- mode: TimeMode;
51
+ format: string;
52
52
  placeholder: string;
53
+ mode: TimeMode;
53
54
  startPlaceholder: string;
54
55
  endPlaceholder: string;
55
- attrs: Record<string, any>;
56
- format: string;
57
56
  useHours: boolean;
58
57
  useMinutes: boolean;
59
58
  useSeconds: boolean;
@@ -62,6 +61,7 @@ declare const __VLS_export: vue.DefineComponent<TimeProps, TimeExpose, {}, {}, {
62
61
  secondStep: number;
63
62
  startTimeProps: Record<string, any>;
64
63
  endTimeProps: Record<string, any>;
64
+ attrs: Record<string, any>;
65
65
  defaultStartTime: number | null;
66
66
  defaultEndTime: number | null;
67
67
  defaultSingleTime: number | null;
@@ -102,13 +102,14 @@ declare const __VLS_base: vue.DefineComponent<TreeProps, TreeExpose, {}, {}, {},
102
102
  "onNode-action"?: ((action: string, node: TreeNodeData) => any) | undefined;
103
103
  "onNode-drop"?: ((info: DropInfo) => any) | undefined;
104
104
  }>, {
105
- mode: TreeMode;
106
- actions: ActionConfig[];
107
105
  showToolbar: boolean;
106
+ mode: TreeMode;
108
107
  labelField: string;
108
+ keyField: string;
109
109
  childrenField: string;
110
110
  draggable: boolean;
111
- keyField: string;
111
+ actions: ActionConfig[];
112
+ defaultExpandAll: boolean;
112
113
  searchPattern: string;
113
114
  searchable: boolean;
114
115
  searchPlaceholder: string;
@@ -119,7 +120,6 @@ declare const __VLS_base: vue.DefineComponent<TreeProps, TreeExpose, {}, {}, {},
119
120
  iconField: string;
120
121
  iconConfig: IconConfig;
121
122
  statusConfigs: StatusConfig[];
122
- defaultExpandAll: boolean;
123
123
  defaultExpandedKeys: (string | number)[];
124
124
  defaultSelectedKeys: (string | number)[];
125
125
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
@@ -237,19 +237,19 @@ declare const __VLS_export: vue.DefineComponent<WorkflowProps, {
237
237
  conditionNodes: number;
238
238
  }>;
239
239
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
240
- change: (value: WorkflowData) => any;
241
240
  "update:modelValue": (value: WorkflowData) => any;
242
- "validate-error": (errors: ValidationError[]) => any;
243
- save: (data: WorkflowData) => any;
241
+ change: (value: WorkflowData) => any;
244
242
  "node-click": (node: WorkflowNode) => any;
243
+ save: (data: WorkflowData) => any;
245
244
  "edge-click": (edge: WorkflowEdge) => any;
245
+ "validate-error": (errors: ValidationError[]) => any;
246
246
  }, string, vue.PublicProps, Readonly<WorkflowProps> & Readonly<{
247
- onChange?: ((value: WorkflowData) => any) | undefined;
248
247
  "onUpdate:modelValue"?: ((value: WorkflowData) => any) | undefined;
249
- "onValidate-error"?: ((errors: ValidationError[]) => any) | undefined;
250
- onSave?: ((data: WorkflowData) => any) | undefined;
248
+ onChange?: ((value: WorkflowData) => any) | undefined;
251
249
  "onNode-click"?: ((node: WorkflowNode) => any) | undefined;
250
+ onSave?: ((data: WorkflowData) => any) | undefined;
252
251
  "onEdge-click"?: ((edge: WorkflowEdge) => any) | undefined;
252
+ "onValidate-error"?: ((errors: ValidationError[]) => any) | undefined;
253
253
  }>, {
254
254
  theme: "light" | "dark";
255
255
  readonly: boolean;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.7.2",
6
+ "version": "0.8.1",
7
7
  "description": "基于 Naive UI 的 Vue 3 组件库",
8
8
  "type": "module",
9
9
  "main": "dist/index.cjs",