@fle-ui/plus-table 1.2.28 → 1.2.30-beta.1

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.
Files changed (33) hide show
  1. package/es/{FormSearch → components/FormSearch}/FormRender.d.ts +1 -1
  2. package/es/{FormSearch → components/FormSearch}/FormRender.js +1 -2
  3. package/es/{FormSearch → components/FormSearch}/index.less +5 -3
  4. package/es/index.d.ts +3 -3
  5. package/es/index.js +420 -336
  6. package/es/mock/list.json +720 -0
  7. package/es/utils/common.d.ts +0 -10
  8. package/es/utils/common.js +0 -5
  9. package/lib/{FormSearch → components/FormSearch}/FormRender.d.ts +1 -1
  10. package/lib/{FormSearch → components/FormSearch}/FormRender.js +3 -4
  11. package/lib/{FormSearch → components/FormSearch}/index.less +5 -3
  12. package/lib/index.d.ts +3 -3
  13. package/lib/index.js +419 -335
  14. package/lib/mock/list.json +720 -0
  15. package/lib/utils/common.d.ts +0 -10
  16. package/lib/utils/common.js +1 -7
  17. package/package.json +6 -6
  18. package/es/components/icon/index.d.ts +0 -3
  19. package/es/components/icon/index.js +0 -7
  20. package/es/json/columnKeys.d.ts +0 -15
  21. package/es/json/columnKeys.js +0 -182
  22. package/es/json/list.d.ts +0 -1365
  23. package/es/json/list.js +0 -1388
  24. package/lib/components/icon/index.d.ts +0 -3
  25. package/lib/components/icon/index.js +0 -13
  26. package/lib/json/columnKeys.d.ts +0 -15
  27. package/lib/json/columnKeys.js +0 -188
  28. package/lib/json/list.d.ts +0 -1365
  29. package/lib/json/list.js +0 -1394
  30. /package/es/{FormSearch → components/FormSearch}/index.d.ts +0 -0
  31. /package/es/{FormSearch → components/FormSearch}/index.js +0 -0
  32. /package/lib/{FormSearch → components/FormSearch}/index.d.ts +0 -0
  33. /package/lib/{FormSearch → components/FormSearch}/index.js +0 -0
@@ -7,16 +7,6 @@ interface ShowMoneyType {
7
7
  (data: moneyType): string;
8
8
  }
9
9
  export declare const showMoney: ShowMoneyType;
10
- /**
11
- * 时间格式化
12
- * @param data
13
- * @param fmtType
14
- */
15
- type timeType = Date | number | string;
16
- interface ShowTimeType {
17
- (data: timeType, fmtType: string): string;
18
- }
19
- export declare const showTime: ShowTimeType;
20
10
  /**
21
11
  * 格式化url参数
22
12
  */
@@ -1,14 +1,9 @@
1
1
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
2
2
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
3
3
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
4
- import dayjs from 'dayjs';
5
4
  export var showMoney = function showMoney(data) {
6
5
  return (+data / 100).toFixed(2);
7
6
  };
8
- export var showTime = function showTime(data) {
9
- var fmtType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'YYYY-MM-DD HH:mm:ss';
10
- return data ? dayjs(data).format(fmtType) : '';
11
- };
12
7
  /**
13
8
  * 格式化url参数
14
9
  */
@@ -1,4 +1,4 @@
1
- import type { BaseQueryFilterProps, ProFormInstance, ProFormProps } from '@ant-design/pro-form';
1
+ import type { BaseQueryFilterProps, ProFormInstance, ProFormProps } from '@ant-design/pro-components';
2
2
  import type { ProSchemaComponentTypes } from '@ant-design/pro-utils';
3
3
  import type { FormItemProps } from 'antd';
4
4
  import React from 'react';
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _proForm = require("@ant-design/pro-form");
8
- var _proProvider = require("@ant-design/pro-provider");
7
+ var _proComponents = require("@ant-design/pro-components");
9
8
  var _antd = require("antd");
10
9
  var _classnames = _interopRequireDefault(require("classnames"));
11
10
  var _omit = _interopRequireDefault(require("omit.js"));
@@ -106,7 +105,7 @@ var FormRender = function FormRender(_ref) {
106
105
  searchConfig = _ref.search,
107
106
  formConfig = _ref.form,
108
107
  bordered = _ref.bordered;
109
- var _useContext = (0, _react.useContext)(_proProvider.ProProvider),
108
+ var _useContext = (0, _react.useContext)(_proComponents.ProProvider),
110
109
  hashId = _useContext.hashId;
111
110
  var isForm = type === 'form';
112
111
  /** 提交表单,根据两种模式不同,方法不相同 */
@@ -173,7 +172,7 @@ var FormRender = function FormRender(_ref) {
173
172
  }, [submitButtonLoading]);
174
173
  return /*#__PURE__*/_react.default.createElement("div", {
175
174
  className: (0, _classnames.default)(hashId, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, getPrefixCls('pro-card'), true), "".concat(getPrefixCls('pro-card'), "-border"), !!bordered), "".concat(getPrefixCls('pro-card'), "-bordered"), !!bordered), "".concat(getPrefixCls('pro-card'), "-ghost"), !!ghost), className, true), formClassName, isForm), getPrefixCls("pro-table-search-".concat(toLowerLine(competentName))), true), "".concat(className, "-ghost"), ghost), searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.className, searchConfig !== false && (searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.className)))
176
- }, /*#__PURE__*/_react.default.createElement(_proForm.BetaSchemaForm, _extends({
175
+ }, /*#__PURE__*/_react.default.createElement(_proComponents.BetaSchemaForm, _extends({
177
176
  layoutType: competentName,
178
177
  columns: columnsList,
179
178
  type: type
@@ -3,9 +3,6 @@
3
3
  ::-webkit-scrollbar {
4
4
  width: 2px;
5
5
  }
6
- // .ant-tree-checkbox-checked
7
- // .ant-tree-checkbox-disabled
8
- // pointer-events: none;
9
6
  .ant-pro-query-filter-row {
10
7
  row-gap: 12px;
11
8
  }
@@ -56,4 +53,9 @@
56
53
  &.turn-left {
57
54
  width: calc(100% - 356px);
58
55
  }
56
+
57
+ // antd tree 的虚拟滚动有问题,无法滚动到底部,这里强制使用原生滚动
58
+ .ant-tree.ant-tree-block-node .ant-tree-list-holder-inner {
59
+ transform: none !important;
60
+ }
59
61
  }
package/lib/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import type { ProTableProps, ProColumns } from '@ant-design/pro-components';
3
- import './FormSearch/index.less';
3
+ import './components/FormSearch/index.less';
4
4
  interface PlusColumns extends ProColumns {
5
5
  baseSearch?: boolean;
6
6
  }
7
7
  export type { PlusColumns };
8
- export type settingsColumns = {
8
+ export type SettingsColumns = {
9
9
  [key: string]: {
10
10
  hideInTable?: boolean;
11
11
  show?: boolean;
@@ -21,7 +21,7 @@ interface PlusTableProps<DataSource, U, ValueType> extends Omit<ProTableProps<Da
21
21
  columns: PlusColumns[];
22
22
  top?: number;
23
23
  fetchSetting?: () => Promise<Record<string, any>>;
24
- updateSetting?: (params: settingsColumns) => void;
24
+ updateSetting?: (params: SettingsColumns) => void;
25
25
  resetSetting?: () => Promise<{
26
26
  success: boolean;
27
27
  }>;