@ccs-ui/rc-pro 1.2.0-beta-8 → 1.2.0-beta-10

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.
@@ -39,7 +39,6 @@ function HeadComponent(_ref) {
39
39
  _useState4 = _slicedToArray(_useState3, 2),
40
40
  visible = _useState4[0],
41
41
  setVisible = _useState4[1];
42
- var hasMore = visible === 'more';
43
42
  useUpdateEffect(function () {
44
43
  setIsExpand(expandForm);
45
44
  }, [expandForm]);
@@ -79,6 +78,9 @@ function HeadComponent(_ref) {
79
78
  setVisible(scrollHeight > 40 ? 'more' : 'visible');
80
79
  }, []);
81
80
 
81
+ // 是否有更多
82
+ var hasMore = itemLen > 1 && visible === 'more';
83
+
82
84
  // 操作按钮
83
85
  var renderSearchBtn = /*#__PURE__*/_jsxs("div", {
84
86
  style: {
@@ -161,8 +163,10 @@ function HeadComponent(_ref) {
161
163
  var formStyles = {
162
164
  flexWrap: isExpand ? 'wrap' : 'nowrap'
163
165
  };
164
- var _theme$useToken = theme.useToken(),
165
- token = _theme$useToken.token;
166
+
167
+ // 获取Input的高度
168
+ var token = theme.useToken().token;
169
+ var controlHeight = token.rootValue ? "".concat((token.controlHeight / token.rootValue).toFixed(3), "rem") : token.controlHeight;
166
170
  return /*#__PURE__*/_jsxs(_Fragment, {
167
171
  children: [hasItem && /*#__PURE__*/_jsxs(_Fragment, {
168
172
  children: [/*#__PURE__*/_jsx(CcsResizeObserver.Target, {
@@ -190,7 +194,7 @@ function HeadComponent(_ref) {
190
194
  children: [/*#__PURE__*/_jsxs("div", {
191
195
  style: {
192
196
  justifyContent: isExpand && hasMore ? 'flex-start' : 'flex-end',
193
- height: isExpand ? 'auto' : token.controlHeight
197
+ height: isExpand ? 'auto' : controlHeight
194
198
  },
195
199
  className: "ccs-pl-adaptation-form",
196
200
  ref: formItemsRef,
package/es/table/index.js CHANGED
@@ -8,10 +8,10 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
8
8
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
9
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
- import { useDebounceFn, useEventListener, useUpdate, useUpdateEffect } from 'ahooks';
11
+ import { useDebounceFn, useEventListener, useUpdate } from 'ahooks';
12
12
  import { Table, Tooltip, theme } from 'antd';
13
13
  import classNames from 'classnames';
14
- import { useImperativeHandle, useRef } from 'react';
14
+ import { useEffect, useImperativeHandle, useRef } from 'react';
15
15
  import { Resizable } from 'react-resizable';
16
16
  import "./index.less";
17
17
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -99,7 +99,7 @@ var CustomTable = function CustomTable(props) {
99
99
  leading: true
100
100
  }),
101
101
  onFixedThead = _useDebounceFn.run;
102
- useUpdateEffect(function () {
102
+ useEffect(function () {
103
103
  onFixedThead();
104
104
  }, [totalNum]);
105
105
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccs-ui/rc-pro",
3
- "version": "1.2.0-beta-8",
3
+ "version": "1.2.0-beta-10",
4
4
  "description": "验证码组件兼容暗黑模式;proTable封装rowselection代码;proTable添加自适应布局模式;CcsDialog不适应contextHolder也能打开;移除utils,独立存在@ccs-ui/utils;添加属性isEnableToolbar,table可以隐藏toolbar; ",
5
5
  "license": "MIT",
6
6
  "author": {