@vue-start/pro 0.5.31 → 0.5.33
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 +4 -0
- package/dist/index.d.ts +54 -17
- package/dist/index.es.js +1608 -1506
- package/dist/index.js +3 -3
- package/package.json +2 -2
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
|
-
|
|
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
|
|
@@ -182,20 +187,33 @@ declare const getColumnValueType: (column: TColumn) => TValueType;
|
|
|
182
187
|
*/
|
|
183
188
|
declare const getColumnFormItemName: (column: TColumn) => string | number | undefined;
|
|
184
189
|
/**
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
190
|
+
* 获取column 中对应的render方法
|
|
191
|
+
* case1:render为方法的时候,直接返回render;
|
|
192
|
+
* case2:render为字符串的时候,返回column中该字符串对应的属性;
|
|
193
|
+
* 如:render为"customRender"时候,返回customRender方法;
|
|
188
194
|
* @param column
|
|
189
|
-
* @param
|
|
195
|
+
* @param render
|
|
190
196
|
*/
|
|
191
|
-
declare const
|
|
197
|
+
declare const getRealRender: (column: TColumn, render?: string | Function) => Function | undefined;
|
|
192
198
|
/**
|
|
193
|
-
*
|
|
199
|
+
* 渲染column描述的组件
|
|
194
200
|
* @param elementMap
|
|
195
201
|
* @param column
|
|
196
|
-
* @param value
|
|
202
|
+
* @param extra 动态props,一般传递value
|
|
203
|
+
* @param opts
|
|
197
204
|
*/
|
|
198
|
-
declare const
|
|
205
|
+
declare const renderColumn: (elementMap: any, column: TColumn, extra?: Record<string, any>, opts?: {
|
|
206
|
+
render?: string;
|
|
207
|
+
}) => any;
|
|
208
|
+
/**
|
|
209
|
+
* form 中渲染column对应的输入组件
|
|
210
|
+
* @param elementMap
|
|
211
|
+
* @param formElementMap
|
|
212
|
+
* @param column
|
|
213
|
+
*/
|
|
214
|
+
declare const renderInputColumn: (elementMap: any, formElementMap: any, column: TColumn) => VNode<vue.RendererNode, vue.RendererElement, {
|
|
215
|
+
[key: string]: any;
|
|
216
|
+
}> | null;
|
|
199
217
|
/***************************************** 通用模式 *****************************************/
|
|
200
218
|
declare type InternalNamePath = (string | number)[];
|
|
201
219
|
declare type NamePath = string | number | InternalNamePath;
|
|
@@ -975,7 +993,7 @@ declare const proFormProps: () => {
|
|
|
975
993
|
* submit触发前hook,返回true,表示消费了此事件,不执行finish回掉
|
|
976
994
|
*/
|
|
977
995
|
onPreFinish: {
|
|
978
|
-
type: PropType<(...e: any[]) => boolean>;
|
|
996
|
+
type: PropType<(...e: any[]) => boolean | undefined>;
|
|
979
997
|
default: undefined;
|
|
980
998
|
};
|
|
981
999
|
};
|
|
@@ -1123,6 +1141,7 @@ interface IProFormListProvide {
|
|
|
1123
1141
|
}
|
|
1124
1142
|
declare const useProFormList: () => IProFormListProvide;
|
|
1125
1143
|
declare const provideProFormList: (ctx: IProFormListProvide) => void;
|
|
1144
|
+
declare type TOriginFn = () => void;
|
|
1126
1145
|
declare const proFormListProps: () => {
|
|
1127
1146
|
rowKey: {
|
|
1128
1147
|
type: StringConstructor;
|
|
@@ -1148,6 +1167,18 @@ declare const proFormListProps: () => {
|
|
|
1148
1167
|
renderItemMinus: {
|
|
1149
1168
|
type: PropType<() => VNode>;
|
|
1150
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
|
+
};
|
|
1151
1182
|
};
|
|
1152
1183
|
declare type ProFormListProps = Partial<ExtractPropTypes<ReturnType<typeof proFormListProps>>> & Omit<ProGridProps, "items">;
|
|
1153
1184
|
declare const ProFormList: vue.DefineComponent<ProFormListProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProFormListProps>, {}>;
|
|
@@ -1373,10 +1404,18 @@ declare const proTableProps: () => {
|
|
|
1373
1404
|
tableMethods: {
|
|
1374
1405
|
type: PropType<string[]>;
|
|
1375
1406
|
};
|
|
1407
|
+
/**
|
|
1408
|
+
* 行、列合并配置
|
|
1409
|
+
*/
|
|
1410
|
+
mergeOpts: {
|
|
1411
|
+
type: PropType<TTableMergeOpts>;
|
|
1412
|
+
};
|
|
1413
|
+
dataSource: {
|
|
1414
|
+
type: PropType<Record<string, any>[]>;
|
|
1415
|
+
};
|
|
1376
1416
|
};
|
|
1377
1417
|
declare type ProTableProps = Partial<ExtractPropTypes<ReturnType<typeof proTableProps>>> & ProBaseProps & {
|
|
1378
1418
|
loading?: boolean;
|
|
1379
|
-
dataSource?: Record<string, any>[];
|
|
1380
1419
|
};
|
|
1381
1420
|
declare const ProTable: vue.DefineComponent<ProTableProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProTableProps>, {}>;
|
|
1382
1421
|
|
|
@@ -2224,8 +2263,6 @@ declare const ProCurd: vue.DefineComponent<ProCurdProps, {}, {}, {}, {}, vue.Com
|
|
|
2224
2263
|
interface IProCurdProvide {
|
|
2225
2264
|
columns: Ref<TColumns>;
|
|
2226
2265
|
getSignColumns: (signName: string) => TColumns;
|
|
2227
|
-
getFormItemVNode: (column: TColumn) => VNode | null;
|
|
2228
|
-
getItemVNode: (column: TColumn, value: any) => VNode | null;
|
|
2229
2266
|
elementMap: TElementMap;
|
|
2230
2267
|
formElementMap: TElementMap;
|
|
2231
2268
|
rowKey: string;
|
|
@@ -2430,4 +2467,4 @@ declare const getSignValue: <T = any>(item: TColumn, signName: string) => T;
|
|
|
2430
2467
|
*/
|
|
2431
2468
|
declare const filterSlotsByPrefix: (slots: Record<string, any>, prefix: string) => lodash.Dictionary<any>;
|
|
2432
2469
|
|
|
2433
|
-
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,
|
|
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 };
|