vap1 0.7.2 → 0.7.4

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.
@@ -87,6 +87,10 @@ var VList = function (props) {
87
87
  return react_1.default.createElement("div", { style: style, className: clazz },
88
88
  react_1.default.createElement(SearchTool_1.SearchTool, __assign({}, props, { onSearch: function (data) { return model.query(data, true); }, defaultParam: props.defaultParam, extraAction: extraAction, children: lodash_1.default.isEmpty(props.actionBar) ? undefined : (lodash_1.default.isArray(props.actionBar) ? react_1.default.createElement(ActionButtons_1.ActionButtons, { buttons: props.actionBar }) : props.actionBar) })),
89
89
  react_1.default.createElement(BaseList_1.BaseList, __assign({}, props, { layout: layout, style: null, className: null, dataSource: model.list, loading: model.isQuerying })),
90
- props.pagination !== false && react_1.default.createElement(Upagination_1.UPagination, __assign({}, (0, Upagination_1.defaultPaginationProps)(props.pagination), { disabled: model.isQuerying, total: model.total, totalAcc: model.totalAcc, onChange: model.pageTo })));
90
+ props.pagination !== false && react_1.default.createElement(Upagination_1.UPagination
91
+ // {...defaultPaginationProps(props.pagination)}
92
+ , {
93
+ // {...defaultPaginationProps(props.pagination)}
94
+ disabled: model.isQuerying, total: model.total, totalAcc: model.totalAcc, onChange: model.pageTo }));
91
95
  };
92
96
  exports.VList = VList;
@@ -71,7 +71,8 @@ var ApiTable_1 = require("./ApiTable");
71
71
  var utils_1 = require("../../utils");
72
72
  var API_TABLE_PROPERTIES = [
73
73
  'api', 'aop', 'tipDisabled', 'tipField',
74
- 'mode', 'columns', 'showIndex', 'rowKey', 'select', 'selectDisabled', 'actionBar', 'selectBar', 'searchBar', 'default', 'defaultParam', 'autoLoad'
74
+ 'mode', 'columns', 'showIndex', 'rowKey', 'select', 'selectDisabled', 'actionBar', 'selectBar', 'searchBar', 'default', 'defaultParam', 'autoLoad',
75
+ 'pagination',
75
76
  ];
76
77
  exports.ApiTableModal = (0, react_1.forwardRef)(function (props, ref) {
77
78
  var modalProps = lodash_1.default.omit(props, API_TABLE_PROPERTIES);
@@ -93,18 +94,8 @@ exports.ApiTableModal = (0, react_1.forwardRef)(function (props, ref) {
93
94
  }
94
95
  }
95
96
  else {
96
- tableProps.pagination = { pageSize: utils_1.GLOBAL.CONFIG.PAGINATION.SIZE_SMALL };
97
+ tableProps.pagination = { pageSize: utils_1.GLOBAL.CONFIG.PAGINATION.SIZE_SMALL, };
97
98
  }
98
- // if (props.height) {
99
- // if (modalProps.bodyStyle) {
100
- // modalProps.bodyStyle.height = props.height;
101
- // } else {
102
- // modalProps.bodyStyle = { height: props.height };
103
- // }
104
- // tableProps.mode = "inner";
105
- // }
106
- // if (props.width && ) {
107
- // }
108
99
  return react_1.default.createElement(Modal_1.Modal, __assign({ footer: null }, modalProps),
109
100
  react_1.default.createElement(ApiTable_1.ApiTable, __assign({ key: tableKey }, tableProps, { ref: ref })));
110
101
  });
@@ -96,13 +96,6 @@ var _VTable = (0, react_1.forwardRef)(function (props) {
96
96
  var _a = (0, useTableContext_1.useTableContext)(), selectedRowKeys = _a.selectedRowKeys, initObjects = _a.initObjects, reflushPage = _a.reflushPage, setSelection = _a.setSelection;
97
97
  var _b = (0, Box_1.useBox)(), state = _b.state, root = _b.root, resize = _b.resize;
98
98
  var update = (0, hooks_1.useUpdate)();
99
- var inModal = (0, react_1.useMemo)(function () {
100
- if (root.current == null)
101
- return false;
102
- return root.current.parentElement.parentElement.classList.contains('ant-modal-body')
103
- || root.current.parentElement.parentElement.parentElement.classList.contains('ant-modal-body')
104
- || root.current.parentElement.parentElement.parentElement.parentElement.classList.contains('ant-modal-body');
105
- }, []);
106
99
  var _c = __read((0, react_1.useState)(undefined), 2), scroll = _c[0], setScroll = _c[1];
107
100
  var _d = props.model, rowKey = _d.rowKey, list = _d.list, isQuerying = _d.isQuerying, pageNo = _d.pageNo, pageSize = _d.pageSize, orderBy = _d.orderBy, query = _d.query, total = _d.total, cost = _d.cost;
108
101
  var _e = __read((0, react_1.useState)([false, false]), 2), _f = __read(_e[0], 2), pageEnterd = _f[0], pageLoaded = _f[1], setSatus = _e[1];
@@ -301,12 +294,15 @@ var VTableRoot = (0, react_1.forwardRef)(function (props, ref) {
301
294
  onChange: pageTo,
302
295
  };
303
296
  if (props.pagination) {
304
- if (props.pagination.hideOnSinglePage) {
305
- pagination.hideOnSinglePage = true;
306
- }
307
- if (props.pagination.className) {
308
- pagination.className = props.pagination.className;
309
- }
297
+ lodash_1.default.assign(pagination, lodash_1.default.pick(props.pagination, [
298
+ 'defaultPageSize',
299
+ 'hideOnSinglePage',
300
+ 'className',
301
+ 'pageSizeOptions',
302
+ 'pageSize',
303
+ 'showSizeChanger',
304
+ 'showQuickJumper',
305
+ ]));
310
306
  }
311
307
  }
312
308
  return react_1.default.createElement(Box_1.Box, __assign({}, boxBaseProps, { pagination: pagination }),
@@ -177,7 +177,7 @@ var _Dtree = function (props) {
177
177
  // @ts-ignore
178
178
  { props: { data: { node: tree[0], position: [0] } } }
179
179
  ]
180
- });
180
+ }, tree);
181
181
  }
182
182
  return [2 /*return*/];
183
183
  }
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"vap1","version":"0.7.2","description":"vap1, Both support MicroService and SAP FrameWork, Support IE>9","main":"index.js","author":"Xiang da","license":"ISC"}
1
+ {"name":"vap1","version":"0.7.4","description":"vap1, Both support MicroService and SAP FrameWork, Support IE>9","main":"index.js","author":"Xiang da","license":"ISC"}
package/utils/VAP.js CHANGED
@@ -116,7 +116,6 @@ var _INIT = function (confs) {
116
116
  }
117
117
  });
118
118
  _VAP_LOAD_FN.loaded = true;
119
- // console.log('load', _VAP_LOAD_FN.fns)
120
119
  while (_VAP_LOAD_FN.fns.length > 0) {
121
120
  var fn = _VAP_LOAD_FN.fns.shift();
122
121
  if (typeof fn == 'function') {