@pisell/materials 1.0.439 → 1.0.441

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.
@@ -8,6 +8,7 @@
8
8
  border-radius: 12px;
9
9
  background-size: cover;
10
10
  height: 190px;
11
+ background-position: center center;
11
12
  .pisell-card-name-wrap {
12
13
  display: flex;
13
14
  justify-content: space-between;
@@ -54,11 +54,17 @@ var BasicTable = function BasicTable(props) {
54
54
  return isArr(group) && group.length > 0;
55
55
  }, [group]);
56
56
  var showTotal = pagination.showTotal,
57
- localPagination = pagination.localPagination;
57
+ localPagination = pagination.localPagination,
58
+ showSizeChange = pagination.showSizeChange;
58
59
  var _showTotal = useCallback(function (total, range) {
59
60
  var _size = formPagination.size || 10;
60
61
  return showTotal(total, range, _size);
61
62
  }, [showTotal, formPagination === null || formPagination === void 0 ? void 0 : formPagination.page, formPagination === null || formPagination === void 0 ? void 0 : formPagination.size]);
63
+ useEffect(function () {
64
+ // 默认100条每页
65
+ var _size = formPagination.size || 100;
66
+ showSizeChange && showSizeChange(formPagination === null || formPagination === void 0 ? void 0 : formPagination.page, _size);
67
+ }, [formPagination === null || formPagination === void 0 ? void 0 : formPagination.page, formPagination === null || formPagination === void 0 ? void 0 : formPagination.size]);
62
68
 
63
69
  // 分割数据源
64
70
  var _dataSource = useMemo(function () {
@@ -1,4 +1,4 @@
1
- export declare const FIELD_VALUE_HEIGHT = 53;
1
+ export declare const FIELD_VALUE_HEIGHT = 55;
2
2
  export declare const FIELD_LABEL_HEIGHT = 26;
3
3
  export declare const TITLE_LENE_HEIGHT = 32;
4
4
  export declare const TITLE_VERTICAL_SPACING = 18;
@@ -1,4 +1,4 @@
1
- export var FIELD_VALUE_HEIGHT = 53;
1
+ export var FIELD_VALUE_HEIGHT = 55;
2
2
  export var FIELD_LABEL_HEIGHT = 26;
3
3
  export var TITLE_LENE_HEIGHT = 32;
4
4
  export var TITLE_VERTICAL_SPACING = 18;
@@ -8,6 +8,7 @@
8
8
  border-radius: 12px;
9
9
  background-size: cover;
10
10
  height: 190px;
11
+ background-position: center center;
11
12
  .pisell-card-name-wrap {
12
13
  display: flex;
13
14
  justify-content: space-between;
@@ -55,7 +55,7 @@ var BasicTable = (props) => {
55
55
  const group = import_antd.Form.useWatch("group_by", { form, preserve: true });
56
56
  const { dispatch } = (0, import_hooks.useSharedState)(import_model.Context);
57
57
  const isGroup = (0, import_react.useMemo)(() => (0, import_utils2.isArr)(group) && group.length > 0, [group]);
58
- const { showTotal, localPagination } = pagination;
58
+ const { showTotal, localPagination, showSizeChange } = pagination;
59
59
  const _showTotal = (0, import_react.useCallback)(
60
60
  (total2, range) => {
61
61
  let _size = formPagination.size || 10;
@@ -63,6 +63,10 @@ var BasicTable = (props) => {
63
63
  },
64
64
  [showTotal, formPagination == null ? void 0 : formPagination.page, formPagination == null ? void 0 : formPagination.size]
65
65
  );
66
+ (0, import_react.useEffect)(() => {
67
+ let _size = formPagination.size || 100;
68
+ showSizeChange && showSizeChange(formPagination == null ? void 0 : formPagination.page, _size);
69
+ }, [formPagination == null ? void 0 : formPagination.page, formPagination == null ? void 0 : formPagination.size]);
66
70
  const _dataSource = (0, import_react.useMemo)(() => {
67
71
  let _page = formPagination.page;
68
72
  let _size = formPagination.size || 10;
@@ -1,4 +1,4 @@
1
- export declare const FIELD_VALUE_HEIGHT = 53;
1
+ export declare const FIELD_VALUE_HEIGHT = 55;
2
2
  export declare const FIELD_LABEL_HEIGHT = 26;
3
3
  export declare const TITLE_LENE_HEIGHT = 32;
4
4
  export declare const TITLE_VERTICAL_SPACING = 18;
@@ -25,7 +25,7 @@ __export(constant_exports, {
25
25
  TITLE_VERTICAL_SPACING: () => TITLE_VERTICAL_SPACING
26
26
  });
27
27
  module.exports = __toCommonJS(constant_exports);
28
- var FIELD_VALUE_HEIGHT = 53;
28
+ var FIELD_VALUE_HEIGHT = 55;
29
29
  var FIELD_LABEL_HEIGHT = 26;
30
30
  var TITLE_LENE_HEIGHT = 32;
31
31
  var TITLE_VERTICAL_SPACING = 18;
@@ -992,6 +992,28 @@ export default {
992
992
  value: 'target => !!target.getProps().getPropValue("pagination")',
993
993
  },
994
994
  },
995
+ {
996
+ name: "pagination.showSizeChange",
997
+ title: {
998
+ label: "页数改变",
999
+ tip: "pagination.showSizeChange | pageSize 变化的回调",
1000
+ },
1001
+ propType: "func",
1002
+ setter: [
1003
+ {
1004
+ componentName: "FunctionSetter",
1005
+ props: {
1006
+ template:
1007
+ "showSizeChange(current,size,${extParams}){\n// pageSize 变化的回调\nconsole.log('showSizeChange', current, size);\n}",
1008
+ },
1009
+ },
1010
+ "VariableSetter",
1011
+ ],
1012
+ condition: {
1013
+ type: "JSFunction",
1014
+ value: 'target => !!target.getProps().getPropValue("pagination")',
1015
+ },
1016
+ },
995
1017
  {
996
1018
  name: "pagination.localPagination",
997
1019
  title: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "1.0.439",
3
+ "version": "1.0.441",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -64,9 +64,9 @@
64
64
  "react-virtualized-auto-sizer": "^1.0.20",
65
65
  "crypto-js": "^4.2.0",
66
66
  "@zxing/library": "0.21.2",
67
- "@pisell/utils": "1.0.42",
67
+ "@pisell/icon": "0.0.10",
68
68
  "@pisell/date-picker": "1.0.111",
69
- "@pisell/icon": "0.0.10"
69
+ "@pisell/utils": "1.0.42"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "react": "^18.0.0",