@vue-start/pro 0.4.11 → 0.4.12

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.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as vue from 'vue';
2
- import { ExtractPropTypes, PropType, VNode, Ref as Ref$1 } from 'vue';
2
+ import { ExtractPropTypes, PropType, VNode, App, Ref as Ref$1 } from 'vue';
3
3
  import { UnwrapNestedRefs, Ref, ComputedRef } from '@vue/reactivity';
4
4
  import { Subject } from 'rxjs';
5
5
  import { IRequestActor } from '@vue-start/request';
@@ -301,6 +301,74 @@ declare const useComposeRequestActor: (actors: (IRequestActor | string)[], optio
301
301
  onFinish?: ((actor: IRequestActor) => void) | undefined;
302
302
  }, cancelWhileUnmount?: boolean) => void;
303
303
 
304
+ declare const proBasePropsFn: () => {
305
+ /**
306
+ * 组件集
307
+ */
308
+ elementMap: {
309
+ type: PropType<TElementMap>;
310
+ };
311
+ /**
312
+ * form组件集(使用FormItem包裹的组件集合)
313
+ * readonly模式下使用elementMap中的组件渲染
314
+ */
315
+ formElementMap: {
316
+ type: PropType<TElementMap>;
317
+ };
318
+ /**
319
+ * 基础项配置
320
+ */
321
+ columns: {
322
+ type: PropType<TColumns>;
323
+ };
324
+ /**
325
+ * 对 column 进行补充
326
+ * 通常对columns为静态值时候使用
327
+ */
328
+ columnState: {
329
+ type: PropType<Record<string, any>>;
330
+ };
331
+ };
332
+ declare type ProBaseProps = Partial<ExtractPropTypes<ReturnType<typeof proBasePropsFn>>>;
333
+ declare const proBaseProps: ProBaseProps;
334
+ interface IProConfigProvide {
335
+ /**
336
+ * 组件集
337
+ */
338
+ elementMap?: TElementMap;
339
+ /**
340
+ * form组件集(使用FormItem包裹的组件集合)
341
+ */
342
+ formElementMap?: TElementMap;
343
+ }
344
+ declare const proConfigProps: () => {
345
+ config: {
346
+ type: PropType<IProConfigProvide>;
347
+ default: {};
348
+ };
349
+ };
350
+ declare const useProConfig: () => IProConfigProvide;
351
+ declare type ProConfigProps = Partial<ExtractPropTypes<ReturnType<typeof proConfigProps>>>;
352
+ /**
353
+ * 组件方式注册
354
+ */
355
+ declare const ProConfig: vue.DefineComponent<Partial<ExtractPropTypes<{
356
+ config: {
357
+ type: PropType<IProConfigProvide>;
358
+ default: {};
359
+ };
360
+ }>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
361
+ config: {
362
+ type: PropType<IProConfigProvide>;
363
+ default: {};
364
+ };
365
+ }>>>, {}>;
366
+ /**
367
+ * app.use 方式注册
368
+ * @param config
369
+ */
370
+ declare const createProConfig: (config?: IProConfigProvide) => (app: App) => void;
371
+
304
372
  interface IProTableProvideExtra extends Record<string, any> {
305
373
  }
306
374
  interface IProTableProvide extends IProTableProvideExtra {
@@ -354,18 +422,6 @@ declare const proTableProps: () => {
354
422
  column: {
355
423
  type: PropType<TTableColumn>;
356
424
  };
357
- columns: {
358
- type: PropType<TTableColumns>;
359
- };
360
- columnState: {
361
- type: PropType<Record<string, any>>;
362
- };
363
- /**
364
- * 展示控件集合,readonly模式下使用这些组件渲染
365
- */
366
- elementMap: {
367
- type: PropType<TElementMap>;
368
- };
369
425
  /**
370
426
  * 序号
371
427
  */
@@ -388,7 +444,7 @@ declare const proTableProps: () => {
388
444
  type: PropType<IProTableProvideExtra>;
389
445
  };
390
446
  };
391
- declare type ProTableProps = Partial<ExtractPropTypes<ReturnType<typeof proTableProps>>>;
447
+ declare type ProTableProps = Partial<ExtractPropTypes<ReturnType<typeof proTableProps>>> & ProBaseProps;
392
448
  declare const createTable: (Table: any, Props?: any, tableMethods?: string[]) => any;
393
449
 
394
450
  declare type TPageState = {
@@ -425,25 +481,6 @@ declare type TCurdActionEvent = {
425
481
  source?: TActionEvent["source"];
426
482
  };
427
483
  declare const proCurdProps: () => {
428
- /**
429
- * 配置(静态)
430
- */
431
- columns: {
432
- type: PropType<TColumns>;
433
- };
434
- /**
435
- * 配置(动态)
436
- * columns动态属性兼容
437
- */
438
- columnState: {
439
- type: PropType<Record<string, any>>;
440
- };
441
- /**
442
- * 录入组件集
443
- */
444
- formElementMap: {
445
- type: PropType<TElementMap>;
446
- };
447
484
  /**
448
485
  * 列表 或 详情 的唯一标识
449
486
  */
@@ -471,7 +508,7 @@ declare const proCurdProps: () => {
471
508
  type: PropType<Record<string, any>>;
472
509
  };
473
510
  };
474
- declare type CurdProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdProps>>>;
511
+ declare type CurdProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdProps>>> & ProBaseProps;
475
512
  declare const CurdMethods: string[];
476
513
  declare type ProCurdProps = CurdProps & Omit<ProModuleProps, "state" | "requests"> & {
477
514
  curdState?: UnwrapNestedRefs<ICurdState>;
@@ -732,27 +769,6 @@ declare const proFormProps: () => {
732
769
  disableStateRules: {
733
770
  type: PropType<BooleanRulesObjType>;
734
771
  };
735
- /**
736
- *
737
- */
738
- columns: {
739
- type: PropType<TColumns>;
740
- };
741
- columnState: {
742
- type: PropType<Record<string, any>>;
743
- };
744
- /**
745
- * 展示控件集合,readonly模式下使用这些组件渲染
746
- */
747
- elementMap: {
748
- type: PropType<TElementMap>;
749
- };
750
- /**
751
- * 录入控件集合
752
- */
753
- formElementMap: {
754
- type: PropType<TElementMap>;
755
- };
756
772
  /**
757
773
  * 是否启用rules验证
758
774
  */
@@ -767,7 +783,7 @@ declare const proFormProps: () => {
767
783
  type: PropType<IProFormProvideExtra>;
768
784
  };
769
785
  };
770
- declare type ProFormProps = Partial<ExtractPropTypes<ReturnType<typeof proFormProps>>>;
786
+ declare type ProFormProps = Partial<ExtractPropTypes<ReturnType<typeof proFormProps>>> & ProBaseProps;
771
787
  declare const createForm: (Form: any, Grid: any, formMethods: string[]) => any;
772
788
 
773
789
  declare enum SearchMode {
@@ -776,12 +792,6 @@ declare enum SearchMode {
776
792
  }
777
793
  declare type ISearchMode = keyof typeof SearchMode;
778
794
  declare const proSearchFormProps: () => {
779
- /**
780
- * 需要监听的对象
781
- */
782
- model: {
783
- type: PropType<Record<string, any>>;
784
- };
785
795
  /**
786
796
  * 初始化触发 onFinish
787
797
  */
@@ -796,13 +806,6 @@ declare const proSearchFormProps: () => {
796
806
  type: PropType<"AUTO" | "MANUAL">;
797
807
  default: SearchMode;
798
808
  };
799
- /**
800
- * 配置 同ProForm中的columns
801
- * 可以根据column中valueType计算出默认的debounceKeys
802
- */
803
- columns: {
804
- type: PropType<TColumns>;
805
- };
806
809
  /**
807
810
  * 需要debounce处理的字段
808
811
  */
@@ -818,7 +821,7 @@ declare const proSearchFormProps: () => {
818
821
  default: number;
819
822
  };
820
823
  };
821
- declare type ProSearchFormProps = Partial<ExtractPropTypes<ReturnType<typeof proSearchFormProps>>>;
824
+ declare type ProSearchFormProps = Partial<ExtractPropTypes<ReturnType<typeof proSearchFormProps>>> & ProFormProps;
822
825
  /**
823
826
  * 该组件只是个模式,最终返回null,不做任何渲染,应配合着ProForm的包装类一起使用
824
827
  * 针对传入的model(监听对象)做相应的finish(回调)处理
@@ -953,4 +956,4 @@ declare const mergeStateToList: (list: Record<string, any>[], listState: Record<
953
956
  */
954
957
  declare const createExpose: (methods: string[], targetRef: Ref$1) => {};
955
958
 
956
- export { BooleanObjType, BooleanRulesObjType, CurdAction, CurdAddAction, CurdCurrentMode, CurdMethods, CurdSubAction, FieldNames, FormItemProps, GridProps, ICurdAction, ICurdAddAction, ICurdCurrentMode, ICurdOperateOpts, ICurdState, ICurdSubAction, IElementConfig, IHighConfig, IListData, IOperateItem, IProCurdProvide, IProFormProvideExtra, IProModuleProvide, IProTableProvide, IProTableProvideExtra, IRequestOpts, ISearchMode, ITableOperate, InternalNamePath, NamePath, ProCurd, ProCurdAddOrEditProps, ProCurdListProps, ProCurdProps, ProFormItemProps, ProFormListProps, ProFormProps, ProModalCurd, ProModalCurdProps, ProModule, ProModuleProps, ProPageCurd, ProPageCurdProps, ProSearchFormProps, ProTableProps, RequestAction, SearchMode, TActionEvent, TActionState, TColumn, TColumns, TCurdActionEvent, TDefaultValueType, TElementMap, TOption, TOptions, TPageState, TTableColumn, TTableColumns, TValueType, TreeOption, TreeOptions, Wrapper, convertPathToList, createCurdDesc, createCurdForm, createCurdList, createExpose, createForm, createFormItemCompFn, createFormList, createGrid, createSearchForm, createTable, defaultPage, getColumnFormItemName, getColumnValueType, getFirstPropName, getFormItemEl, getItemEl, getValidValues, mergeStateToList, provideProCurd, provideProFormList, provideProModule, renderElement, renderElements, useComposeRequestActor, useDoneRequestActor, useFailedRequestActor, useModuleEvent, useProCurd, useProForm, useProFormList, useProModule, useProTable };
959
+ export { BooleanObjType, BooleanRulesObjType, CurdAction, CurdAddAction, CurdCurrentMode, CurdMethods, CurdSubAction, FieldNames, FormItemProps, GridProps, ICurdAction, ICurdAddAction, ICurdCurrentMode, ICurdOperateOpts, ICurdState, ICurdSubAction, IElementConfig, IHighConfig, IListData, IOperateItem, IProConfigProvide, IProCurdProvide, IProFormProvideExtra, IProModuleProvide, IProTableProvide, IProTableProvideExtra, IRequestOpts, ISearchMode, ITableOperate, InternalNamePath, NamePath, ProBaseProps, ProConfig, ProConfigProps, ProCurd, ProCurdAddOrEditProps, ProCurdListProps, ProCurdProps, ProFormItemProps, ProFormListProps, ProFormProps, ProModalCurd, ProModalCurdProps, ProModule, ProModuleProps, ProPageCurd, ProPageCurdProps, ProSearchFormProps, ProTableProps, RequestAction, SearchMode, TActionEvent, TActionState, TColumn, TColumns, TCurdActionEvent, TDefaultValueType, TElementMap, TOption, TOptions, TPageState, TTableColumn, TTableColumns, TValueType, TreeOption, TreeOptions, Wrapper, convertPathToList, createCurdDesc, createCurdForm, createCurdList, createExpose, createForm, createFormItemCompFn, createFormList, createGrid, createProConfig, createSearchForm, createTable, defaultPage, getColumnFormItemName, getColumnValueType, getFirstPropName, getFormItemEl, getItemEl, getValidValues, mergeStateToList, proBaseProps, provideProCurd, provideProFormList, provideProModule, renderElement, renderElements, useComposeRequestActor, useDoneRequestActor, useFailedRequestActor, useModuleEvent, useProConfig, useProCurd, useProForm, useProFormList, useProModule, useProTable };