@vue-start/pro 0.5.32 → 0.5.34

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/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # 0.5.33
7
+
8
+ - ProTable 新增 mergeOpts 属性,支持行、列合并
9
+
6
10
  # [0.4.0](https://github.com/zxeryu/vue-start/compare/@vue-start/pro@0.3.2...@vue-start/pro@0.4.0) (2022-09-02)
7
11
 
8
12
  ### Bug Fixes
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ import { TUpdater } from '@vue-start/store';
10
10
  import * as vue_router from 'vue-router';
11
11
  import { Router, RouteLocationNormalizedLoaded } from 'vue-router';
12
12
  import * as lodash from 'lodash';
13
- import { TConvert } from '@vue-start/hooks';
13
+ import { TTableMergeOpts, TConvert } from '@vue-start/hooks';
14
14
 
15
15
  declare type TDefaultValueType = "text" | "textarea" | "password" | "digit" | "date" | "dateRange" | "time" | "timeRange" | "select" | "treeSelect" | "checkbox" | "radio" | "slider" | "switch" | "rate" | "cascader";
16
16
  declare type TValueType = TDefaultValueType | string;
@@ -43,10 +43,16 @@ declare type TColumn = {
43
43
  label?: string;
44
44
  };
45
45
  formFieldProps?: Record<string, any>;
46
- search?: boolean;
46
+ /********* props *********/
47
+ props?: Record<string, any>;
48
+ inputProps?: Record<string, any>;
49
+ /********* 自定义render方法 *********/
50
+ render?: TRender;
51
+ inputRender?: TRender;
47
52
  descRender?: string | TRender;
48
- formRender?: string | TRender;
49
53
  formReadRender?: string | TRender;
54
+ tableRender?: string | TRender;
55
+ search?: boolean;
50
56
  extra?: {
51
57
  desc?: Record<string, any>;
52
58
  col?: Record<string, any>;
@@ -170,7 +176,6 @@ declare type TObjItem = {
170
176
  declare type TFunItem = (string | TParamItem | TObjItem)[];
171
177
  declare type TExpression = TFunItem | TDataType | TObjItem;
172
178
 
173
- /***************************************** curd模式 *****************************************/
174
179
  /**
175
180
  * 获取Column的valueType,默认"text"
176
181
  * @param column
@@ -189,22 +194,26 @@ declare const getColumnFormItemName: (column: TColumn) => string | number | unde
189
194
  * @param column
190
195
  * @param render
191
196
  */
192
- declare const getRealRender: (column: TColumn, render: string | ((...args: any[]) => any) | undefined) => any;
197
+ declare const getRealRender: (column: TColumn, render?: string | Function) => Function | undefined;
193
198
  /**
194
- * 根据Column生成FormItem VNode
195
- * formFieldProps中的slots参数会以v-slots的形式传递到FormItem的录入组件(子组件)中
196
- * @param formElementMap
199
+ * 渲染column描述的组件
200
+ * @param elementMap
197
201
  * @param column
198
- * @param needRules
202
+ * @param extra 动态props,一般传递value
203
+ * @param opts
199
204
  */
200
- declare const getFormItemEl: (formElementMap: any, column: TColumn) => VNode | null;
205
+ declare const renderColumn: (elementMap: any, column: TColumn, extra?: Record<string, any>, opts?: {
206
+ render?: string;
207
+ }) => any;
201
208
  /**
202
- * 根据Column生成Item VNode
209
+ * form 中渲染column对应的输入组件
203
210
  * @param elementMap
211
+ * @param formElementMap
204
212
  * @param column
205
- * @param value
206
213
  */
207
- declare const getItemEl: <T extends TColumn>(elementMap: any, column: T, value: any) => VNode | null;
214
+ declare const renderInputColumn: (elementMap: any, formElementMap: any, column: TColumn) => VNode<vue.RendererNode, vue.RendererElement, {
215
+ [key: string]: any;
216
+ }> | null;
208
217
  /***************************************** 通用模式 *****************************************/
209
218
  declare type InternalNamePath = (string | number)[];
210
219
  declare type NamePath = string | number | InternalNamePath;
@@ -984,7 +993,7 @@ declare const proFormProps: () => {
984
993
  * submit触发前hook,返回true,表示消费了此事件,不执行finish回掉
985
994
  */
986
995
  onPreFinish: {
987
- type: PropType<(...e: any[]) => boolean>;
996
+ type: PropType<(...e: any[]) => boolean | undefined>;
988
997
  default: undefined;
989
998
  };
990
999
  };
@@ -1132,6 +1141,7 @@ interface IProFormListProvide {
1132
1141
  }
1133
1142
  declare const useProFormList: () => IProFormListProvide;
1134
1143
  declare const provideProFormList: (ctx: IProFormListProvide) => void;
1144
+ declare type TOriginFn = () => void;
1135
1145
  declare const proFormListProps: () => {
1136
1146
  rowKey: {
1137
1147
  type: StringConstructor;
@@ -1157,6 +1167,18 @@ declare const proFormListProps: () => {
1157
1167
  renderItemMinus: {
1158
1168
  type: PropType<() => VNode>;
1159
1169
  };
1170
+ onPreAdd: {
1171
+ type: PropType<() => boolean | undefined>;
1172
+ };
1173
+ onAdd: {
1174
+ type: PropType<(fn: TOriginFn) => void>;
1175
+ };
1176
+ onPreRemove: {
1177
+ type: PropType<(opts: any) => boolean | undefined>;
1178
+ };
1179
+ onRemove: {
1180
+ type: PropType<(fn: TOriginFn, opts: any) => void>;
1181
+ };
1160
1182
  };
1161
1183
  declare type ProFormListProps = Partial<ExtractPropTypes<ReturnType<typeof proFormListProps>>> & Omit<ProGridProps, "items">;
1162
1184
  declare const ProFormList: vue.DefineComponent<ProFormListProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProFormListProps>, {}>;
@@ -1382,10 +1404,18 @@ declare const proTableProps: () => {
1382
1404
  tableMethods: {
1383
1405
  type: PropType<string[]>;
1384
1406
  };
1407
+ /**
1408
+ * 行、列合并配置
1409
+ */
1410
+ mergeOpts: {
1411
+ type: PropType<TTableMergeOpts>;
1412
+ };
1413
+ dataSource: {
1414
+ type: PropType<Record<string, any>[]>;
1415
+ };
1385
1416
  };
1386
1417
  declare type ProTableProps = Partial<ExtractPropTypes<ReturnType<typeof proTableProps>>> & ProBaseProps & {
1387
1418
  loading?: boolean;
1388
- dataSource?: Record<string, any>[];
1389
1419
  };
1390
1420
  declare const ProTable: vue.DefineComponent<ProTableProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProTableProps>, {}>;
1391
1421
 
@@ -2233,8 +2263,6 @@ declare const ProCurd: vue.DefineComponent<ProCurdProps, {}, {}, {}, {}, vue.Com
2233
2263
  interface IProCurdProvide {
2234
2264
  columns: Ref<TColumns>;
2235
2265
  getSignColumns: (signName: string) => TColumns;
2236
- getFormItemVNode: (column: TColumn) => VNode | null;
2237
- getItemVNode: (column: TColumn, value: any) => VNode | null;
2238
2266
  elementMap: TElementMap;
2239
2267
  formElementMap: TElementMap;
2240
2268
  rowKey: string;
@@ -2439,4 +2467,4 @@ declare const getSignValue: <T = any>(item: TColumn, signName: string) => T;
2439
2467
  */
2440
2468
  declare const filterSlotsByPrefix: (slots: Record<string, any>, prefix: string) => lodash.Dictionary<any>;
2441
2469
 
2442
- export { AddButton, BooleanObjType, BooleanRulesObjType, ColumnSetting, CurdAction, CurdAddAction, CurdCurrentMode, CurdMethods, CurdSubAction, ElementKeys, FieldNames, FormAction, FormItemProps, FormRulePrefixMap, IAccess, ICurdAction, ICurdAddAction, ICurdCurrentMode, ICurdOperateOpts, ICurdState, ICurdSubAction, IElementConfig, IHighConfig, IListData, IOpeItem, IOperateItem, IPer, IProConfigProvide, IProCurdProvide, IProFormProvideExtra, IProModuleProvide, IProTableProvide, IProTableProvideExtra, IRequestOpts, ISearchMode, ITableOperate, IUser, InternalNamePath, LogonUser, LogonUserKey, MustLogon, NamePath, PageHeaderProps, PaginationSlotProps, PerSuffix, Permission, PermissionProps, ProBaseProps, ProColumnSettingProps, ProConfig, ProConfigProps, ProCurd, ProCurdDesc, ProCurdDescConnect, ProCurdDescProps, ProCurdForm, ProCurdFormConnect, ProCurdFormProps, ProCurdList, ProCurdListConnect, ProCurdListProps, ProCurdModal, ProCurdModalForm, ProCurdModalFormConnect, ProCurdModalProps, ProCurdProps, ProDesc, ProDescProps, ProDispatchRequestType, ProForm, ProFormItemProps, ProFormList, ProFormListProps, ProFormProps, ProGrid, ProGridProps, ProLayout, ProList, ProListProps, ProModalCurd, ProModalCurdProps, ProModule, ProModuleProps, ProOperate, ProOperateProps, ProPage, ProPageCurd, ProPageCurdProps, ProPageProps, ProSearchForm, ProSearchFormProps, ProShowDate, ProShowDigit, ProShowOptions, ProShowText, ProShowTree, ProTable, ProTableProps, ProTypography, ProTypographyProps, ProUploadList, ProUploaderText, RequestAction, RouterMethods, SearchMode, SearchSlotProps, TAccess, TActionEvent, TActionState, TColumn, TColumns, TConfigData, TCurdActionEvent, TDefaultValueType, TElementMap, TExecuteFunName, TExecuteItem, TExecuteName, TFile, TFormExtraMap, TInitialState, TLogonUserProvide, TMeta, TOpenMenu, TOption, TOptions, TPageState, TProFormOperate, TRegisterStore, TRegisterStoreMap, TRender, TRouter, TTableColumn, TTableColumns, TValueType, TreeOption, TreeOptions, Wrapper, convertPathToList, convertResData, createExpose, createExposeObj, createFormItemCompFn, createModule, createProConfig, defaultPage, filterSlotsByPrefix, getColumnFormItemName, getColumnValueType, getFirstPropName, getFormItemEl, getItemEl, getRealRender, getSignValue, getValidValues, isValidConfig, mergeState, mergeStateToList, proBaseProps, provideProCurd, provideProFormList, provideProModule, renderElement, renderElements, useAccess, useAccessMgr, useComposeRequestActor, useDispatchMeta, useDispatchStore, useDoneRequestActor, useFailedRequestActor, useFormSubmit, useGetCompByKey, useHasPer, useHasPer2, useLogonUser, useMetaRegister, useModuleEvent, useProConfig, useProCurd, useProForm, useProFormList, useProModal, useProModule, useProMsg, useProNotify, useProRouter, useProTable, useReadStore };
2470
+ export { AddButton, BooleanObjType, BooleanRulesObjType, ColumnSetting, CurdAction, CurdAddAction, CurdCurrentMode, CurdMethods, CurdSubAction, ElementKeys, FieldNames, FormAction, FormItemProps, FormRulePrefixMap, IAccess, ICurdAction, ICurdAddAction, ICurdCurrentMode, ICurdOperateOpts, ICurdState, ICurdSubAction, IElementConfig, IHighConfig, IListData, IOpeItem, IOperateItem, IPer, IProConfigProvide, IProCurdProvide, IProFormProvideExtra, IProModuleProvide, IProTableProvide, IProTableProvideExtra, IRequestOpts, ISearchMode, ITableOperate, IUser, InternalNamePath, LogonUser, LogonUserKey, MustLogon, NamePath, PageHeaderProps, PaginationSlotProps, PerSuffix, Permission, PermissionProps, ProBaseProps, ProColumnSettingProps, ProConfig, ProConfigProps, ProCurd, ProCurdDesc, ProCurdDescConnect, ProCurdDescProps, ProCurdForm, ProCurdFormConnect, ProCurdFormProps, ProCurdList, ProCurdListConnect, ProCurdListProps, ProCurdModal, ProCurdModalForm, ProCurdModalFormConnect, ProCurdModalProps, ProCurdProps, ProDesc, ProDescProps, ProDispatchRequestType, ProForm, ProFormItemProps, ProFormList, ProFormListProps, ProFormProps, ProGrid, ProGridProps, ProLayout, ProList, ProListProps, ProModalCurd, ProModalCurdProps, ProModule, ProModuleProps, ProOperate, ProOperateProps, ProPage, ProPageCurd, ProPageCurdProps, ProPageProps, ProSearchForm, ProSearchFormProps, ProShowDate, ProShowDigit, ProShowOptions, ProShowText, ProShowTree, ProTable, ProTableProps, ProTypography, ProTypographyProps, ProUploadList, ProUploaderText, RequestAction, RouterMethods, SearchMode, SearchSlotProps, TAccess, TActionEvent, TActionState, TColumn, TColumns, TConfigData, TCurdActionEvent, TDefaultValueType, TElementMap, TExecuteFunName, TExecuteItem, TExecuteName, TFile, TFormExtraMap, TInitialState, TLogonUserProvide, TMeta, TOpenMenu, TOption, TOptions, TPageState, TProFormOperate, TRegisterStore, TRegisterStoreMap, TRender, TRouter, TTableColumn, TTableColumns, TValueType, TreeOption, TreeOptions, Wrapper, convertPathToList, convertResData, createExpose, createExposeObj, createFormItemCompFn, createModule, createProConfig, defaultPage, filterSlotsByPrefix, getColumnFormItemName, getColumnValueType, getFirstPropName, getRealRender, getSignValue, getValidValues, isValidConfig, mergeState, mergeStateToList, proBaseProps, provideProCurd, provideProFormList, provideProModule, renderColumn, renderElement, renderElements, renderInputColumn, useAccess, useAccessMgr, useComposeRequestActor, useDispatchMeta, useDispatchStore, useDoneRequestActor, useFailedRequestActor, useFormSubmit, useGetCompByKey, useHasPer, useHasPer2, useLogonUser, useMetaRegister, useModuleEvent, useProConfig, useProCurd, useProForm, useProFormList, useProModal, useProModule, useProMsg, useProNotify, useProRouter, useProTable, useReadStore };