gxxc-ui 1.0.63 → 1.0.64

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 (55) hide show
  1. package/dist/AmountCellUI/index.js +49 -83
  2. package/dist/AnchorUI/demo/anchor-button.js +33 -65
  3. package/dist/AnchorUI/demo/use-anchor.js +33 -57
  4. package/dist/AnchorUI/index.js +27 -29
  5. package/dist/BackUI/index.js +16 -34
  6. package/dist/BroadcastUI/index.js +20 -53
  7. package/dist/ButtonUI/index.js +10 -13
  8. package/dist/CellUI/index.js +26 -45
  9. package/dist/Components/index.js +8 -4
  10. package/dist/DateUI/index.js +50 -76
  11. package/dist/DescriptionsUI/index.js +15 -57
  12. package/dist/EmptyUI/emptyImage.js +9 -9
  13. package/dist/EmptyUI/index.js +9 -11
  14. package/dist/FilterUI/index.js +65 -147
  15. package/dist/FormUI/index.js +14 -41
  16. package/dist/HtmlTemplateRenderer/index.js +20 -17
  17. package/dist/IconUI/index.js +10 -16
  18. package/dist/IconUI/material/dictionary.js +13 -43
  19. package/dist/IconUI/material/material.js +121 -468
  20. package/dist/IconUI/material/rally.js +252 -33
  21. package/dist/ImageUI/index.js +49 -170
  22. package/dist/InputUI/index.js +46 -64
  23. package/dist/LoadingUI/index.js +9 -12
  24. package/dist/MessageUI/index.js +7 -3
  25. package/dist/ModalUI/index.js +42 -62
  26. package/dist/NotificationUI/index.js +13 -12
  27. package/dist/PasswordStrongUI/index.js +20 -51
  28. package/dist/RichEditorUI/index.js +27 -40
  29. package/dist/SearchNumberUI/index.js +29 -32
  30. package/dist/SearchUI/index.js +27 -31
  31. package/dist/SelectUI/index.js +41 -56
  32. package/dist/StatisticUI/index.js +28 -45
  33. package/dist/SwitchUI/index.js +11 -17
  34. package/dist/TableUI/demo/setting.js +34 -70
  35. package/dist/TableUI/index.js +47 -64
  36. package/dist/TableUI/material/Button/index.js +9 -17
  37. package/dist/TableUI/material/HideMultipleLines/index.js +21 -46
  38. package/dist/TableUI/material/MultiLine/index.js +9 -18
  39. package/dist/TableUI/material/Operate/index.js +24 -33
  40. package/dist/TableUI/material/Setting/index.js +100 -151
  41. package/dist/TagUI/index.js +37 -100
  42. package/dist/TestUI/index.js +8 -4
  43. package/dist/TextUI/index.js +9 -13
  44. package/dist/Tiga/demo/demoQuick.js +32 -85
  45. package/dist/Tiga/demo/demoQuickType.js +29 -89
  46. package/dist/Tiga/index.js +31 -34
  47. package/dist/Tiga/material/quickType.js +33 -43
  48. package/dist/UploadUI/index.js +115 -218
  49. package/dist/UploadUI/type.js +15 -27
  50. package/dist/VesselUI/index.js +73 -100
  51. package/dist/VesselUI/type.js +0 -1
  52. package/dist/VideoPreviewUI/index.js +14 -26
  53. package/dist/assets/index.js +0 -1
  54. package/dist/index.js +72 -269
  55. package/package.json +2 -1
@@ -1,29 +1,19 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- import { Tooltip } from 'antd';
3
- import lodash from 'lodash';
4
- import React from 'react';
5
- import CountUp from 'react-countup';
6
- import { num_expand } from 'gxxc-util';
7
- export default function AmountCellUI(props) {
8
- const {
9
- className,
10
- children,
11
- animation = false,
12
- rawValue = false,
13
- forceRender = false,
14
- separator = '',
15
- ...otherProps
16
- } = props;
17
-
18
- /**
19
- * 判断传入值是否为合法数字(包括字符串形式的数字)
20
- */
21
- const isNumeric = value => {
22
- if (value === null || value === undefined) return false;
1
+ // src/AmountCellUI/index.tsx
2
+ import { Tooltip } from "antd";
3
+ import lodash from "lodash";
4
+ import React from "react";
5
+ import CountUp from "react-countup";
6
+ import { num_expand } from "gxxc-util";
7
+ function AmountCellUI(props) {
8
+ const { className, children, animation = false, rawValue = false, forceRender = false, separator = "", ...otherProps } = props;
9
+ const isNumeric = (value) => {
10
+ if (value === null || value === void 0)
11
+ return false;
23
12
  let num;
24
13
  if (lodash.isString(value)) {
25
14
  const trimmed = value.trim();
26
- if (!/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][-+]?\d+)?$/.test(trimmed)) return false;
15
+ if (!/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][-+]?\d+)?$/.test(trimmed))
16
+ return false;
27
17
  num = Number(trimmed);
28
18
  } else if (lodash.isNumber(value)) {
29
19
  num = value;
@@ -32,87 +22,63 @@ export default function AmountCellUI(props) {
32
22
  }
33
23
  return lodash.isFinite(num);
34
24
  };
35
-
36
- /**
37
- * 将传入值转换为有限数字,失败返回 null
38
- */
39
- const toFiniteNumber = value => {
25
+ const toFiniteNumber = (value) => {
40
26
  if (isNumeric(value)) {
41
27
  return Number(value);
42
28
  }
43
29
  return null;
44
30
  };
45
-
46
- /**
47
- * 获取传入值的小数位数(忽略末尾为 0 的情况,如 1.00 返回 0)
48
- */
49
- const getDecimalsIfNumber = value => {
31
+ const getDecimalsIfNumber = (value) => {
50
32
  const num = toFiniteNumber(value);
51
- if (num === null || !isNumeric(value)) return 0;
52
- if (Number.isInteger(num)) return 0;
53
- const str = num.toPrecision(); // 更稳定地获取数值字符串
54
- const decimalIndex = str.indexOf('.');
55
- if (decimalIndex === -1) return 0;
56
- const fractionalPart = str.slice(decimalIndex + 1).replace(/[^0-9]/g, '');
33
+ if (num === null || !isNumeric(value))
34
+ return 0;
35
+ if (Number.isInteger(num))
36
+ return 0;
37
+ const str = num.toPrecision();
38
+ const decimalIndex = str.indexOf(".");
39
+ if (decimalIndex === -1)
40
+ return 0;
41
+ const fractionalPart = str.slice(decimalIndex + 1).replace(/[^0-9]/g, "");
57
42
  return fractionalPart.length;
58
43
  };
59
-
60
- /**
61
- * 对金额进行格式化:
62
- * - 大于等于 1 亿:显示为 "X 亿"
63
- * - 大于等于 1 万:显示为 "X 万"
64
- * - 否则原样展示
65
- */
66
- const getFormatAmount = amount => {
44
+ const getFormatAmount = (amount) => {
67
45
  const num = toFiniteNumber(amount);
68
- if (num === null) return {
69
- value: amount,
70
- suffix: ''
71
- };
72
- if (Math.abs(num) >= 100000000) {
46
+ if (num === null)
47
+ return { value: amount, suffix: "" };
48
+ if (Math.abs(num) >= 1e8) {
73
49
  return {
74
- value: num_expand(amount, 100000000),
75
- suffix: '亿'
50
+ value: num_expand(amount, 1e8),
51
+ suffix: "亿"
76
52
  };
77
- } else if (Math.abs(num) >= 10000) {
53
+ } else if (Math.abs(num) >= 1e4) {
78
54
  return {
79
- value: num_expand(amount, 10000),
80
- suffix: ''
55
+ value: num_expand(amount, 1e4),
56
+ suffix: ""
81
57
  };
82
58
  } else {
83
59
  return {
84
60
  value: amount,
85
- suffix: ''
61
+ suffix: ""
86
62
  };
87
63
  }
88
64
  };
89
-
90
- // ================= 组件渲染逻辑 ================= //
91
- // 如果强制渲染,直接返回内容
92
65
  if (forceRender) {
93
- return /*#__PURE__*/React.createElement("div", _extends({
94
- className: `amountCellUI ${className ?? ''}`
95
- }, otherProps), children);
66
+ return /* @__PURE__ */ React.createElement("div", { className: `amountCellUI ${className ?? ""}`, ...otherProps }, children);
96
67
  }
97
-
98
- // 如果不是合法数字,直接返回 '--'
99
68
  if (!isNumeric(children)) {
100
- return /*#__PURE__*/React.createElement("div", _extends({
101
- className: `amountCellUI ${className ?? ''}`
102
- }, otherProps), '--');
69
+ return /* @__PURE__ */ React.createElement("div", { className: `amountCellUI ${className ?? ""}`, ...otherProps }, "--");
103
70
  }
104
-
105
- // 提前计算格式化结果,避免重复调用
106
71
  const formattedAmount = getFormatAmount(children);
107
- return /*#__PURE__*/React.createElement("div", _extends({
108
- className: `amountCellUI ${className ?? ''}`
109
- }, otherProps), /*#__PURE__*/React.createElement(Tooltip, {
110
- placement: "right",
111
- title: children
112
- }, animation ? /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(CountUp, {
113
- end: rawValue ? Number(children) : Number(formattedAmount?.value),
114
- decimals: rawValue ? getDecimalsIfNumber(children) : getDecimalsIfNumber(formattedAmount?.value),
115
- suffix: rawValue ? '' : formattedAmount?.suffix,
116
- separator: separator
117
- })) : /*#__PURE__*/React.createElement("span", null, rawValue ? Number(children) : Number(formattedAmount?.value) + formattedAmount?.suffix)));
118
- }
72
+ return /* @__PURE__ */ React.createElement("div", { className: `amountCellUI ${className ?? ""}`, ...otherProps }, /* @__PURE__ */ React.createElement(Tooltip, { placement: "right", title: children }, animation ? /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement(
73
+ CountUp,
74
+ {
75
+ end: rawValue ? Number(children) : Number(formattedAmount == null ? void 0 : formattedAmount.value),
76
+ decimals: rawValue ? getDecimalsIfNumber(children) : getDecimalsIfNumber(formattedAmount == null ? void 0 : formattedAmount.value),
77
+ suffix: rawValue ? "" : formattedAmount == null ? void 0 : formattedAmount.suffix,
78
+ separator
79
+ }
80
+ )) : /* @__PURE__ */ React.createElement("span", null, rawValue ? Number(children) : Number(formattedAmount == null ? void 0 : formattedAmount.value) + (formattedAmount == null ? void 0 : formattedAmount.suffix))));
81
+ }
82
+ export {
83
+ AmountCellUI as default
84
+ };
@@ -1,68 +1,36 @@
1
- import React, { useRef, useState } from 'react';
1
+ // src/AnchorUI/demo/anchor-button.tsx
2
+ import React, { useRef, useState } from "react";
2
3
  import { AnchorUI, ButtonUI } from "../..";
3
- export default (() => {
4
+ var anchor_button_default = () => {
4
5
  const ref = useRef(null);
5
- //当前导航项
6
- const [anchorActive, setAnchorActive] = useState('');
7
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ButtonUI, {
8
- onClick: () => setAnchorActive('part-1')
9
- }, "\u70B9\u51FB\u5230\u4E3B\u4F53\u8D44\u8D28"), /*#__PURE__*/React.createElement(ButtonUI, {
10
- onClick: () => setAnchorActive('part-2')
11
- }, "\u70B9\u51FB\u5230\u5BA2\u6237\u6765\u6E90"), /*#__PURE__*/React.createElement(ButtonUI, {
12
- onClick: () => setAnchorActive('part-3')
13
- }, "\u70B9\u51FB\u5230\u9879\u76EE\u4FE1\u606F"), /*#__PURE__*/React.createElement(ButtonUI, {
14
- onClick: () => setAnchorActive('part-4')
15
- }, "\u70B9\u51FB\u5230\u98CE\u63A7\u4FE1\u606F"), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("div", {
16
- style: {
17
- display: 'flex'
6
+ const [anchorActive, setAnchorActive] = useState("");
7
+ return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(ButtonUI, { onClick: () => setAnchorActive("part-1") }, "点击到主体资质"), /* @__PURE__ */ React.createElement(ButtonUI, { onClick: () => setAnchorActive("part-2") }, "点击到客户来源"), /* @__PURE__ */ React.createElement(ButtonUI, { onClick: () => setAnchorActive("part-3") }, "点击到项目信息"), /* @__PURE__ */ React.createElement(ButtonUI, { onClick: () => setAnchorActive("part-4") }, "点击到风控信息"), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement("div", { style: { display: "flex" } }, /* @__PURE__ */ React.createElement(
8
+ AnchorUI,
9
+ {
10
+ anchoruiRef: ref,
11
+ items: [
12
+ {
13
+ key: "part-1",
14
+ title: "主体资质"
15
+ },
16
+ {
17
+ key: "part-2",
18
+ title: "客户来源"
19
+ },
20
+ {
21
+ key: "part-3",
22
+ title: "项目信息"
23
+ },
24
+ {
25
+ key: "part-4",
26
+ title: "风控信息"
27
+ }
28
+ ],
29
+ anchorActive,
30
+ setAnchorActive
18
31
  }
19
- }, /*#__PURE__*/React.createElement(AnchorUI, {
20
- anchoruiRef: ref,
21
- items: [{
22
- key: 'part-1',
23
- title: '主体资质'
24
- }, {
25
- key: 'part-2',
26
- title: '客户来源'
27
- }, {
28
- key: 'part-3',
29
- title: '项目信息'
30
- }, {
31
- key: 'part-4',
32
- title: '风控信息'
33
- }],
34
- anchorActive: anchorActive,
35
- setAnchorActive: setAnchorActive
36
- }), /*#__PURE__*/React.createElement("div", {
37
- style: {
38
- flex: 1,
39
- overflow: 'scroll',
40
- height: 400
41
- },
42
- ref: ref
43
- }, /*#__PURE__*/React.createElement("div", {
44
- id: "part-1",
45
- style: {
46
- height: '200px',
47
- backgroundColor: 'rgba(255,0,0,0.2)'
48
- }
49
- }), /*#__PURE__*/React.createElement("div", {
50
- id: "part-2",
51
- style: {
52
- height: '200px',
53
- backgroundColor: 'rgba(0,255,0,0.2)'
54
- }
55
- }), /*#__PURE__*/React.createElement("div", {
56
- id: "part-3",
57
- style: {
58
- height: '200px',
59
- backgroundColor: 'rgba(0,0,255,0.2)'
60
- }
61
- }), /*#__PURE__*/React.createElement("div", {
62
- id: "part-4",
63
- style: {
64
- height: '200px',
65
- backgroundColor: 'rgba(0,0,125,0.2)'
66
- }
67
- }))));
68
- });
32
+ ), /* @__PURE__ */ React.createElement("div", { style: { flex: 1, overflow: "scroll", height: 400 }, ref }, /* @__PURE__ */ React.createElement("div", { id: "part-1", style: { height: "200px", backgroundColor: "rgba(255,0,0,0.2)" } }), /* @__PURE__ */ React.createElement("div", { id: "part-2", style: { height: "200px", backgroundColor: "rgba(0,255,0,0.2)" } }), /* @__PURE__ */ React.createElement("div", { id: "part-3", style: { height: "200px", backgroundColor: "rgba(0,0,255,0.2)" } }), /* @__PURE__ */ React.createElement("div", { id: "part-4", style: { height: "200px", backgroundColor: "rgba(0,0,125,0.2)" } }))));
33
+ };
34
+ export {
35
+ anchor_button_default as default
36
+ };
@@ -1,60 +1,36 @@
1
- import React, { useRef, useState } from 'react';
1
+ // src/AnchorUI/demo/use-anchor.tsx
2
+ import React, { useRef, useState } from "react";
2
3
  import { AnchorUI } from "../..";
3
- export default (() => {
4
+ var use_anchor_default = () => {
4
5
  const ref = useRef(null);
5
- //当前导航项
6
- const [anchorActive, setAnchorActive] = useState('');
7
- return /*#__PURE__*/React.createElement("div", {
8
- style: {
9
- display: 'flex'
6
+ const [anchorActive, setAnchorActive] = useState("");
7
+ return /* @__PURE__ */ React.createElement("div", { style: { display: "flex" } }, /* @__PURE__ */ React.createElement(
8
+ AnchorUI,
9
+ {
10
+ anchoruiRef: ref,
11
+ items: [
12
+ {
13
+ key: "part-a",
14
+ title: "主体资质"
15
+ },
16
+ {
17
+ key: "part-b",
18
+ title: "客户来源"
19
+ },
20
+ {
21
+ key: "part-c",
22
+ title: "项目信息"
23
+ },
24
+ {
25
+ key: "part-d",
26
+ title: "风控信息"
27
+ }
28
+ ],
29
+ anchorActive,
30
+ setAnchorActive
10
31
  }
11
- }, /*#__PURE__*/React.createElement(AnchorUI, {
12
- anchoruiRef: ref,
13
- items: [{
14
- key: 'part-a',
15
- title: '主体资质'
16
- }, {
17
- key: 'part-b',
18
- title: '客户来源'
19
- }, {
20
- key: 'part-c',
21
- title: '项目信息'
22
- }, {
23
- key: 'part-d',
24
- title: '风控信息'
25
- }],
26
- anchorActive: anchorActive,
27
- setAnchorActive: setAnchorActive
28
- }), /*#__PURE__*/React.createElement("div", {
29
- style: {
30
- flex: 1,
31
- overflow: 'scroll',
32
- height: 400
33
- },
34
- ref: ref
35
- }, /*#__PURE__*/React.createElement("div", {
36
- id: "part-a",
37
- style: {
38
- height: '200px',
39
- backgroundColor: 'rgba(255,0,0,0.2)'
40
- }
41
- }), /*#__PURE__*/React.createElement("div", {
42
- id: "part-b",
43
- style: {
44
- height: '200px',
45
- backgroundColor: 'rgba(0,255,0,0.2)'
46
- }
47
- }), /*#__PURE__*/React.createElement("div", {
48
- id: "part-c",
49
- style: {
50
- height: '200px',
51
- backgroundColor: 'rgba(0,0,255,0.2)'
52
- }
53
- }), /*#__PURE__*/React.createElement("div", {
54
- id: "part-d",
55
- style: {
56
- height: '200px',
57
- backgroundColor: 'rgba(0,0,125,0.2)'
58
- }
59
- })));
60
- });
32
+ ), /* @__PURE__ */ React.createElement("div", { style: { flex: 1, overflow: "scroll", height: 400 }, ref }, /* @__PURE__ */ React.createElement("div", { id: "part-a", style: { height: "200px", backgroundColor: "rgba(255,0,0,0.2)" } }), /* @__PURE__ */ React.createElement("div", { id: "part-b", style: { height: "200px", backgroundColor: "rgba(0,255,0,0.2)" } }), /* @__PURE__ */ React.createElement("div", { id: "part-c", style: { height: "200px", backgroundColor: "rgba(0,0,255,0.2)" } }), /* @__PURE__ */ React.createElement("div", { id: "part-d", style: { height: "200px", backgroundColor: "rgba(0,0,125,0.2)" } })));
33
+ };
34
+ export {
35
+ use_anchor_default as default
36
+ };
@@ -1,43 +1,41 @@
1
- import { Anchor } from 'antd';
2
- import React, { useEffect, useState } from 'react';
1
+ // src/AnchorUI/index.tsx
2
+ import { Anchor } from "antd";
3
+ import React, { useEffect, useState } from "react";
3
4
  import "./index.scss";
4
- const AnchorUI = props => {
5
- const {
6
- className,
7
- anchoruiRef,
8
- items,
9
- anchorActive,
10
- setAnchorActive
11
- } = props;
12
- // 当前聚焦id
13
- const [activeId, setActiveId] = useState('');
5
+ var AnchorUI = (props) => {
6
+ const { className, anchoruiRef, items, anchorActive, setAnchorActive } = props;
7
+ const [activeId, setActiveId] = useState("");
14
8
  useEffect(() => {
15
9
  if (anchorActive) {
16
- //判断是否点击的是当前聚焦项
17
- if ('#' + anchorActive !== activeId) {
10
+ if ("#" + anchorActive !== activeId) {
18
11
  const targetElement = document.getElementById(anchorActive);
19
- if (targetElement) targetElement.scrollIntoView({
20
- behavior: 'auto'
21
- });
12
+ if (targetElement)
13
+ targetElement.scrollIntoView({ behavior: "auto" });
22
14
  }
23
- //重置父级指定聚焦项 防止重复点击无效
24
- if (setAnchorActive) setAnchorActive('');
15
+ if (setAnchorActive)
16
+ setAnchorActive("");
25
17
  }
26
18
  }, [anchorActive]);
27
- const newItems = items.map(item => {
19
+ const newItems = items.map((item) => {
28
20
  return {
29
21
  key: item.key,
30
22
  title: item.title,
31
23
  href: `#${item.key}`
32
24
  };
33
25
  });
34
- return /*#__PURE__*/React.createElement(Anchor, {
35
- className: `anchoraUI ${className ?? ''}`,
36
- items: newItems,
37
- affix: false,
38
- getContainer: () => anchoruiRef?.current,
39
- onClick: e => e.preventDefault(),
40
- onChange: e => setActiveId(e)
41
- });
26
+ return /* @__PURE__ */ React.createElement(
27
+ Anchor,
28
+ {
29
+ className: `anchoraUI ${className ?? ""}`,
30
+ items: newItems,
31
+ affix: false,
32
+ getContainer: () => anchoruiRef == null ? void 0 : anchoruiRef.current,
33
+ onClick: (e) => e.preventDefault(),
34
+ onChange: (e) => setActiveId(e)
35
+ }
36
+ );
37
+ };
38
+ var AnchorUI_default = AnchorUI;
39
+ export {
40
+ AnchorUI_default as default
42
41
  };
43
- export default AnchorUI;
@@ -1,41 +1,23 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- import React from 'react';
3
- import { useNavigate } from 'react-router-dom';
4
- import { IconUI } from "./..";
1
+ // src/BackUI/index.tsx
2
+ import React from "react";
3
+ import { useNavigate } from "react-router-dom";
4
+ import { IconUI } from "..";
5
5
  import "./index.scss";
6
- const BackUI = props => {
7
- const {
8
- to = -1,
9
- before,
10
- current,
11
- className,
12
- children,
13
- backClick,
14
- ...otherProps
15
- } = props;
6
+ var BackUI = (props) => {
7
+ const { to = -1, before, current, className, children, backClick, ...otherProps } = props;
16
8
  const navigate = useNavigate();
17
9
  const handleClick = () => {
18
10
  navigate(to ?? -1);
19
11
  };
20
- return /*#__PURE__*/React.createElement("div", _extends({
21
- className: `sic-backui ${className ?? ''}`
22
- }, otherProps), /*#__PURE__*/React.createElement("div", {
23
- className: "sic-backui-button",
24
- onClick: () => {
25
- if (backClick) {
26
- backClick(handleClick);
27
- return;
28
- }
29
- handleClick();
12
+ return /* @__PURE__ */ React.createElement("div", { className: `sic-backui ${className ?? ""}`, ...otherProps }, /* @__PURE__ */ React.createElement("div", { className: "sic-backui-button", onClick: () => {
13
+ if (backClick) {
14
+ backClick(handleClick);
15
+ return;
30
16
  }
31
- }, /*#__PURE__*/React.createElement(IconUI, {
32
- name: "Return"
33
- }), /*#__PURE__*/React.createElement("div", null, "\u8FD4\u56DE")), /*#__PURE__*/React.createElement("div", {
34
- className: "sic-backui-text"
35
- }, /*#__PURE__*/React.createElement("div", {
36
- className: "sic-backui-text-before"
37
- }, before), /*#__PURE__*/React.createElement("div", null, "/"), /*#__PURE__*/React.createElement("div", null, current)), /*#__PURE__*/React.createElement("div", {
38
- className: "sic-backui-content"
39
- }, children));
17
+ handleClick();
18
+ } }, /* @__PURE__ */ React.createElement(IconUI, { name: "Return" }), /* @__PURE__ */ React.createElement("div", null, "返回")), /* @__PURE__ */ React.createElement("div", { className: "sic-backui-text" }, /* @__PURE__ */ React.createElement("div", { className: "sic-backui-text-before" }, before), /* @__PURE__ */ React.createElement("div", null, "/"), /* @__PURE__ */ React.createElement("div", null, current)), /* @__PURE__ */ React.createElement("div", { className: "sic-backui-content" }, children));
19
+ };
20
+ var BackUI_default = BackUI;
21
+ export {
22
+ BackUI_default as default
40
23
  };
41
- export default BackUI;
@@ -1,56 +1,23 @@
1
- import { Carousel, Popover } from 'antd';
2
- import React, { useRef } from 'react';
3
- import { IconUI } from "./..";
1
+ // src/BroadcastUI/index.tsx
2
+ import { Carousel, Popover } from "antd";
3
+ import React, { useRef } from "react";
4
+ import { IconUI } from "..";
4
5
  import "./index.scss";
5
- const BroadcastUI = props => {
6
+ var BroadcastUI = (props) => {
6
7
  const ref = useRef(null);
7
- const {
8
- items = [],
9
- width,
10
- textAlign = 'left'
11
- } = props;
12
- return /*#__PURE__*/React.createElement("div", {
13
- className: "sicBroadcastui",
14
- style: {
15
- width: width
16
- }
17
- }, /*#__PURE__*/React.createElement(IconUI, {
18
- name: "Help",
19
- theme: "filled",
20
- fill: "var(--red)",
21
- size: "18"
22
- }), items?.length > 0 && /*#__PURE__*/React.createElement("div", {
23
- className: "sicBroadcastui-content"
24
- }, /*#__PURE__*/React.createElement(Carousel, {
25
- autoplay: items?.length > 1,
26
- dots: false,
27
- dotPosition: "left",
28
- autoplaySpeed: 5000,
29
- adaptiveHeight: true
30
- }, items.map((item, index) => /*#__PURE__*/React.createElement("div", {
31
- className: "sicBroadcastui-content-item",
32
- key: index
33
- }, /*#__PURE__*/React.createElement("div", {
34
- className: "sicBroadcastui-content-item-text",
35
- style: {
36
- textAlign: textAlign
37
- }
38
- }, item))))), items?.length > 1 && /*#__PURE__*/React.createElement(Popover, {
39
- color: "rgba(0, 0, 0, 0.85)",
40
- placement: "bottomRight",
41
- getPopupContainer: () => ref.current || document.body,
42
- content: /*#__PURE__*/React.createElement("div", {
43
- className: "sicBroadcastui-popover",
44
- style: {
45
- width: width ? width - 20 : 'auto'
46
- }
47
- }, items?.map((item, index) => /*#__PURE__*/React.createElement("div", {
48
- className: "sicBroadcastui-popover-item",
49
- key: index
50
- }, item)))
51
- }, /*#__PURE__*/React.createElement("div", {
52
- className: "sicBroadcastui-more",
53
- ref: ref
54
- }, "\u67E5\u770B")));
8
+ const { items = [], width, textAlign = "left" } = props;
9
+ return /* @__PURE__ */ React.createElement("div", { className: "sicBroadcastui", style: { width } }, /* @__PURE__ */ React.createElement(IconUI, { name: "Help", theme: "filled", fill: "var(--red)", size: "18" }), (items == null ? void 0 : items.length) > 0 && /* @__PURE__ */ React.createElement("div", { className: "sicBroadcastui-content" }, /* @__PURE__ */ React.createElement(Carousel, { autoplay: (items == null ? void 0 : items.length) > 1, dots: false, dotPosition: "left", autoplaySpeed: 5e3, adaptiveHeight: true }, items.map((item, index) => /* @__PURE__ */ React.createElement("div", { className: "sicBroadcastui-content-item", key: index }, /* @__PURE__ */ React.createElement("div", { className: "sicBroadcastui-content-item-text", style: { textAlign } }, item))))), (items == null ? void 0 : items.length) > 1 && /* @__PURE__ */ React.createElement(
10
+ Popover,
11
+ {
12
+ color: "rgba(0, 0, 0, 0.85)",
13
+ placement: "bottomRight",
14
+ getPopupContainer: () => ref.current || document.body,
15
+ content: /* @__PURE__ */ React.createElement("div", { className: "sicBroadcastui-popover", style: { width: width ? width - 20 : "auto" } }, items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ React.createElement("div", { className: "sicBroadcastui-popover-item", key: index }, item)))
16
+ },
17
+ /* @__PURE__ */ React.createElement("div", { className: "sicBroadcastui-more", ref }, "查看")
18
+ ));
19
+ };
20
+ var BroadcastUI_default = BroadcastUI;
21
+ export {
22
+ BroadcastUI_default as default
55
23
  };
56
- export default BroadcastUI;
@@ -1,15 +1,12 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- import { Button } from 'antd';
3
- import React from 'react';
1
+ // src/ButtonUI/index.tsx
2
+ import { Button } from "antd";
3
+ import React from "react";
4
4
  import "./index.scss";
5
- const ButtonUI = props => {
6
- const {
7
- children,
8
- iconPosition = 'end',
9
- ...otherProps
10
- } = props;
11
- return /*#__PURE__*/React.createElement(Button, _extends({
12
- iconPosition: iconPosition
13
- }, otherProps), children);
5
+ var ButtonUI = (props) => {
6
+ const { children, iconPosition = "end", ...otherProps } = props;
7
+ return /* @__PURE__ */ React.createElement(Button, { iconPosition, ...otherProps }, children);
8
+ };
9
+ var ButtonUI_default = ButtonUI;
10
+ export {
11
+ ButtonUI_default as default
14
12
  };
15
- export default ButtonUI;