@ccs-ui/rc-pro 1.1.21-beta-3 → 1.1.21-beta-5
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/es/dialog/HookModal.d.ts +1 -1
- package/es/pro-table/table.d.ts +2 -0
- package/es/pro-table/table.js +21 -2
- package/es/table/index.d.ts +2 -2
- package/es/table/index.js +10 -0
- package/package.json +2 -3
package/es/dialog/HookModal.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { FormProps } from 'antd';
|
|
3
3
|
import { DialogFormRef } from './form';
|
|
4
4
|
import { CcsDialogModal, CcsDialogModalProps } from './hook';
|
|
5
|
-
export declare const DialogSelfButton: ({ auth, formRef, formInitialValues, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "
|
|
5
|
+
export declare const DialogSelfButton: ({ auth, formRef, formInitialValues, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "request" | "auth" | "onRequestBefore" | "onCancel"> & {
|
|
6
6
|
formRef: React.RefObject<DialogFormRef>;
|
|
7
7
|
formInitialValues: FormProps['initialValues'];
|
|
8
8
|
}) => import("react/jsx-runtime").JSX.Element;
|
package/es/pro-table/table.d.ts
CHANGED
package/es/pro-table/table.js
CHANGED
|
@@ -392,8 +392,26 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
392
392
|
c.sortOrder = sorter === null || sorter === void 0 ? void 0 : sorter.order;
|
|
393
393
|
}
|
|
394
394
|
});
|
|
395
|
+
|
|
396
|
+
// 设置orderProps 与后端保持一致
|
|
397
|
+
var orderProps = [];
|
|
398
|
+
if (Array.isArray(sorter)) {
|
|
399
|
+
sorter.forEach(function (s) {
|
|
400
|
+
orderProps.push({
|
|
401
|
+
prop: s.field,
|
|
402
|
+
ascending: s.order === 'ascend'
|
|
403
|
+
});
|
|
404
|
+
});
|
|
405
|
+
} else {
|
|
406
|
+
if (sorter.order) {
|
|
407
|
+
orderProps.push({
|
|
408
|
+
prop: sorter.field,
|
|
409
|
+
ascending: sorter.order === 'ascend'
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
}
|
|
395
413
|
filtersRef.current = _objectSpread(_objectSpread({}, filtersRef.current), {}, {
|
|
396
|
-
|
|
414
|
+
orderProps: orderProps
|
|
397
415
|
});
|
|
398
416
|
}
|
|
399
417
|
onRequest('changePage', paginationTable.current || 0, paginationTable.pageSize || 10);
|
|
@@ -448,7 +466,8 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
448
466
|
}, table), {}, {
|
|
449
467
|
columns: columns,
|
|
450
468
|
showSorterTooltip: true,
|
|
451
|
-
loading: table.loading || data.loading || false
|
|
469
|
+
loading: table.loading || data.loading || false,
|
|
470
|
+
showNumber: props.showNumber
|
|
452
471
|
}));
|
|
453
472
|
};
|
|
454
473
|
var isDark = token._appTheme === 'dark';
|
package/es/table/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CcsTableProps } from '../pro-table/table';
|
|
1
|
+
import { CcsProTableProps, CcsTableProps } from '../pro-table/table';
|
|
2
2
|
import './index.less';
|
|
3
|
-
type TableProps<T> = Omit<CcsTableProps<T>, 'request' | 'requestParam'>;
|
|
3
|
+
type TableProps<T> = Omit<CcsTableProps<T>, 'request' | 'requestParam'> & Pick<CcsProTableProps<T>, 'showNumber'>;
|
|
4
4
|
declare const CustomTable: <T extends object = any>(props: TableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export default CustomTable;
|
package/es/table/index.js
CHANGED
|
@@ -161,6 +161,16 @@ var CustomTable = function CustomTable(props) {
|
|
|
161
161
|
};
|
|
162
162
|
};
|
|
163
163
|
});
|
|
164
|
+
if (restProps.showNumber) {
|
|
165
|
+
cls === null || cls === void 0 ? void 0 : cls.unshift({
|
|
166
|
+
title: '序号',
|
|
167
|
+
ellipsis: true,
|
|
168
|
+
width: 60,
|
|
169
|
+
render: function render(_value, _record, index) {
|
|
170
|
+
return (index + 1) * (pageNo || 1);
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
164
174
|
return cls;
|
|
165
175
|
};
|
|
166
176
|
var _theme$useToken = theme.useToken(),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ccs-ui/rc-pro",
|
|
3
|
-
"version": "1.1.21-beta-
|
|
4
|
-
"description": "ProTable在抽屉中吸顶异常;",
|
|
3
|
+
"version": "1.1.21-beta-5",
|
|
4
|
+
"description": "ProTable在抽屉中吸顶异常;table排序参数修改保持与后端一致;table添加序号",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Hong",
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
"lint": "npm run lint:es && npm run lint:css",
|
|
22
22
|
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
|
|
23
23
|
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
|
24
|
-
"prepare": "husky install && dumi setup",
|
|
25
24
|
"prepublishOnly": "father doctor && npm run build",
|
|
26
25
|
"publish:beta": "father build && npm publish --tag=beta && cnpm sync @ccs-ui/rc-pro",
|
|
27
26
|
"publish:prod": "father build && npm publish && cnpm sync @ccs-ui/rc-pro",
|