@zykj2024/much-library 1.0.10-beta.2 → 1.0.10-beta.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,6 +30,8 @@ export type PropsType = {
30
30
  onCancel?: () => void;
31
31
  tableProps?: TableProps<any>;
32
32
  tableRender?: ReactNode;
33
+ /** 折叠事件的回调 */
34
+ onCollapse?: (v: boolean) => void;
33
35
  [key: string]: any;
34
36
  };
35
37
  export type McContainerRef = {
@@ -36,7 +36,8 @@ var McContainer = /*#__PURE__*/forwardRef(function (props, ref) {
36
36
  batchBtns = props.batchBtns,
37
37
  onCancel = props.onCancel,
38
38
  tableProps = props.tableProps,
39
- tableRender = props.tableRender;
39
+ tableRender = props.tableRender,
40
+ onCollapse = props.onCollapse;
40
41
  var _useState = useState(false),
41
42
  _useState2 = _slicedToArray(_useState, 2),
42
43
  collapse = _useState2[0],
@@ -67,6 +68,9 @@ var McContainer = /*#__PURE__*/forwardRef(function (props, ref) {
67
68
  return actionBarResizeObserver.disconnect();
68
69
  };
69
70
  }, []);
71
+ useEffect(function () {
72
+ onCollapse === null || onCollapse === void 0 || onCollapse(collapse);
73
+ }, [collapse]);
70
74
 
71
75
  // 为设置过name属性的查询项添加value属性和onChange事件,从而收集查询项的值(查询项自身已绑定value属性的除外,需自行编写相关业务逻辑代码进行状态管理)
72
76
  var mapQuerys = function mapQuerys(items) {
@@ -300,7 +304,8 @@ var McContainer = /*#__PURE__*/forwardRef(function (props, ref) {
300
304
  style: {
301
305
  marginLeft: 16,
302
306
  fontSize: 12,
303
- padding: 0
307
+ padding: 0,
308
+ gap: 4
304
309
  },
305
310
  onClick: function onClick() {
306
311
  return setCollapse(function (os) {
@@ -309,8 +314,7 @@ var McContainer = /*#__PURE__*/forwardRef(function (props, ref) {
309
314
  },
310
315
  children: [collapse ? '展开' : '收起', /*#__PURE__*/_jsx(DoubleLeftOutlined, {
311
316
  style: {
312
- fontSize: 12,
313
- marginLeft: 2
317
+ fontSize: 12
314
318
  },
315
319
  rotate: collapse ? -90 : 90
316
320
  })]
@@ -42,3 +42,43 @@
42
42
  color: #b3b3b3;
43
43
  font-size: 12px;
44
44
  }
45
+ .mc-input {
46
+ /* 针对第一个 addon */
47
+ /* 针对最后一个 addon */
48
+ }
49
+ .mc-input .ant-input-wrapper .ant-input-group-addon:first-of-type::after {
50
+ content: '';
51
+ position: absolute;
52
+ right: 0;
53
+ /* 定位到右侧 */
54
+ top: 50%;
55
+ /* 居中对齐 */
56
+ -webkit-transform: translateY(-50%);
57
+ -ms-transform: translateY(-50%);
58
+ transform: translateY(-50%);
59
+ /* 垂直居中 */
60
+ height: 50%;
61
+ /* 竖线高度为输入框高度的 50% */
62
+ width: 1px;
63
+ /* 竖线宽度 */
64
+ background-color: #d8d8d8;
65
+ /* 竖线颜色 */
66
+ }
67
+ .mc-input .ant-input-wrapper .ant-input-group-addon:last-of-type::before {
68
+ content: '';
69
+ position: absolute;
70
+ left: 0;
71
+ /* 定位到右侧 */
72
+ top: 50%;
73
+ /* 居中对齐 */
74
+ -webkit-transform: translateY(-50%);
75
+ -ms-transform: translateY(-50%);
76
+ transform: translateY(-50%);
77
+ /* 垂直居中 */
78
+ height: 50%;
79
+ /* 竖线高度为输入框高度的 50% */
80
+ width: 1px;
81
+ /* 竖线宽度 */
82
+ background-color: #d8d8d8;
83
+ /* 竖线颜色 */
84
+ }
package/dist/index.d.ts CHANGED
@@ -1,10 +1,7 @@
1
- import McCascader from './McCascader';
2
1
  import McContainer from './McContainer';
3
- import McDateRange from './McDateRange';
4
2
  import McFonts from './McFonts';
5
3
  import McGroupPanel from './McGroupPanel';
6
4
  import McIconFont from './McIconFont';
7
- import McInput from './McInput';
8
5
  import McInputNumber from './McInputNumber';
9
6
  import McModalProvider from './McModalProvider';
10
7
  import McPeriodSelect from './McPeriodSelect';
@@ -12,11 +9,18 @@ import McPopoverButton from './McPopoverButton';
12
9
  import McPopoverForm from './McPopoverForm';
13
10
  import McProSelect from './McProSelect';
14
11
  import McResult from './McResult';
15
- import McSelect from './McSelect';
16
12
  import McTag from './McTag';
17
13
  import McLazyLoader from './McLazyLoader';
18
14
  import McThemeConfig from './McThemeConfig';
19
15
  import McTreePanel from './McTreePanel';
20
16
  import McTreeSelect from './McTreeSelect';
17
+ export * from './McCascader';
18
+ export { default as McCascader } from './McCascader';
19
+ export * from './McDateRange';
20
+ export { default as McDateRange } from './McDateRange';
21
+ export * from './McInput';
22
+ export { default as McInput } from './McInput';
23
+ export * from './McSelect';
24
+ export { default as McSelect } from './McSelect';
21
25
  import * as Utils from './Utils';
22
- export { McCascader, McContainer, McDateRange, McFonts, McGroupPanel, McIconFont, McInput, McInputNumber, McLazyLoader, McModalProvider, McPeriodSelect, McPopoverButton, McPopoverForm, McProSelect, McResult, McSelect, McTag, McThemeConfig, McTreePanel, McTreeSelect, Utils, };
26
+ export { McContainer, McFonts, McGroupPanel, McIconFont, McInputNumber, McLazyLoader, McModalProvider, McPeriodSelect, McPopoverButton, McPopoverForm, McProSelect, McResult, McTag, McThemeConfig, McTreePanel, McTreeSelect, Utils, };
package/dist/index.js CHANGED
@@ -1,10 +1,7 @@
1
- import McCascader from "./McCascader";
2
1
  import McContainer from "./McContainer";
3
- import McDateRange from "./McDateRange";
4
2
  import McFonts from "./McFonts";
5
3
  import McGroupPanel from "./McGroupPanel";
6
4
  import McIconFont from "./McIconFont";
7
- import McInput from "./McInput";
8
5
  import McInputNumber from "./McInputNumber";
9
6
  import McModalProvider from "./McModalProvider";
10
7
  import McPeriodSelect from "./McPeriodSelect";
@@ -12,11 +9,18 @@ import McPopoverButton from "./McPopoverButton";
12
9
  import McPopoverForm from "./McPopoverForm";
13
10
  import McProSelect from "./McProSelect";
14
11
  import McResult from "./McResult";
15
- import McSelect from "./McSelect";
16
12
  import McTag from "./McTag";
17
13
  import McLazyLoader from "./McLazyLoader";
18
14
  import McThemeConfig from "./McThemeConfig";
19
15
  import McTreePanel from "./McTreePanel";
20
16
  import McTreeSelect from "./McTreeSelect";
17
+ export * from "./McCascader";
18
+ export { default as McCascader } from "./McCascader";
19
+ export * from "./McDateRange";
20
+ export { default as McDateRange } from "./McDateRange";
21
+ export * from "./McInput";
22
+ export { default as McInput } from "./McInput";
23
+ export * from "./McSelect";
24
+ export { default as McSelect } from "./McSelect";
21
25
  import * as Utils from "./Utils";
22
- export { McCascader, McContainer, McDateRange, McFonts, McGroupPanel, McIconFont, McInput, McInputNumber, McLazyLoader, McModalProvider, McPeriodSelect, McPopoverButton, McPopoverForm, McProSelect, McResult, McSelect, McTag, McThemeConfig, McTreePanel, McTreeSelect, Utils };
26
+ export { McContainer, McFonts, McGroupPanel, McIconFont, McInputNumber, McLazyLoader, McModalProvider, McPeriodSelect, McPopoverButton, McPopoverForm, McProSelect, McResult, McTag, McThemeConfig, McTreePanel, McTreeSelect, Utils };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zykj2024/much-library",
3
- "version": "1.0.10-beta.2",
3
+ "version": "1.0.10-beta.4",
4
4
  "description": "react library",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",