gxxc-ui 1.0.62 → 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.
- package/dist/AmountCellUI/index.js +49 -83
- package/dist/AnchorUI/demo/anchor-button.js +33 -65
- package/dist/AnchorUI/demo/use-anchor.js +33 -57
- package/dist/AnchorUI/index.js +27 -29
- package/dist/BackUI/index.js +16 -34
- package/dist/BroadcastUI/index.js +20 -53
- package/dist/ButtonUI/index.js +10 -13
- package/dist/CellUI/index.js +26 -45
- package/dist/Components/index.js +8 -4
- package/dist/DateUI/index.js +50 -76
- package/dist/DescriptionsUI/index.js +15 -57
- package/dist/EmptyUI/emptyImage.js +9 -9
- package/dist/EmptyUI/index.js +9 -11
- package/dist/FilterUI/index.js +65 -147
- package/dist/FormUI/index.js +14 -41
- package/dist/HtmlTemplateRenderer/index.js +20 -17
- package/dist/IconUI/index.js +10 -16
- package/dist/IconUI/material/dictionary.js +13 -43
- package/dist/IconUI/material/material.js +121 -468
- package/dist/IconUI/material/rally.js +252 -33
- package/dist/ImageUI/index.js +49 -170
- package/dist/InputUI/index.js +46 -64
- package/dist/LoadingUI/index.js +9 -12
- package/dist/MessageUI/index.js +7 -3
- package/dist/ModalUI/index.js +42 -62
- package/dist/NotificationUI/index.js +13 -12
- package/dist/PasswordStrongUI/index.js +20 -51
- package/dist/RichEditorUI/index.js +27 -38
- package/dist/RichEditorUI/index.scss +11 -0
- package/dist/SearchNumberUI/index.js +29 -32
- package/dist/SearchUI/index.js +27 -31
- package/dist/SelectUI/index.js +41 -56
- package/dist/StatisticUI/index.js +28 -45
- package/dist/SwitchUI/index.js +11 -17
- package/dist/TableUI/demo/setting.js +34 -70
- package/dist/TableUI/index.js +47 -64
- package/dist/TableUI/material/Button/index.js +9 -17
- package/dist/TableUI/material/HideMultipleLines/index.js +21 -46
- package/dist/TableUI/material/MultiLine/index.js +9 -18
- package/dist/TableUI/material/Operate/index.js +24 -33
- package/dist/TableUI/material/Setting/index.js +100 -151
- package/dist/TagUI/index.js +37 -100
- package/dist/TestUI/index.js +8 -4
- package/dist/TextUI/index.js +9 -13
- package/dist/Tiga/demo/demoQuick.js +32 -85
- package/dist/Tiga/demo/demoQuickType.js +29 -89
- package/dist/Tiga/index.js +31 -34
- package/dist/Tiga/material/quickType.js +33 -43
- package/dist/UploadUI/index.js +115 -218
- package/dist/UploadUI/type.js +15 -27
- package/dist/VesselUI/index.js +73 -100
- package/dist/VesselUI/type.js +0 -1
- package/dist/VideoPreviewUI/index.js +14 -26
- package/dist/assets/index.js +0 -1
- package/dist/index.js +73 -36
- package/package.json +2 -1
|
@@ -1,29 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import { Tooltip } from
|
|
3
|
-
import lodash from
|
|
4
|
-
import React from
|
|
5
|
-
import CountUp from
|
|
6
|
-
import { num_expand } from
|
|
7
|
-
|
|
8
|
-
const {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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))
|
|
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))
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const
|
|
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)
|
|
69
|
-
value: amount,
|
|
70
|
-
|
|
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,
|
|
75
|
-
suffix:
|
|
50
|
+
value: num_expand(amount, 1e8),
|
|
51
|
+
suffix: "亿"
|
|
76
52
|
};
|
|
77
|
-
} else if (Math.abs(num) >=
|
|
53
|
+
} else if (Math.abs(num) >= 1e4) {
|
|
78
54
|
return {
|
|
79
|
-
value: num_expand(amount,
|
|
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
|
|
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
|
|
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
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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
|
-
|
|
1
|
+
// src/AnchorUI/demo/anchor-button.tsx
|
|
2
|
+
import React, { useRef, useState } from "react";
|
|
2
3
|
import { AnchorUI, ButtonUI } from "../..";
|
|
3
|
-
|
|
4
|
+
var anchor_button_default = () => {
|
|
4
5
|
const ref = useRef(null);
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
1
|
+
// src/AnchorUI/demo/use-anchor.tsx
|
|
2
|
+
import React, { useRef, useState } from "react";
|
|
2
3
|
import { AnchorUI } from "../..";
|
|
3
|
-
|
|
4
|
+
var use_anchor_default = () => {
|
|
4
5
|
const ref = useRef(null);
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
+
};
|
package/dist/AnchorUI/index.js
CHANGED
|
@@ -1,43 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
// src/AnchorUI/index.tsx
|
|
2
|
+
import { Anchor } from "antd";
|
|
3
|
+
import React, { useEffect, useState } from "react";
|
|
3
4
|
import "./index.scss";
|
|
4
|
-
|
|
5
|
-
const {
|
|
6
|
-
|
|
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)
|
|
20
|
-
behavior:
|
|
21
|
-
});
|
|
12
|
+
if (targetElement)
|
|
13
|
+
targetElement.scrollIntoView({ behavior: "auto" });
|
|
22
14
|
}
|
|
23
|
-
|
|
24
|
-
|
|
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
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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;
|
package/dist/BackUI/index.js
CHANGED
|
@@ -1,41 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
import React from
|
|
3
|
-
import { useNavigate } from
|
|
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
|
-
|
|
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
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
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
|
-
|
|
6
|
+
var BroadcastUI = (props) => {
|
|
6
7
|
const ref = useRef(null);
|
|
7
|
-
const {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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;
|
package/dist/ButtonUI/index.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import { Button } from
|
|
3
|
-
import React from
|
|
1
|
+
// src/ButtonUI/index.tsx
|
|
2
|
+
import { Button } from "antd";
|
|
3
|
+
import React from "react";
|
|
4
4
|
import "./index.scss";
|
|
5
|
-
|
|
6
|
-
const {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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;
|