@zat-design/sisyphus-react 3.0.16-beta.2 → 3.0.16-beta.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.
Files changed (63) hide show
  1. package/dist/index.esm.css +5 -2
  2. package/es/ProEnum/getEnumLabel.js +1 -1
  3. package/es/ProEnum/index.js +1 -1
  4. package/es/ProEnum/useEnum.js +1 -1
  5. package/es/ProForm/components/FormFooter/index.js +1 -1
  6. package/es/ProForm/components/base/DatePicker/index.js +1 -1
  7. package/es/ProForm/components/base/Input/index.js +1 -1
  8. package/es/ProForm/components/base/InputNumber/index.js +1 -1
  9. package/es/ProForm/components/base/Select/index.js +1 -1
  10. package/es/ProForm/components/base/Switch/index.js +1 -1
  11. package/es/ProForm/components/base/TextArea/index.js +1 -1
  12. package/es/ProForm/components/combination/ProAddressBar/index.js +1 -1
  13. package/es/ProForm/components/combination/ProModalSelect/index.js +1 -1
  14. package/es/ProForm/components/combination/ProRangeLimit/index.js +1 -1
  15. package/es/ProForm/components/old/EnumSelect/index.js +1 -1
  16. package/es/ProForm/index.js +1 -1
  17. package/es/ProSelect/index.js +1 -1
  18. package/es/ProTable/index.js +1 -1
  19. package/es/ProTable/propsType.d.ts +1 -1
  20. package/es/ProTable/useAntdTable.js +10 -3
  21. package/es/ProTable/utils.js +1 -1
  22. package/es/ProThemeTools/component/PrdTools/index.js +23 -4
  23. package/es/ProThemeTools/component/PrdTools/style/index.less +4 -0
  24. package/es/ProThemeTools/index.js +23 -6
  25. package/es/ProThemeTools/propsType.d.ts +6 -1
  26. package/es/ProThemeTools/utils/index.d.ts +5 -0
  27. package/es/ProThemeTools/utils/index.js +18 -0
  28. package/es/ProTreeModal/index.js +1 -1
  29. package/es/ProTreeSelect/index.js +35 -13
  30. package/es/ProTreeSelect/style/index.less +2 -2
  31. package/es/ProUpload/Example.js +1 -1
  32. package/lib/ProEnum/getEnumLabel.js +3 -3
  33. package/lib/ProEnum/index.js +4 -4
  34. package/lib/ProEnum/useEnum.js +3 -3
  35. package/lib/ProForm/components/FormFooter/index.js +2 -2
  36. package/lib/ProForm/components/base/DatePicker/index.js +2 -2
  37. package/lib/ProForm/components/base/Input/index.js +2 -2
  38. package/lib/ProForm/components/base/InputNumber/index.js +2 -2
  39. package/lib/ProForm/components/base/Select/index.js +2 -2
  40. package/lib/ProForm/components/base/Switch/index.js +2 -2
  41. package/lib/ProForm/components/base/TextArea/index.js +2 -2
  42. package/lib/ProForm/components/combination/ProAddressBar/index.js +2 -2
  43. package/lib/ProForm/components/combination/ProModalSelect/index.js +5 -5
  44. package/lib/ProForm/components/combination/ProRangeLimit/index.js +2 -2
  45. package/lib/ProForm/components/old/EnumSelect/index.js +2 -2
  46. package/lib/ProForm/index.js +2 -2
  47. package/lib/ProSelect/index.js +2 -2
  48. package/lib/ProTable/index.js +4 -4
  49. package/lib/ProTable/propsType.d.ts +1 -1
  50. package/lib/ProTable/useAntdTable.js +10 -3
  51. package/lib/ProTable/utils.js +2 -2
  52. package/lib/ProThemeTools/component/PrdTools/index.js +22 -3
  53. package/lib/ProThemeTools/component/PrdTools/style/index.less +4 -0
  54. package/lib/ProThemeTools/index.js +22 -5
  55. package/lib/ProThemeTools/propsType.d.ts +6 -1
  56. package/lib/ProThemeTools/utils/index.d.ts +5 -0
  57. package/lib/ProThemeTools/utils/index.js +21 -2
  58. package/lib/ProTreeModal/index.js +3 -3
  59. package/lib/ProTreeSelect/index.js +37 -15
  60. package/lib/ProTreeSelect/style/index.less +2 -2
  61. package/lib/ProUpload/Example.js +2 -2
  62. package/package.json +2 -2
  63. package/typings.d.ts +3 -3
@@ -2679,7 +2679,7 @@
2679
2679
  display: block;
2680
2680
  }
2681
2681
  .ant-select-dropdown.signal-tree .ant-select-tree .ant-select-tree-treenode:hover {
2682
- background-color: var(--zaui-disabled-bg, #f2f2f2);
2682
+ background-color: #f5f5f5;
2683
2683
  }
2684
2684
  .ant-select-dropdown.signal-tree .ant-select-tree .check-option-text .check-mark-icon {
2685
2685
  position: absolute;
@@ -2692,7 +2692,7 @@
2692
2692
  padding-left: 7px;
2693
2693
  }
2694
2694
  .ant-select-dropdown.checkable-tree .ant-select-tree .ant-select-tree-treenode:hover {
2695
- background-color: var(--zaui-disabled-bg, #f2f2f2);
2695
+ background-color: #f5f5f5;
2696
2696
  }
2697
2697
  .ant-select-dropdown.checkable-tree .ant-select-tree .ant-select-tree-node-content-wrapper {
2698
2698
  padding-right: 16px;
@@ -3556,6 +3556,9 @@
3556
3556
  .pro-theme-prd-tools-drawer .pro-theme-tools-space {
3557
3557
  margin-bottom: 24px;
3558
3558
  }
3559
+ .pro-theme-prd-tools-drawer .pro-theme-tools-space.pro-theme-tools-small-space {
3560
+ margin-bottom: 8px;
3561
+ }
3559
3562
  .pro-theme-prd-tools-drawer .ant-radio-button-wrapper {
3560
3563
  padding: 0 28px;
3561
3564
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { useProConfig } from 'zat-design-pro-component';
2
+ import { useProConfig } from '@zat-design/sisyphus-react';
3
3
  var EnumLabel = function EnumLabel(props) {
4
4
  var label = '';
5
5
  var fieldValue = '';
@@ -16,7 +16,7 @@ var _excluded = ["code", "type", "dataSource", "useRequest", "value", "onChange"
16
16
  import { useDeepCompareEffect, useRequest as useRequestFunc } from 'ahooks';
17
17
  import React, { useState, useEffect } from 'react';
18
18
  import { cloneDeep, isFunction } from 'lodash';
19
- import { ProSelect, useProConfig } from 'zat-design-pro-component';
19
+ import { ProSelect, useProConfig } from '@zat-design/sisyphus-react';
20
20
  import { isObject } from './utils';
21
21
  import getEnumLabel from './getEnumLabel';
22
22
  import useEnum from './useEnum';
@@ -1,6 +1,6 @@
1
1
  import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
2
2
  /* eslint-disable no-redeclare */
3
- import { useProConfig } from 'zat-design-pro-component';
3
+ import { useProConfig } from '@zat-design/sisyphus-react';
4
4
  import { getEnumData } from './utils';
5
5
  function useEnum(codes, value, compose) {
6
6
  var _ref = useProConfig('globalConfig') || {},
@@ -4,7 +4,7 @@ import "antd/es/space/style";
4
4
  import _Space from "antd/es/space";
5
5
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
6
6
  import React from 'react';
7
- import { useProConfig } from 'zat-design-pro-component';
7
+ import { useProConfig } from '@zat-design/sisyphus-react';
8
8
  var FormFooter = function FormFooter(props) {
9
9
  var initialConfig = useProConfig('FormFooter');
10
10
  var _initialConfig$props = _objectSpread(_objectSpread({}, initialConfig), props),
@@ -8,7 +8,7 @@ import { isFunction, isString } from 'lodash';
8
8
  import classNames from 'classnames';
9
9
  import moment from 'moment';
10
10
  import React from 'react';
11
- import { useProConfig } from 'zat-design-pro-component';
11
+ import { useProConfig } from '@zat-design/sisyphus-react';
12
12
  import Container from '../../Container';
13
13
  var DatePicker = function DatePicker(props) {
14
14
  var className = props.className,
@@ -4,7 +4,7 @@ import _Input from "antd/es/input";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  var _excluded = ["label", "form", "placeholder", "fieldName", "otherProps"];
6
6
  import React from 'react';
7
- import { useProConfig } from 'zat-design-pro-component';
7
+ import { useProConfig } from '@zat-design/sisyphus-react';
8
8
  import Container from '../../Container';
9
9
  // 参数优先级
10
10
  // 组件内默认值 < config默认值 < props
@@ -10,7 +10,7 @@ var _excluded = ["placeholder", "className", "otherProps", "range", "min", "max"
10
10
  import React, { useMemo } from 'react';
11
11
  import classNames from 'classnames';
12
12
  import Big from 'big.js';
13
- import { useProConfig } from 'zat-design-pro-component';
13
+ import { useProConfig } from '@zat-design/sisyphus-react';
14
14
  import { tools } from '@zat-design-pro-component/utils';
15
15
  import { isNull, isNumber, isUndefined } from 'lodash';
16
16
  import Container from '../../Container';
@@ -3,7 +3,7 @@ import "antd/es/select/style";
3
3
  import _Select from "antd/es/select";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  var _excluded = ["dataSource", "fieldNames", "otherProps"];
6
- import { useProConfig } from 'zat-design-pro-component';
6
+ import { useProConfig } from '@zat-design/sisyphus-react';
7
7
  import React from 'react';
8
8
  import Container from '../../Container';
9
9
  var Select = function Select(props) {
@@ -4,7 +4,7 @@ import _Switch from "antd/es/switch";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  var _excluded = ["disabled", "otherProps"];
6
6
  import React from 'react';
7
- import { useProConfig } from 'zat-design-pro-component';
7
+ import { useProConfig } from '@zat-design/sisyphus-react';
8
8
  import { isNull, isUndefined } from 'lodash';
9
9
  import Container from '../../Container';
10
10
  var Switch = function Switch(props) {
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
3
3
  import "antd/es/input/style";
4
4
  import _Input from "antd/es/input";
5
5
  var _excluded = ["placeholder", "otherProps"];
6
- import { useProConfig } from 'zat-design-pro-component';
6
+ import { useProConfig } from '@zat-design/sisyphus-react';
7
7
  import React from 'react';
8
8
  import Container from '../../Container';
9
9
  var TextArea = _Input.TextArea;
@@ -14,7 +14,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
14
14
  var _excluded = ["getPopupContainer", "hasDetail", "detailMaxLength", "fieldNames", "value", "disabled", "dataSource", "onChange", "useRequest", "transformResponse", "level", "isView", "enumCode", "tooltip"];
15
15
  import React, { useEffect, useState, memo, useMemo } from 'react';
16
16
  import { useSetState } from 'ahooks';
17
- import { useProConfig } from 'zat-design-pro-component';
17
+ import { useProConfig } from '@zat-design/sisyphus-react';
18
18
  import { tools } from '@zat-design-pro-component/utils';
19
19
  import useEnum from '../../../../ProEnum/useEnum';
20
20
  var transformDataName = tools.transformDataName;
@@ -20,7 +20,7 @@ import { useSetState } from 'ahooks';
20
20
  import { cloneDeep, isArray, isFunction } from 'lodash';
21
21
  import { ReactSVG } from 'react-svg';
22
22
  import React, { forwardRef, useEffect, useImperativeHandle } from 'react';
23
- import { ProForm, ProDrawerForm, ProTable, useProConfig } from 'zat-design-pro-component';
23
+ import { ProForm, ProDrawerForm, ProTable, useProConfig } from '@zat-design/sisyphus-react';
24
24
  import Container from '../../Container';
25
25
  import viewSvg from '../../../../assets/view.svg';
26
26
  import useRequestList from './hooks/useRequestList';
@@ -9,7 +9,7 @@ import _DatePicker from "antd/es/date-picker";
9
9
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
10
10
  var _excluded = ["disabled", "foreverText", "foreverDate", "format", "otherProps"];
11
11
  import React, { useMemo, useState } from 'react';
12
- import { useProConfig } from 'zat-design-pro-component';
12
+ import { useProConfig } from '@zat-design/sisyphus-react';
13
13
  import { omit } from 'lodash';
14
14
  import classNames from 'classnames';
15
15
  import moment from 'moment';
@@ -17,7 +17,7 @@ import { useSetState } from 'ahooks';
17
17
  import { cloneDeep } from 'lodash';
18
18
  import React, { forwardRef, useEffect } from 'react';
19
19
  import { ReactSVG } from 'react-svg';
20
- import { ProForm } from 'zat-design-pro-component';
20
+ import { ProForm } from '@zat-design/sisyphus-react';
21
21
  import InputWithSuffix from '../InputWithSuffix';
22
22
  import useRequestList from './hooks/useRequestList';
23
23
  import viewSvg from '../../../../assets/view.svg';
@@ -17,7 +17,7 @@ import { DoubleLeftOutlined } from '@ant-design/icons';
17
17
  import classnames from 'classnames';
18
18
  import React, { forwardRef, useImperativeHandle, useEffect } from 'react';
19
19
  import { isObject, isString, merge } from 'lodash';
20
- import { useProConfig } from 'zat-design-pro-component';
20
+ import { useProConfig } from '@zat-design/sisyphus-react';
21
21
  import { CertNo, EnumSelect, FormFooter, InputRange, InputWithSuffix, ProAddress, ProAddressBar, ProCertNo, ProCertValidity, ProCombination, ProModalSelect, ProNumberRange, ProRangeBox, ProTimeLimit, transferAddressInfoToRegion, ProUpload, ProTreeSelect, ProTreeModal } from './components';
22
22
  import RenderFields from './components/render/RenderFields';
23
23
  import { getLayout, splitNameStr, useControlled, initialValuesToNames } from './utils/index';
@@ -15,7 +15,7 @@ var _excluded = ["dataSource", "defaultDisableValue", "optionRender", "onChange"
15
15
  import { useDeepCompareEffect, useRequest as useRequestFunc } from 'ahooks';
16
16
  import React, { useImperativeHandle, useState, forwardRef } from 'react';
17
17
  import { isFunction, isObject, isString, omit, cloneDeep } from 'lodash';
18
- import { useProConfig } from 'zat-design-pro-component';
18
+ import { useProConfig } from '@zat-design/sisyphus-react';
19
19
  import Container from '../ProForm/components/Container';
20
20
  var Option = _Select.Option;
21
21
  export var ProSelect = function ProSelect(props, ref) {
@@ -15,7 +15,7 @@ import { useDebounceEffect, useDeepCompareEffect } from 'ahooks';
15
15
  import React, { useEffect, useMemo, useState, createContext } from 'react';
16
16
  import { ReactSVG } from 'react-svg';
17
17
  import classnames from 'classnames';
18
- import { useProConfig, ProTransferModal } from 'zat-design-pro-component';
18
+ import { useProConfig, ProTransferModal } from '@zat-design/sisyphus-react';
19
19
  import { tools } from '@zat-design-pro-component/utils';
20
20
  import { valueTypeRender } from '../ProUtils/utils';
21
21
  import { TableResizable, ResizableLine } from './components';
@@ -71,7 +71,7 @@ export interface RequestOptions<T, R> {
71
71
  crossPageSelect?: boolean;
72
72
  onPageChange?: (page: PaginationProps) => void;
73
73
  transformParams?: (params: any) => any;
74
- transformResponse?: (data: any) => R[];
74
+ transformResponse?: (res: any) => ListResponse<R>;
75
75
  }
76
76
  export interface Params<T = any> extends PaginationProps {
77
77
  queryBean?: Partial<T>;
@@ -2,12 +2,20 @@ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
3
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
6
5
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
6
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
7
7
  var _excluded = ["page", "filters", "sorter"];
8
8
  import { useCallback, useEffect, useMemo, useState } from 'react';
9
9
  import { useRequest, useSetState, useDeepCompareEffect } from 'ahooks';
10
10
  import { defaultPage } from './index';
11
+ var defaultResponse = {
12
+ data: _objectSpread(_objectSpread({}, defaultPage), {}, {
13
+ total: 0,
14
+ list: []
15
+ }),
16
+ status: '',
17
+ message: ''
18
+ };
11
19
  var useDefaultOptions = function useDefaultOptions(options) {
12
20
  var _useState = useState((options === null || options === void 0 ? void 0 : options.page) || defaultPage),
13
21
  _useState2 = _slicedToArray(_useState, 2),
@@ -86,7 +94,7 @@ function useAntdTable(service, options, useRequestOptions) {
86
94
  defaultParams: [getTransformParams()]
87
95
  }));
88
96
  var _result$data = result.data,
89
- data = _result$data === void 0 ? {} : _result$data,
97
+ data = _result$data === void 0 ? defaultResponse : _result$data,
90
98
  run = result.run,
91
99
  refresh = result.refresh;
92
100
  var _ref2 = transformResponse ? transformResponse(data) : data || {},
@@ -101,7 +109,6 @@ function useAntdTable(service, options, useRequestOptions) {
101
109
  return service.toString();
102
110
  }, [service]);
103
111
  // service变化时触发 (禁止掉防止service变更时导致的死循环)
104
- // const prevService = usePrevious(curService);
105
112
  var clearSelected = useCallback(function () {
106
113
  setState({
107
114
  allSelected: false,
@@ -6,7 +6,7 @@ import _Typography from "antd/es/typography";
6
6
  import React from 'react';
7
7
  import moment from 'moment';
8
8
  import { multiply } from 'lodash';
9
- import { ProForm } from 'zat-design-pro-component';
9
+ import { ProForm } from '@zat-design/sisyphus-react';
10
10
  import { ReactSVG } from 'react-svg';
11
11
  import { CheckOutlined } from '@ant-design/icons';
12
12
  import copySvg from '../assets/copy.svg';
@@ -10,7 +10,7 @@ import _Drawer from "antd/es/drawer";
10
10
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
11
11
  import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
12
12
  import React, { useState, useEffect } from 'react';
13
- import { setThemes } from '../../utils/index';
13
+ import { setThemes, setTableNoStripe } from '../../utils/index';
14
14
  var connect = function connect(Component) {
15
15
  var ComponentWrapper = function ComponentWrapper(props) {
16
16
  return /*#__PURE__*/React.createElement(Component, _objectSpread({}, props));
@@ -159,7 +159,7 @@ var PrdTools = function PrdTools(_ref) {
159
159
  }, "\u5DE6\u5BF9\u9F50"), /*#__PURE__*/React.createElement(_Radio.Button, {
160
160
  value: "right"
161
161
  }, "\u53F3\u5BF9\u9F50")))), /*#__PURE__*/React.createElement("div", {
162
- className: "pro-theme-tools-box pro-theme-tools-space"
162
+ className: "pro-theme-tools-box pro-theme-tools-space pro-theme-tools-small-space"
163
163
  }, /*#__PURE__*/React.createElement("div", {
164
164
  className: "pro-theme-tools-item"
165
165
  }, /*#__PURE__*/React.createElement("p", null, "\u5927\u5B57\u53F7\u6A21\u5F0F")), /*#__PURE__*/React.createElement("div", {
@@ -167,16 +167,35 @@ var PrdTools = function PrdTools(_ref) {
167
167
  }, /*#__PURE__*/React.createElement(_Switch, {
168
168
  checkedChildren: "\u5F00",
169
169
  unCheckedChildren: "\u5173",
170
- checked: state.bigText,
170
+ checked: state.zauiBigText,
171
171
  onClick: function onClick(value) {
172
172
  setState(_objectSpread(_objectSpread({}, state), {}, {
173
173
  zauiBaseFontSize: value ? 2 : 0,
174
- bigText: value
174
+ zauiBigText: value
175
175
  }));
176
176
  setThemes({
177
177
  'zaui-base-font-size': value ? '2px' : '0px'
178
178
  });
179
179
  }
180
+ }))), /*#__PURE__*/React.createElement("div", {
181
+ className: "pro-theme-tools-box pro-theme-tools-space pro-theme-tools-small-space"
182
+ }, /*#__PURE__*/React.createElement("div", {
183
+ className: "pro-theme-tools-item"
184
+ }, /*#__PURE__*/React.createElement("p", null, "\u8868\u683C\u6591\u9A6C\u7EB9")), /*#__PURE__*/React.createElement("div", {
185
+ className: "pro-theme-tools-item"
186
+ }, /*#__PURE__*/React.createElement(_Switch, {
187
+ checkedChildren: "\u5F00",
188
+ unCheckedChildren: "\u5173",
189
+ checked: state.zauiStripe,
190
+ onClick: function onClick(value) {
191
+ setState(_objectSpread(_objectSpread({}, state), {}, {
192
+ zauiStripe: value
193
+ }));
194
+ setTableNoStripe(value);
195
+ setThemes({
196
+ 'zaui-stripe': value
197
+ });
198
+ }
180
199
  }))), /*#__PURE__*/React.createElement(_Button, {
181
200
  className: "copy-btn",
182
201
  onClick: function onClick() {
@@ -112,6 +112,10 @@
112
112
 
113
113
  .pro-theme-tools-space {
114
114
  margin-bottom: 24px;
115
+
116
+ &.pro-theme-tools-small-space {
117
+ margin-bottom: 8px;
118
+ }
115
119
  }
116
120
 
117
121
  .ant-radio-button-wrapper {
@@ -11,7 +11,7 @@ var _excluded = ["size", "className", "cacheTime", "color", "mode", "theme"];
11
11
  import { SettingOutlined } from '@ant-design/icons';
12
12
  import React, { useEffect, useState } from 'react';
13
13
  import classnames from 'classnames';
14
- import { getKebabCase, setThemes } from './utils/index';
14
+ import { getKebabCase, setThemes, setTableNoStripe } from './utils/index';
15
15
  import { PrdTools } from './component';
16
16
  var defaultCacheTime = 1; // 配置保存时间为一天
17
17
  var ProThemeTools = function ProThemeTools(_ref) {
@@ -36,13 +36,17 @@ var ProThemeTools = function ProThemeTools(_ref) {
36
36
  zauiSize: 1,
37
37
  zauiHeightCard: 32,
38
38
  zauiHeightBorder: 12,
39
- bigText: false,
40
- zauiBaseFontSize: 0
39
+ zauiBigText: false,
40
+ zauiBaseFontSize: 0,
41
+ zauiTableBorder: false,
42
+ zauiStripe: true
41
43
  }),
42
44
  _useState4 = _slicedToArray(_useState3, 2),
43
45
  state = _useState4[0],
44
46
  setState = _useState4[1];
45
- var zauiBrand = state.zauiBrand;
47
+ var zauiBrand = state.zauiBrand,
48
+ zauiStripe = state.zauiStripe,
49
+ zauiTableBorder = state.zauiTableBorder;
46
50
  var showDrawer = function showDrawer() {
47
51
  setVisible(true);
48
52
  };
@@ -62,7 +66,9 @@ var ProThemeTools = function ProThemeTools(_ref) {
62
66
  zauiHeightCard: 32,
63
67
  zauiHeightBorder: 16,
64
68
  zauiBaseFontSize: 0,
65
- bigText: false
69
+ zauiBigText: false,
70
+ zauiTableBorder: false,
71
+ zauiStripe: true
66
72
  }));
67
73
  setThemes({
68
74
  'zaui-brand': '#006AFF',
@@ -74,7 +80,10 @@ var ProThemeTools = function ProThemeTools(_ref) {
74
80
  'zaui-height-card': '32px',
75
81
  'zaui-font-size': '14px',
76
82
  'zaui-height-border': '16px',
77
- 'zaui-base-font-size': 0
83
+ 'zaui-base-font-size': 0,
84
+ 'zaui-big-text': false,
85
+ 'zaui-table-border': false,
86
+ 'zaui-stripe': true
78
87
  });
79
88
  };
80
89
  // 复制
@@ -135,6 +144,14 @@ var ProThemeTools = function ProThemeTools(_ref) {
135
144
  });
136
145
  }
137
146
  }, [zauiBrand]);
147
+ // 斑马纹设置
148
+ useEffect(function () {
149
+ setTableNoStripe(zauiStripe);
150
+ }, [zauiStripe]);
151
+ // // 斑马纹设置
152
+ // useEffect(() => {
153
+ // setTableNoStripe(zauiStripe);
154
+ // }, [zauiTableBorder]);
138
155
  // 主题配置缓存
139
156
  useEffect(function () {
140
157
  if (cacheTime) {
@@ -25,6 +25,11 @@ export interface LocalThemeConfigPropsType {
25
25
  zauiSize?: number;
26
26
  zauiHeightCard?: number;
27
27
  zauiHeightBorder?: number;
28
- bigText?: boolean;
28
+ /** 大字号模式 */
29
+ zauiBigText?: boolean;
30
+ /** 是否有表格边框 */
31
+ zauiTableBorder?: boolean;
32
+ /** 是否有斑马纹 */
33
+ zauiStripe?: boolean;
29
34
  zauiBaseFontSize?: number;
30
35
  }
@@ -12,3 +12,8 @@ export declare const replaceObject: (themes: ThemesProps, themeMapping: ThemesPr
12
12
  */
13
13
  export declare const setThemes: (themes: ThemesProps, themeMapping?: ThemesProps) => boolean;
14
14
  export declare const getKebabCase: (str: string) => string;
15
+ /**
16
+ * 设置表格斑马纹
17
+ * @param stripe boolean
18
+ */
19
+ export declare const setTableNoStripe: (stripe: boolean) => void;
@@ -51,4 +51,22 @@ export var getKebabCase = function getKebabCase(str) {
51
51
  }
52
52
 
53
53
  return temp;
54
+ };
55
+ /**
56
+ * 设置表格斑马纹
57
+ * @param stripe boolean
58
+ */
59
+ export var setTableNoStripe = function setTableNoStripe(stripe) {
60
+ var proTables = document.querySelectorAll('.pro-table');
61
+ if (!proTables.length) {
62
+ return;
63
+ }
64
+ for (var i = 0; i < proTables.length; i++) {
65
+ var proTable = proTables[i];
66
+ if (stripe) {
67
+ proTable.classList.remove('pro-table-no-stripe');
68
+ } else {
69
+ proTable.classList.add('pro-table-no-stripe');
70
+ }
71
+ }
54
72
  };
@@ -8,7 +8,7 @@ import _Input from "antd/es/input";
8
8
  /* eslint-disable jsx-a11y/anchor-is-valid */
9
9
  import React, { useEffect } from 'react';
10
10
  import { useDeepCompareEffect, useSetState, useRequest as useRequestFunc } from 'ahooks';
11
- import { ProDrawerForm, useProConfig } from 'zat-design-pro-component';
11
+ import { ProDrawerForm, useProConfig } from '@zat-design/sisyphus-react';
12
12
  import { cloneDeep, isFunction } from 'lodash';
13
13
  import { Trigger, ListView, TreeView } from './components';
14
14
  import { getFlatTreeData, filterCheckedNodes, getChildrenKeys, findTreeNodeByKey } from './utils';
@@ -16,7 +16,7 @@ var _excluded = ["disabled", "code", "dataSource", "defaultDisableValue", "onCha
16
16
  import { useDeepCompareEffect, useRequest as useRequestFunc, useSetState } from 'ahooks';
17
17
  import React, { useImperativeHandle, forwardRef } from 'react';
18
18
  import { cloneDeep } from 'lodash';
19
- import { useProConfig } from 'zat-design-pro-component';
19
+ import { useProConfig } from '@zat-design/sisyphus-react';
20
20
  import Container from '../ProForm/components/Container';
21
21
  var SHOW_PARENT = _TreeSelect.SHOW_PARENT;
22
22
  export var ProTreeSelect = function ProTreeSelect(props, ref) {
@@ -241,20 +241,19 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
241
241
  var Icon = function Icon() {
242
242
  return /*#__PURE__*/React.createElement("svg", {
243
243
  className: "icon",
244
- viewBox: "0 0 1024 1024",
244
+ viewBox: "0 0 1433 1024",
245
245
  version: "1.1",
246
246
  xmlns: "http://www.w3.org/2000/svg",
247
- "p-id": "3598",
247
+ "p-id": "2318",
248
248
  width: "1em",
249
249
  height: "1em"
250
250
  }, /*#__PURE__*/React.createElement("path", {
251
- d: "M228.288 468.864l220.16 220.16 397.568-397.568 45.248 45.248-442.88 442.88L183.04 514.048z",
252
- "p-id": "3599",
251
+ d: "M209.92 337.2032l362.0864 361.984L1223.68 47.5136l144.7936 144.896-796.4672 796.4672-506.88-506.88z",
252
+ "p-id": "2319",
253
253
  fill: "currentColor"
254
254
  }));
255
255
  };
256
256
  /**
257
- * <svg t="1684480846438" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3598" width="200" height="200"><path d="M228.288 468.864l220.16 220.16 397.568-397.568 45.248 45.248-442.88 442.88L183.04 514.048z" p-id="3599"></path></svg>
258
257
  * 自定义渲染子树
259
258
  * @param node 每个节点数据对象
260
259
  * @returns 整个react节点树
@@ -281,10 +280,11 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
281
280
  key: value,
282
281
  value: value,
283
282
  title: title,
283
+ "attr-data": value,
284
284
  disabled: node.disabled,
285
285
  checkable: node.checkable,
286
286
  icon: icon,
287
- className: "za-pro-tree-select-node-".concat(grade)
287
+ className: "node-val-".concat(value)
288
288
  });
289
289
  }
290
290
  var sonGrade = grade + 1;
@@ -292,9 +292,10 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
292
292
  key: value,
293
293
  value: value,
294
294
  title: title,
295
+ "attr-data": value,
295
296
  disabled: node.disabled,
296
297
  checkable: node.checkable,
297
- className: "za-pro-tree-select-node-".concat(grade)
298
+ className: "node-val-".concat(value)
298
299
  }, children.map(function (child) {
299
300
  return renderTreeNode(child, sonGrade);
300
301
  }));
@@ -348,10 +349,29 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
348
349
  selectList: result || []
349
350
  });
350
351
  };
351
- var handleChange = function handleChange(value, option) {
352
- onChange && onChange(value, option, null);
352
+ var handleChange = function handleChange(newVal, option) {
353
+ onChange && onChange(newVal, option, null);
353
354
  // 重置搜索
354
- searchTreeEvent('');
355
+ showSearch && searchTreeEvent('');
356
+ };
357
+ /**
358
+ * 全局点击事件, 如果是单选的情况那么点击选中节点后取消勾选
359
+ * @param e 事件源
360
+ */
361
+ var nodeChangeEvent = function nodeChangeEvent(e) {
362
+ var el = e.target;
363
+ var classStr = el.className;
364
+ if (classStr && !treeCheckable) {
365
+ var _classStr$split = classStr.split(' '),
366
+ _classStr$split2 = _slicedToArray(_classStr$split, 1),
367
+ valStr = _classStr$split2[0];
368
+ if (valStr && classStr.startsWith('node-val-')) {
369
+ var choiceVal = valStr.replace('node-val-', '');
370
+ if (value === choiceVal) {
371
+ onChange && onChange(undefined, [], null);
372
+ }
373
+ }
374
+ }
355
375
  };
356
376
  // 如果单选情况下只有10条那么设置class控制样式
357
377
  var tenCountClass = '';
@@ -397,8 +417,10 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
397
417
  allowClear: allowClear || true,
398
418
  showArrow: true
399
419
  }, selectProps);
400
- return /*#__PURE__*/React.createElement(_TreeSelect, _objectSpread({}, treeProps), selectList.map(function (node) {
420
+ return /*#__PURE__*/React.createElement("div", {
421
+ onClick: nodeChangeEvent
422
+ }, /*#__PURE__*/React.createElement(_TreeSelect, _objectSpread({}, treeProps), selectList.map(function (node) {
401
423
  return renderTreeNode(node, 1);
402
- }));
424
+ })));
403
425
  };
404
426
  export default /*#__PURE__*/forwardRef(ProTreeSelect);
@@ -67,7 +67,7 @@
67
67
  }
68
68
  }
69
69
  .ant-select-tree-treenode:hover{
70
- background-color: @zaui-disabled-bg;
70
+ background-color: #f5f5f5;
71
71
  }
72
72
  .check-option-text{
73
73
  .check-mark-icon{
@@ -87,7 +87,7 @@
87
87
  padding-left: 7px;
88
88
  }
89
89
  .ant-select-tree-treenode:hover{
90
- background-color: @zaui-disabled-bg;
90
+ background-color: #f5f5f5;
91
91
  }
92
92
  .ant-select-tree-node-content-wrapper{
93
93
  padding-right: 16px;
@@ -7,7 +7,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
7
7
  * @Description:
8
8
  */
9
9
  import React, { useState } from 'react';
10
- import { ProDrawerForm } from 'zat-design-pro-component';
10
+ import { ProDrawerForm } from '@zat-design/sisyphus-react';
11
11
  export var Example = function Example(props) {
12
12
  var content = props.content,
13
13
  className = props.className;
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _zatDesignProComponent = require("zat-design-pro-component");
9
+ var _sisyphusReact = require("@zat-design/sisyphus-react");
10
10
  var EnumLabel = function EnumLabel(props) {
11
11
  var label = '';
12
12
  var fieldValue = '';
13
- var _ref = (0, _zatDesignProComponent.useProConfig)('ProEnum') || {},
13
+ var _ref = (0, _sisyphusReact.useProConfig)('ProEnum') || {},
14
14
  fieldNames = _ref.fieldNames,
15
15
  _ref$clear = _ref.clear,
16
16
  clear = _ref$clear === void 0 ? true : _ref$clear;
@@ -27,7 +27,7 @@ var EnumLabel = function EnumLabel(props) {
27
27
  var enumCode = props.enumCode,
28
28
  value = props.value,
29
29
  compose = props.compose;
30
- var _useProConfig = (0, _zatDesignProComponent.useProConfig)('ProEnum'),
30
+ var _useProConfig = (0, _sisyphusReact.useProConfig)('ProEnum'),
31
31
  _useProConfig$dics = _useProConfig.dics,
32
32
  dics = _useProConfig$dics === void 0 ? {} : _useProConfig$dics;
33
33
  var enumList = (dics === null || dics === void 0 ? void 0 : dics[enumCode]) || [];