ls-pro-common 3.1.16 → 3.1.18
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/common.js +1 -1
- package/dist/common.min.js +1 -1
- package/es/components/InputTable.d.ts +2 -2
- package/es/components/InputTable.js +5 -2
- package/es/hooks/useDtl/index.d.ts +1 -1
- package/es/hooks/useDtl/index.js +367 -374
- package/es/hooks/useSingle/index.d.ts +1 -1
- package/es/hooks/useSingle/index.js +222 -222
- package/es/http/index.js +10 -4
- package/lib/components/InputTable.d.ts +2 -2
- package/lib/components/InputTable.js +5 -2
- package/lib/hooks/useDtl/index.d.ts +1 -1
- package/lib/hooks/useDtl/index.js +367 -374
- package/lib/hooks/useSingle/index.d.ts +1 -1
- package/lib/hooks/useSingle/index.js +222 -222
- package/lib/http/index.js +10 -4
- package/package.json +1 -1
|
@@ -48,7 +48,7 @@ export declare type InputTableProps = ProFormItemProps<InputProps> & {
|
|
|
48
48
|
/** @name 选择行事件 */
|
|
49
49
|
onSelectChange?: (item: any, formRef?: any) => void;
|
|
50
50
|
/** @name 加载之前事件,param为查询条件对象,可以通过此方法调整 */
|
|
51
|
-
beforeLoad?: (param: any) =>
|
|
51
|
+
beforeLoad?: (param: any) => any;
|
|
52
52
|
/** @name 加载之后事件,row为接口返回数据,可以通过此方法调整 */
|
|
53
53
|
afterLoad?: (rows: any[]) => void;
|
|
54
54
|
getPopupContainer?: (triggerNode: any) => HTMLElement;
|
|
@@ -108,7 +108,7 @@ declare const InputTable: React.ForwardRefExoticComponent<{
|
|
|
108
108
|
/** @name 选择行事件 */
|
|
109
109
|
onSelectChange?: ((item: any, formRef?: any) => void) | undefined;
|
|
110
110
|
/** @name 加载之前事件,param为查询条件对象,可以通过此方法调整 */
|
|
111
|
-
beforeLoad?: ((param: any) =>
|
|
111
|
+
beforeLoad?: ((param: any) => any) | undefined;
|
|
112
112
|
/** @name 加载之后事件,row为接口返回数据,可以通过此方法调整 */
|
|
113
113
|
afterLoad?: ((rows: any[]) => void) | undefined;
|
|
114
114
|
getPopupContainer?: ((triggerNode: any) => HTMLElement) | undefined;
|
|
@@ -141,7 +141,7 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
141
141
|
};
|
|
142
142
|
var loadData = /*#__PURE__*/function () {
|
|
143
143
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(param) {
|
|
144
|
-
var current, pageSize, restParams, _selectRowRef$current, _rows, data, _tableRef$current2, _tableRef$current2$cl, result, rows, formValue, val, _selectRowRef$current2, arr, pageSelectedRows;
|
|
144
|
+
var current, pageSize, restParams, _selectRowRef$current, _rows, data, _tableRef$current2, _tableRef$current2$cl, _param, result, rows, formValue, val, _selectRowRef$current2, arr, pageSelectedRows;
|
|
145
145
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
146
146
|
while (1) switch (_context.prev = _context.next) {
|
|
147
147
|
case 0:
|
|
@@ -185,7 +185,10 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
185
185
|
(_tableRef$current2 = tableRef.current) === null || _tableRef$current2 === void 0 ? void 0 : (_tableRef$current2$cl = _tableRef$current2.clearSelected) === null || _tableRef$current2$cl === void 0 ? void 0 : _tableRef$current2$cl.call(_tableRef$current2);
|
|
186
186
|
}
|
|
187
187
|
if (beforeLoad) {
|
|
188
|
-
beforeLoad(data);
|
|
188
|
+
_param = beforeLoad(data);
|
|
189
|
+
if (typeof _param !== 'boolean' && _param !== undefined) {
|
|
190
|
+
data = _param;
|
|
191
|
+
}
|
|
189
192
|
}
|
|
190
193
|
if (!(method !== 'GET')) {
|
|
191
194
|
_context.next = 20;
|
|
@@ -36,7 +36,7 @@ declare function useDtl(dtlParam: DtlParamType): {
|
|
|
36
36
|
onRemoveDtl: (rows?: any) => void;
|
|
37
37
|
onSaveDtl: (formData: any) => Promise<boolean>;
|
|
38
38
|
onLoadDtl: (params: Record<string, any>, sort: Record<string, any>, filter: Record<string, any>) => Promise<any>;
|
|
39
|
-
onAddDtl: (item?: any) => Promise<boolean>;
|
|
39
|
+
onAddDtl: (item?: any) => Promise<boolean | undefined>;
|
|
40
40
|
onEditDtl: (item?: any) => Promise<boolean>;
|
|
41
41
|
onSaveMst: (values: any) => Promise<boolean>;
|
|
42
42
|
onSaveMstDtl: (isDelete?: boolean) => Promise<boolean | undefined>;
|