@ccs-ui/rc-pro 1.2.0-beta-7 → 1.2.0-beta-9
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.
- package/es/pro-table/head.js +9 -3
- package/package.json +1 -1
package/es/pro-table/head.js
CHANGED
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { DownOutlined, UpOutlined } from '@ant-design/icons';
|
|
8
8
|
import { useUpdateEffect } from 'ahooks';
|
|
9
|
-
import { Button, Card, Form } from 'antd';
|
|
9
|
+
import { Button, Card, Form, theme } from 'antd';
|
|
10
10
|
import _debounce from 'lodash.debounce';
|
|
11
11
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
12
12
|
import { CcsResizeObserver } from '..';
|
|
@@ -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,6 +163,10 @@ function HeadComponent(_ref) {
|
|
|
161
163
|
var formStyles = {
|
|
162
164
|
flexWrap: isExpand ? 'wrap' : 'nowrap'
|
|
163
165
|
};
|
|
166
|
+
|
|
167
|
+
// 获取Input的高度
|
|
168
|
+
var token = theme.useToken().token;
|
|
169
|
+
var controlHeight = token.rootValue ? "".concat((token.controlHeight / token.rootValue).toFixed(3), "rem") : token.controlHeight;
|
|
164
170
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
165
171
|
children: [hasItem && /*#__PURE__*/_jsxs(_Fragment, {
|
|
166
172
|
children: [/*#__PURE__*/_jsx(CcsResizeObserver.Target, {
|
|
@@ -188,7 +194,7 @@ function HeadComponent(_ref) {
|
|
|
188
194
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
189
195
|
style: {
|
|
190
196
|
justifyContent: isExpand && hasMore ? 'flex-start' : 'flex-end',
|
|
191
|
-
height: isExpand ? 'auto' :
|
|
197
|
+
height: isExpand ? 'auto' : controlHeight
|
|
192
198
|
},
|
|
193
199
|
className: "ccs-pl-adaptation-form",
|
|
194
200
|
ref: formItemsRef,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ccs-ui/rc-pro",
|
|
3
|
-
"version": "1.2.0-beta-
|
|
3
|
+
"version": "1.2.0-beta-9",
|
|
4
4
|
"description": "验证码组件兼容暗黑模式;proTable封装rowselection代码;proTable添加自适应布局模式;CcsDialog不适应contextHolder也能打开;移除utils,独立存在@ccs-ui/utils;添加属性isEnableToolbar,table可以隐藏toolbar; ",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|