@zat-design/sisyphus-react 3.3.1-beta.10 → 3.3.1-beta.12

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.
@@ -2259,6 +2259,15 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
2259
2259
  align-items: center;
2260
2260
  width: 100%;
2261
2261
  }
2262
+ .pro-group .ant-space-compact > .ant-input-number:first-child {
2263
+ border-end-end-radius: 0;
2264
+ border-start-end-radius: 0;
2265
+ }
2266
+ .pro-group .ant-space-compact > .ant-input-number:last-child {
2267
+ border-start-start-radius: 0;
2268
+ border-end-start-radius: 0;
2269
+ margin-left: -1px;
2270
+ }
2262
2271
  .pro-group .ant-space-compact .ant-form-item {
2263
2272
  margin-bottom: 0 !important;
2264
2273
  }
@@ -52,6 +52,18 @@
52
52
  align-items: center;
53
53
  width: 100%;
54
54
 
55
+ &>.@{ant-prefix}-input-number{
56
+ &:first-child{
57
+ border-end-end-radius: 0;
58
+ border-start-end-radius: 0;
59
+ }
60
+ &:last-child{
61
+ border-start-start-radius: 0;
62
+ border-end-start-radius: 0;
63
+ margin-left: -1px;
64
+ }
65
+ }
66
+
55
67
  .@{ant-prefix}-form-item {
56
68
  margin-bottom: 0 !important;
57
69
  }
@@ -33,7 +33,7 @@ import tipSvg from '../../../assets/tip.svg';
33
33
  import useRules from '../../utils/useRules';
34
34
  // 这个组件只管渲染, 参数的整理在外部处理
35
35
  var Render = function Render(props) {
36
- var _classNames, _otherProps$names2;
36
+ var _ref2, _classNames, _otherProps$names2;
37
37
  var component = props.component,
38
38
  originComponent = props.originComponent,
39
39
  _props$formItemProps = props.formItemProps,
@@ -163,8 +163,8 @@ var Render = function Render(props) {
163
163
  }
164
164
  /** 移除多余参数,防止透传给formItem报错 */
165
165
  var _otherFormItemProps = omit(otherFormItemProps, ['component', 'names', 'format', 'toISOString', 'switchValue', 'precision', 'clearNotShow']);
166
- // 优先取formDisabled(全局),其次取disabled函数返回值,最后取fieldProps函数返回的disabled
167
- var lastDisabled = componentProps.disabledStrictly ? formDisabled || _disabled || (_fieldProps === null || _fieldProps === void 0 ? void 0 : _fieldProps.disabled) : false;
166
+ // 优先取组件上的disabled, 最后取formDisabled(全局
167
+ var lastDisabled = componentProps.disabledStrictly ? (_ref2 = _disabled !== null && _disabled !== void 0 ? _disabled : _fieldProps === null || _fieldProps === void 0 ? void 0 : _fieldProps.disabled) !== null && _ref2 !== void 0 ? _ref2 : formDisabled : false;
168
168
  /**
169
169
  * 最新fieldProps: 更新后的组件Props
170
170
  */
@@ -192,8 +192,8 @@ var Render = function Render(props) {
192
192
  var functionArgs = function functionArgs(args) {
193
193
  var _otherFormItemProps$n;
194
194
  var _args = _toConsumableArray(args);
195
- var _ref2 = otherProps || {},
196
- valueType = _ref2.valueType;
195
+ var _ref3 = otherProps || {},
196
+ valueType = _ref3.valueType;
197
197
  _args[1] = form.getFieldsValue();
198
198
  _args[2] = {
199
199
  form: form
@@ -269,7 +269,7 @@ var Render = function Render(props) {
269
269
  * onBlur参数重置 (value, record, { form, index, namePath, option }) => void
270
270
  */
271
271
  var handleBlur = /*#__PURE__*/function () {
272
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
272
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
273
273
  var _len2,
274
274
  args,
275
275
  _key2,
@@ -296,7 +296,7 @@ var Render = function Render(props) {
296
296
  }, _callee);
297
297
  }));
298
298
  return function handleBlur() {
299
- return _ref3.apply(this, arguments);
299
+ return _ref4.apply(this, arguments);
300
300
  };
301
301
  }();
302
302
  var renderItem = function renderItem() {
@@ -6,7 +6,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
6
6
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
7
7
  var _excluded = ["text", "mode", "width", "line", "isResponsiveWidth", "className", "style", "lineHeight"];
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
- import { useSize, useSetState, useDebounce } from 'ahooks';
9
+ import { useSize, useSetState, useDebounce, useDebounceEffect } from 'ahooks';
10
10
  import { useEffect, useRef } from 'react';
11
11
  import classnames from 'classnames';
12
12
  import './style/index.less';
@@ -135,25 +135,12 @@ var ProTooltip = function ProTooltip(props) {
135
135
  }
136
136
  return line > 1 ? _jsx(AutoMixinMulti, {}) : _jsx(AutoMixinSingle, {});
137
137
  };
138
- useEffect(function () {
138
+ useDebounceEffect(function () {
139
139
  if (isResponsiveWidth && parentElement) {
140
- var _contentDom$style$wid;
141
140
  var cWidth = parentElement.clientWidth - 32;
142
141
  var contentDom = childRef.current;
143
- var flag = false;
144
- var styleWidth = Number((_contentDom$style$wid = contentDom.style.width) === null || _contentDom$style$wid === void 0 ? void 0 : _contentDom$style$wid.replace('px', ''));
145
- if (contentDom.offsetWidth < styleWidth) {
146
- flag = contentDom.scrollWidth > styleWidth;
147
- } else if (contentDom.offsetWidth === styleWidth && contentDom.scrollWidth === styleWidth && contentDom.clientWidth === styleWidth) {
148
- flag = false;
149
- } else {
150
- flag = contentDom.scrollWidth > contentDom.clientWidth;
151
- }
152
- if (parentElement.scrollWidth > parentElement.clientWidth) {
153
- flag = true;
154
- }
155
142
  setState({
156
- isShowToolTip: flag,
143
+ isShowToolTip: contentDom.scrollWidth > contentDom.offsetWidth,
157
144
  localWidth: cWidth
158
145
  });
159
146
  }
@@ -162,7 +149,9 @@ var ProTooltip = function ProTooltip(props) {
162
149
  localWidth: _width
163
150
  });
164
151
  }
165
- }, [isResponsiveWidth, size]);
152
+ }, [isResponsiveWidth, size], {
153
+ wait: 300
154
+ });
166
155
  useEffect(function () {
167
156
  if (mode === 'auto' && line === 1) {
168
157
  var localDom = ref.current;
@@ -52,6 +52,18 @@
52
52
  align-items: center;
53
53
  width: 100%;
54
54
 
55
+ &>.@{ant-prefix}-input-number{
56
+ &:first-child{
57
+ border-end-end-radius: 0;
58
+ border-start-end-radius: 0;
59
+ }
60
+ &:last-child{
61
+ border-start-start-radius: 0;
62
+ border-end-start-radius: 0;
63
+ margin-left: -1px;
64
+ }
65
+ }
66
+
55
67
  .@{ant-prefix}-form-item {
56
68
  margin-bottom: 0 !important;
57
69
  }
@@ -31,7 +31,7 @@ var _excluded = ["labelWidth", "hiddenNames", "trim", "upperCase", "className",
31
31
  /* eslint-disable prefer-destructuring */
32
32
  // 这个组件只管渲染, 参数的整理在外部处理
33
33
  var Render = function Render(props) {
34
- var _classNames, _otherProps$names2;
34
+ var _ref2, _classNames, _otherProps$names2;
35
35
  var component = props.component,
36
36
  originComponent = props.originComponent,
37
37
  _props$formItemProps = props.formItemProps,
@@ -161,8 +161,8 @@ var Render = function Render(props) {
161
161
  }
162
162
  /** 移除多余参数,防止透传给formItem报错 */
163
163
  var _otherFormItemProps = (0, _lodash.omit)(otherFormItemProps, ['component', 'names', 'format', 'toISOString', 'switchValue', 'precision', 'clearNotShow']);
164
- // 优先取formDisabled(全局),其次取disabled函数返回值,最后取fieldProps函数返回的disabled
165
- var lastDisabled = componentProps.disabledStrictly ? formDisabled || _disabled || (_fieldProps === null || _fieldProps === void 0 ? void 0 : _fieldProps.disabled) : false;
164
+ // 优先取组件上的disabled, 最后取formDisabled(全局
165
+ var lastDisabled = componentProps.disabledStrictly ? (_ref2 = _disabled !== null && _disabled !== void 0 ? _disabled : _fieldProps === null || _fieldProps === void 0 ? void 0 : _fieldProps.disabled) !== null && _ref2 !== void 0 ? _ref2 : formDisabled : false;
166
166
  /**
167
167
  * 最新fieldProps: 更新后的组件Props
168
168
  */
@@ -190,8 +190,8 @@ var Render = function Render(props) {
190
190
  var functionArgs = function functionArgs(args) {
191
191
  var _otherFormItemProps$n;
192
192
  var _args = (0, _toConsumableArray2.default)(args);
193
- var _ref2 = otherProps || {},
194
- valueType = _ref2.valueType;
193
+ var _ref3 = otherProps || {},
194
+ valueType = _ref3.valueType;
195
195
  _args[1] = form.getFieldsValue();
196
196
  _args[2] = {
197
197
  form: form
@@ -267,7 +267,7 @@ var Render = function Render(props) {
267
267
  * onBlur参数重置 (value, record, { form, index, namePath, option }) => void
268
268
  */
269
269
  var handleBlur = /*#__PURE__*/function () {
270
- var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
270
+ var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
271
271
  var _len2,
272
272
  args,
273
273
  _key2,
@@ -294,7 +294,7 @@ var Render = function Render(props) {
294
294
  }, _callee);
295
295
  }));
296
296
  return function handleBlur() {
297
- return _ref3.apply(this, arguments);
297
+ return _ref4.apply(this, arguments);
298
298
  };
299
299
  }();
300
300
  var renderItem = function renderItem() {
@@ -141,25 +141,12 @@ var ProTooltip = function ProTooltip(props) {
141
141
  }
142
142
  return line > 1 ? (0, _jsxRuntime.jsx)(AutoMixinMulti, {}) : (0, _jsxRuntime.jsx)(AutoMixinSingle, {});
143
143
  };
144
- (0, _react.useEffect)(function () {
144
+ (0, _ahooks.useDebounceEffect)(function () {
145
145
  if (isResponsiveWidth && parentElement) {
146
- var _contentDom$style$wid;
147
146
  var cWidth = parentElement.clientWidth - 32;
148
147
  var contentDom = childRef.current;
149
- var flag = false;
150
- var styleWidth = Number((_contentDom$style$wid = contentDom.style.width) === null || _contentDom$style$wid === void 0 ? void 0 : _contentDom$style$wid.replace('px', ''));
151
- if (contentDom.offsetWidth < styleWidth) {
152
- flag = contentDom.scrollWidth > styleWidth;
153
- } else if (contentDom.offsetWidth === styleWidth && contentDom.scrollWidth === styleWidth && contentDom.clientWidth === styleWidth) {
154
- flag = false;
155
- } else {
156
- flag = contentDom.scrollWidth > contentDom.clientWidth;
157
- }
158
- if (parentElement.scrollWidth > parentElement.clientWidth) {
159
- flag = true;
160
- }
161
148
  setState({
162
- isShowToolTip: flag,
149
+ isShowToolTip: contentDom.scrollWidth > contentDom.offsetWidth,
163
150
  localWidth: cWidth
164
151
  });
165
152
  }
@@ -168,7 +155,9 @@ var ProTooltip = function ProTooltip(props) {
168
155
  localWidth: _width
169
156
  });
170
157
  }
171
- }, [isResponsiveWidth, size]);
158
+ }, [isResponsiveWidth, size], {
159
+ wait: 300
160
+ });
172
161
  (0, _react.useEffect)(function () {
173
162
  if (mode === 'auto' && line === 1) {
174
163
  var localDom = ref.current;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.3.1-beta.10",
3
+ "version": "3.3.1-beta.12",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",