@ztocwst/rc-pro-materials 0.1.23 → 0.1.25
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +5 -5
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/dist/SCM_Comps.css +1 -1
- package/dist/SCM_Comps.js +3 -3
- package/dist/SCM_Comps.js.map +1 -1
- package/es/components/z-agg-block/index.d.ts +3 -0
- package/es/components/z-agg-block/index.js +2 -0
- package/es/components/z-agg-block/index.less +126 -0
- package/es/components/z-agg-block/z-agg-block.d.ts +27 -0
- package/es/components/z-agg-block/z-agg-block.js +57 -0
- package/es/components/z-pointer-block/index.d.ts +3 -0
- package/es/components/z-pointer-block/index.js +2 -0
- package/es/components/z-pointer-block/index.less +15 -0
- package/es/components/z-pointer-block/z-pointer-block.d.ts +15 -0
- package/es/components/z-pointer-block/z-pointer-block.js +36 -0
- package/es/components/z-ranking-list/index.less +5 -1
- package/es/index.d.ts +4 -0
- package/es/index.js +4 -0
- package/es/style.js +4 -0
- package/lib/components/z-agg-block/index.d.ts +3 -0
- package/lib/components/z-agg-block/index.js +8 -0
- package/lib/components/z-agg-block/index.less +126 -0
- package/lib/components/z-agg-block/z-agg-block.d.ts +27 -0
- package/lib/components/z-agg-block/z-agg-block.js +63 -0
- package/lib/components/z-pointer-block/index.d.ts +3 -0
- package/lib/components/z-pointer-block/index.js +8 -0
- package/lib/components/z-pointer-block/index.less +15 -0
- package/lib/components/z-pointer-block/z-pointer-block.d.ts +15 -0
- package/lib/components/z-pointer-block/z-pointer-block.js +42 -0
- package/lib/components/z-ranking-list/index.less +5 -1
- package/lib/index.d.ts +4 -0
- package/lib/index.js +6 -2
- package/lib/style.js +2 -0
- package/package.json +3 -3
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
@root-entry-name: 'default';
|
|
2
|
+
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
|
+
|
|
4
|
+
.pointer-block-wrap {
|
|
5
|
+
box-shadow: 0px 4px 16px 2px rgba(0, 0, 0, 0.1);
|
|
6
|
+
border-radius: 8px;
|
|
7
|
+
padding: 16px;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
|
|
10
|
+
&.animate:hover {
|
|
11
|
+
transform: scale(1.05);
|
|
12
|
+
transition: all 0.3s ease-in;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.pointer-block-title {
|
|
17
|
+
display: flex;
|
|
18
|
+
// color: #487ffb;
|
|
19
|
+
// color: @primary-color;
|
|
20
|
+
color: var(--ant-primary-color, @primary-color);
|
|
21
|
+
|
|
22
|
+
.ant-typography {
|
|
23
|
+
color: inherit;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.pointer-block-title-l {
|
|
28
|
+
flex: 1;
|
|
29
|
+
|
|
30
|
+
.title {
|
|
31
|
+
font-size: 16px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.sub-title {
|
|
35
|
+
font-size: 24px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
img {
|
|
39
|
+
width: 80px;
|
|
40
|
+
height: 80px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.pointer-block-content {
|
|
45
|
+
margin-top: 10px;
|
|
46
|
+
display: grid;
|
|
47
|
+
grid-gap: 10px;
|
|
48
|
+
grid-template-columns: repeat(1, 1fr);
|
|
49
|
+
|
|
50
|
+
.z-pointer-block.animate:hover {
|
|
51
|
+
box-shadow: 0 4px 16px 2px rgba(0, 0, 0, 0.1);
|
|
52
|
+
transform: scale(1.05);
|
|
53
|
+
transition: all 0.3s ease-in;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// 流程指标块
|
|
57
|
+
&.process .z-pointer-block,
|
|
58
|
+
&.process > * {
|
|
59
|
+
position: relative;
|
|
60
|
+
|
|
61
|
+
&::before {
|
|
62
|
+
position: absolute;
|
|
63
|
+
top: -6px;
|
|
64
|
+
// left: -20px;
|
|
65
|
+
left: 0;
|
|
66
|
+
display: inline-block;
|
|
67
|
+
width: 104%;
|
|
68
|
+
height: 1px;
|
|
69
|
+
background: #e5e5e5;
|
|
70
|
+
content: '';
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:first-child::before {
|
|
74
|
+
left: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&::after {
|
|
78
|
+
position: absolute;
|
|
79
|
+
top: -10px;
|
|
80
|
+
left: -10px;
|
|
81
|
+
display: inline-block;
|
|
82
|
+
width: 10px;
|
|
83
|
+
height: 10px;
|
|
84
|
+
background: #fff;
|
|
85
|
+
// border: 2px solid @primary-color;
|
|
86
|
+
border: 2px solid var(--ant-primary-color, @primary-color);
|
|
87
|
+
border-radius: 50%;
|
|
88
|
+
content: '';
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// 纵向
|
|
93
|
+
&.vertical .z-pointer-block,
|
|
94
|
+
&.vertical > * {
|
|
95
|
+
&::before {
|
|
96
|
+
position: absolute;
|
|
97
|
+
// top: -20px;
|
|
98
|
+
top: 0;
|
|
99
|
+
left: -6px;
|
|
100
|
+
display: inline-block;
|
|
101
|
+
width: 1px;
|
|
102
|
+
height: 110%;
|
|
103
|
+
background: #e5e5e5;
|
|
104
|
+
content: '';
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:first-child::before {
|
|
108
|
+
top: 0;
|
|
109
|
+
left: -6px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&::after {
|
|
113
|
+
position: absolute;
|
|
114
|
+
top: -10px;
|
|
115
|
+
left: -10px;
|
|
116
|
+
display: inline-block;
|
|
117
|
+
width: 10px;
|
|
118
|
+
height: 10px;
|
|
119
|
+
background: #fff;
|
|
120
|
+
// border: 2px solid @primary-color;
|
|
121
|
+
border: 2px solid var(--ant-primary-color, @primary-color);
|
|
122
|
+
border-radius: 50%;
|
|
123
|
+
content: '';
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
import { TypeZPointerBlockProps } from '../z-pointer-block';
|
|
4
|
+
export interface TypeAggBlockProps {
|
|
5
|
+
/** 背景色 */
|
|
6
|
+
color?: {
|
|
7
|
+
start: string;
|
|
8
|
+
end: string;
|
|
9
|
+
};
|
|
10
|
+
/** 标题 */
|
|
11
|
+
title?: React.ReactNode;
|
|
12
|
+
/** 副标题 */
|
|
13
|
+
subTitle?: React.ReactNode;
|
|
14
|
+
/** 额外附属配置 */
|
|
15
|
+
extra?: React.ReactNode;
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
/** 流程指标 */
|
|
18
|
+
process?: boolean;
|
|
19
|
+
/** 方向:横向 | 纵向 */
|
|
20
|
+
direction?: 'horizontal' | 'vertical';
|
|
21
|
+
/** 一行几列 */
|
|
22
|
+
column?: number;
|
|
23
|
+
items?: TypeZPointerBlockProps[] | React.ReactNode;
|
|
24
|
+
onClick?: (item: any) => void;
|
|
25
|
+
}
|
|
26
|
+
declare const ZAggBlock: React.FC<TypeAggBlockProps>;
|
|
27
|
+
export default ZAggBlock;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["color", "title", "subTitle", "extra", "process", "direction", "column", "onClick"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import classnames from 'classnames';
|
|
6
|
+
import "./index.less";
|
|
7
|
+
import ZPointerBlock from "../z-pointer-block";
|
|
8
|
+
var ZAggBlock = function ZAggBlock(_ref) {
|
|
9
|
+
var _rest$items;
|
|
10
|
+
var color = _ref.color,
|
|
11
|
+
title = _ref.title,
|
|
12
|
+
subTitle = _ref.subTitle,
|
|
13
|
+
extra = _ref.extra,
|
|
14
|
+
process = _ref.process,
|
|
15
|
+
direction = _ref.direction,
|
|
16
|
+
column = _ref.column,
|
|
17
|
+
_onClick = _ref.onClick,
|
|
18
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
19
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: classnames('pointer-block-wrap', {
|
|
21
|
+
animate: !!_onClick
|
|
22
|
+
}),
|
|
23
|
+
style: _extends({
|
|
24
|
+
background: "linear-gradient(180deg, " + ((color === null || color === void 0 ? void 0 : color.start) || '#eaf0ff') + " 0%, " + ((color === null || color === void 0 ? void 0 : color.end) || '#fafeff') + " 100%)"
|
|
25
|
+
}, rest.style || {}),
|
|
26
|
+
onClick: function onClick() {
|
|
27
|
+
_onClick === null || _onClick === void 0 ? void 0 : _onClick(rest.items);
|
|
28
|
+
}
|
|
29
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
className: "pointer-block-title"
|
|
31
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: "pointer-block-title-l"
|
|
33
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
className: "title"
|
|
35
|
+
}, title), /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: "sub-title"
|
|
37
|
+
}, subTitle)), /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: "pointer-block-title-r"
|
|
39
|
+
}, extra)), /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
className: classnames('pointer-block-content', {
|
|
41
|
+
process: !!process,
|
|
42
|
+
vertical: direction === 'vertical'
|
|
43
|
+
}),
|
|
44
|
+
style: {
|
|
45
|
+
gridTemplateColumns: "repeat(" + (column || 1) + ", 1fr)"
|
|
46
|
+
}
|
|
47
|
+
}, /*#__PURE__*/React.isValidElement(rest.items) ? rest.items : (_rest$items = rest.items) === null || _rest$items === void 0 ? void 0 : _rest$items.map(function (e, index) {
|
|
48
|
+
if ( /*#__PURE__*/React.isValidElement(e)) {
|
|
49
|
+
// todo 统一处理点击事件
|
|
50
|
+
return e;
|
|
51
|
+
}
|
|
52
|
+
return /*#__PURE__*/React.createElement(ZPointerBlock, _extends({
|
|
53
|
+
key: index
|
|
54
|
+
}, e));
|
|
55
|
+
})));
|
|
56
|
+
};
|
|
57
|
+
export default ZAggBlock;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@root-entry-name: 'default';
|
|
2
|
+
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
|
+
|
|
4
|
+
.z-pointer-block {
|
|
5
|
+
padding: 16px;
|
|
6
|
+
background: #fff;
|
|
7
|
+
border-radius: 8px;
|
|
8
|
+
border: 1px solid #d9d9d9;
|
|
9
|
+
min-width: 100px;
|
|
10
|
+
|
|
11
|
+
.icon {
|
|
12
|
+
// color: @primary-color;
|
|
13
|
+
color: var(--ant-primary-color, @primary-color);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface TypeZPointerBlockProps {
|
|
4
|
+
/** 标题 */
|
|
5
|
+
title: string | React.ReactNode;
|
|
6
|
+
/** 值 */
|
|
7
|
+
value: string;
|
|
8
|
+
/** 图标 */
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
align?: 'top' | 'middle' | 'bottom';
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
onClick?: (item?: any) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const ZPointerBlock: (props: TypeZPointerBlockProps) => import("react").JSX.Element;
|
|
15
|
+
export default ZPointerBlock;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import _Row from "antd/es/row";
|
|
2
|
+
import _Col from "antd/es/col";
|
|
3
|
+
import _Statistic from "antd/es/statistic";
|
|
4
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
5
|
+
import "./index.less";
|
|
6
|
+
import classnames from 'classnames';
|
|
7
|
+
var ZPointerBlock = function ZPointerBlock(props) {
|
|
8
|
+
var style = props.style,
|
|
9
|
+
title = props.title,
|
|
10
|
+
value = props.value,
|
|
11
|
+
icon = props.icon,
|
|
12
|
+
align = props.align,
|
|
13
|
+
_onClick = props.onClick;
|
|
14
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
15
|
+
className: classnames('z-pointer-block', {
|
|
16
|
+
// 聚合指标里可点击时添加css动效
|
|
17
|
+
animate: !!_onClick
|
|
18
|
+
}),
|
|
19
|
+
style: _extends({}, style),
|
|
20
|
+
onClick: function onClick() {
|
|
21
|
+
_onClick === null || _onClick === void 0 ? void 0 : _onClick(props);
|
|
22
|
+
}
|
|
23
|
+
}, /*#__PURE__*/React.createElement(_Row, {
|
|
24
|
+
align: align,
|
|
25
|
+
gutter: 8
|
|
26
|
+
}, /*#__PURE__*/React.createElement(_Col, {
|
|
27
|
+
flex: 1
|
|
28
|
+
}, /*#__PURE__*/React.createElement(_Statistic, {
|
|
29
|
+
title: title,
|
|
30
|
+
value: value,
|
|
31
|
+
groupSeparator: ""
|
|
32
|
+
})), icon ? /*#__PURE__*/React.createElement(_Col, {
|
|
33
|
+
className: "icon"
|
|
34
|
+
}, icon) : null));
|
|
35
|
+
};
|
|
36
|
+
export default ZPointerBlock;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
@root-entry-name: 'default';
|
|
2
|
+
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
|
+
|
|
1
4
|
.ranking-list .ant-table .ant-table-thead > tr > th {
|
|
2
5
|
border-bottom: none;
|
|
3
6
|
font-size: 13px;
|
|
@@ -33,7 +36,8 @@
|
|
|
33
36
|
|
|
34
37
|
&.highlight {
|
|
35
38
|
color: #fff;
|
|
36
|
-
background: #1890ff;
|
|
39
|
+
// background: #1890ff;
|
|
40
|
+
background: var(--ant-primary-color, @primary-color);
|
|
37
41
|
}
|
|
38
42
|
}
|
|
39
43
|
|
package/es/index.d.ts
CHANGED
|
@@ -29,3 +29,7 @@ export { default as ZAuth } from './components/z-auth';
|
|
|
29
29
|
export type { TypeAuthProps } from './components/z-auth';
|
|
30
30
|
export { default as ZProProvider } from './components/z-pro-provider';
|
|
31
31
|
export type { TypeZProProviderProps } from './components/z-pro-provider';
|
|
32
|
+
export { default as ZPointerBlock } from './components/z-pointer-block';
|
|
33
|
+
export type { TypeZPointerBlockProps } from './components/z-pointer-block';
|
|
34
|
+
export { default as ZAggBlock } from './components/z-agg-block';
|
|
35
|
+
export type { TypeAggBlockProps } from './components/z-agg-block';
|
package/es/index.js
CHANGED
|
@@ -16,6 +16,10 @@ export { default as ZSingleFactory } from "./components/z-singleFactory";
|
|
|
16
16
|
export { default as ZRcEditTable } from "./components/z-editTable";
|
|
17
17
|
export { default as ZAuth } from "./components/z-auth";
|
|
18
18
|
export { default as ZProProvider } from "./components/z-pro-provider";
|
|
19
|
+
// 普通指标块
|
|
20
|
+
export { default as ZPointerBlock } from "./components/z-pointer-block";
|
|
21
|
+
// 聚合指标
|
|
22
|
+
export { default as ZAggBlock } from "./components/z-agg-block";
|
|
19
23
|
|
|
20
24
|
// const bizCssPrefix = 'bizpack';
|
|
21
25
|
|
package/es/style.js
CHANGED
|
@@ -4,8 +4,12 @@ import 'antd/lib/table/style';
|
|
|
4
4
|
import 'antd/lib/typography/style';
|
|
5
5
|
import 'antd/lib/config-provider/style';
|
|
6
6
|
import 'antd/es/config-provider/style';
|
|
7
|
+
import 'antd/lib/row/style';
|
|
8
|
+
import 'antd/lib/col/style';
|
|
7
9
|
import 'antd/es/statistic/style';
|
|
8
10
|
import 'antd/es/progress/style';
|
|
9
11
|
import 'antd/es/table/style';
|
|
10
12
|
import 'antd/es/typography/style';
|
|
13
|
+
import 'antd/es/row/style';
|
|
14
|
+
import 'antd/es/col/style';
|
|
11
15
|
import './index.scss';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports["default"] = void 0;
|
|
6
|
+
var _zAggBlock = _interopRequireDefault(require("./z-agg-block"));
|
|
7
|
+
var _default = _zAggBlock["default"];
|
|
8
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
@root-entry-name: 'default';
|
|
2
|
+
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
|
+
|
|
4
|
+
.pointer-block-wrap {
|
|
5
|
+
box-shadow: 0px 4px 16px 2px rgba(0, 0, 0, 0.1);
|
|
6
|
+
border-radius: 8px;
|
|
7
|
+
padding: 16px;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
|
|
10
|
+
&.animate:hover {
|
|
11
|
+
transform: scale(1.05);
|
|
12
|
+
transition: all 0.3s ease-in;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.pointer-block-title {
|
|
17
|
+
display: flex;
|
|
18
|
+
// color: #487ffb;
|
|
19
|
+
// color: @primary-color;
|
|
20
|
+
color: var(--ant-primary-color, @primary-color);
|
|
21
|
+
|
|
22
|
+
.ant-typography {
|
|
23
|
+
color: inherit;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.pointer-block-title-l {
|
|
28
|
+
flex: 1;
|
|
29
|
+
|
|
30
|
+
.title {
|
|
31
|
+
font-size: 16px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.sub-title {
|
|
35
|
+
font-size: 24px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
img {
|
|
39
|
+
width: 80px;
|
|
40
|
+
height: 80px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.pointer-block-content {
|
|
45
|
+
margin-top: 10px;
|
|
46
|
+
display: grid;
|
|
47
|
+
grid-gap: 10px;
|
|
48
|
+
grid-template-columns: repeat(1, 1fr);
|
|
49
|
+
|
|
50
|
+
.z-pointer-block.animate:hover {
|
|
51
|
+
box-shadow: 0 4px 16px 2px rgba(0, 0, 0, 0.1);
|
|
52
|
+
transform: scale(1.05);
|
|
53
|
+
transition: all 0.3s ease-in;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// 流程指标块
|
|
57
|
+
&.process .z-pointer-block,
|
|
58
|
+
&.process > * {
|
|
59
|
+
position: relative;
|
|
60
|
+
|
|
61
|
+
&::before {
|
|
62
|
+
position: absolute;
|
|
63
|
+
top: -6px;
|
|
64
|
+
// left: -20px;
|
|
65
|
+
left: 0;
|
|
66
|
+
display: inline-block;
|
|
67
|
+
width: 104%;
|
|
68
|
+
height: 1px;
|
|
69
|
+
background: #e5e5e5;
|
|
70
|
+
content: '';
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:first-child::before {
|
|
74
|
+
left: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&::after {
|
|
78
|
+
position: absolute;
|
|
79
|
+
top: -10px;
|
|
80
|
+
left: -10px;
|
|
81
|
+
display: inline-block;
|
|
82
|
+
width: 10px;
|
|
83
|
+
height: 10px;
|
|
84
|
+
background: #fff;
|
|
85
|
+
// border: 2px solid @primary-color;
|
|
86
|
+
border: 2px solid var(--ant-primary-color, @primary-color);
|
|
87
|
+
border-radius: 50%;
|
|
88
|
+
content: '';
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// 纵向
|
|
93
|
+
&.vertical .z-pointer-block,
|
|
94
|
+
&.vertical > * {
|
|
95
|
+
&::before {
|
|
96
|
+
position: absolute;
|
|
97
|
+
// top: -20px;
|
|
98
|
+
top: 0;
|
|
99
|
+
left: -6px;
|
|
100
|
+
display: inline-block;
|
|
101
|
+
width: 1px;
|
|
102
|
+
height: 110%;
|
|
103
|
+
background: #e5e5e5;
|
|
104
|
+
content: '';
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:first-child::before {
|
|
108
|
+
top: 0;
|
|
109
|
+
left: -6px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&::after {
|
|
113
|
+
position: absolute;
|
|
114
|
+
top: -10px;
|
|
115
|
+
left: -10px;
|
|
116
|
+
display: inline-block;
|
|
117
|
+
width: 10px;
|
|
118
|
+
height: 10px;
|
|
119
|
+
background: #fff;
|
|
120
|
+
// border: 2px solid @primary-color;
|
|
121
|
+
border: 2px solid var(--ant-primary-color, @primary-color);
|
|
122
|
+
border-radius: 50%;
|
|
123
|
+
content: '';
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
import { TypeZPointerBlockProps } from '../z-pointer-block';
|
|
4
|
+
export interface TypeAggBlockProps {
|
|
5
|
+
/** 背景色 */
|
|
6
|
+
color?: {
|
|
7
|
+
start: string;
|
|
8
|
+
end: string;
|
|
9
|
+
};
|
|
10
|
+
/** 标题 */
|
|
11
|
+
title?: React.ReactNode;
|
|
12
|
+
/** 副标题 */
|
|
13
|
+
subTitle?: React.ReactNode;
|
|
14
|
+
/** 额外附属配置 */
|
|
15
|
+
extra?: React.ReactNode;
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
/** 流程指标 */
|
|
18
|
+
process?: boolean;
|
|
19
|
+
/** 方向:横向 | 纵向 */
|
|
20
|
+
direction?: 'horizontal' | 'vertical';
|
|
21
|
+
/** 一行几列 */
|
|
22
|
+
column?: number;
|
|
23
|
+
items?: TypeZPointerBlockProps[] | React.ReactNode;
|
|
24
|
+
onClick?: (item: any) => void;
|
|
25
|
+
}
|
|
26
|
+
declare const ZAggBlock: React.FC<TypeAggBlockProps>;
|
|
27
|
+
export default ZAggBlock;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports["default"] = void 0;
|
|
6
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
require("./index.less");
|
|
11
|
+
var _zPointerBlock = _interopRequireDefault(require("../z-pointer-block"));
|
|
12
|
+
var _excluded = ["color", "title", "subTitle", "extra", "process", "direction", "column", "onClick"];
|
|
13
|
+
var ZAggBlock = function ZAggBlock(_ref) {
|
|
14
|
+
var _rest$items;
|
|
15
|
+
var color = _ref.color,
|
|
16
|
+
title = _ref.title,
|
|
17
|
+
subTitle = _ref.subTitle,
|
|
18
|
+
extra = _ref.extra,
|
|
19
|
+
process = _ref.process,
|
|
20
|
+
direction = _ref.direction,
|
|
21
|
+
column = _ref.column,
|
|
22
|
+
_onClick = _ref.onClick,
|
|
23
|
+
rest = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
24
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
25
|
+
className: (0, _classnames["default"])('pointer-block-wrap', {
|
|
26
|
+
animate: !!_onClick
|
|
27
|
+
}),
|
|
28
|
+
style: (0, _extends2["default"])({
|
|
29
|
+
background: "linear-gradient(180deg, " + ((color === null || color === void 0 ? void 0 : color.start) || '#eaf0ff') + " 0%, " + ((color === null || color === void 0 ? void 0 : color.end) || '#fafeff') + " 100%)"
|
|
30
|
+
}, rest.style || {}),
|
|
31
|
+
onClick: function onClick() {
|
|
32
|
+
_onClick === null || _onClick === void 0 ? void 0 : _onClick(rest.items);
|
|
33
|
+
}
|
|
34
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
35
|
+
className: "pointer-block-title"
|
|
36
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
37
|
+
className: "pointer-block-title-l"
|
|
38
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
39
|
+
className: "title"
|
|
40
|
+
}, title), /*#__PURE__*/_react["default"].createElement("div", {
|
|
41
|
+
className: "sub-title"
|
|
42
|
+
}, subTitle)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
43
|
+
className: "pointer-block-title-r"
|
|
44
|
+
}, extra)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
45
|
+
className: (0, _classnames["default"])('pointer-block-content', {
|
|
46
|
+
process: !!process,
|
|
47
|
+
vertical: direction === 'vertical'
|
|
48
|
+
}),
|
|
49
|
+
style: {
|
|
50
|
+
gridTemplateColumns: "repeat(" + (column || 1) + ", 1fr)"
|
|
51
|
+
}
|
|
52
|
+
}, /*#__PURE__*/_react["default"].isValidElement(rest.items) ? rest.items : (_rest$items = rest.items) === null || _rest$items === void 0 ? void 0 : _rest$items.map(function (e, index) {
|
|
53
|
+
if ( /*#__PURE__*/_react["default"].isValidElement(e)) {
|
|
54
|
+
// todo 统一处理点击事件
|
|
55
|
+
return e;
|
|
56
|
+
}
|
|
57
|
+
return /*#__PURE__*/_react["default"].createElement(_zPointerBlock["default"], (0, _extends2["default"])({
|
|
58
|
+
key: index
|
|
59
|
+
}, e));
|
|
60
|
+
})));
|
|
61
|
+
};
|
|
62
|
+
var _default = ZAggBlock;
|
|
63
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports["default"] = void 0;
|
|
6
|
+
var _zPointerBlock = _interopRequireDefault(require("./z-pointer-block"));
|
|
7
|
+
var _default = _zPointerBlock["default"];
|
|
8
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@root-entry-name: 'default';
|
|
2
|
+
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
|
+
|
|
4
|
+
.z-pointer-block {
|
|
5
|
+
padding: 16px;
|
|
6
|
+
background: #fff;
|
|
7
|
+
border-radius: 8px;
|
|
8
|
+
border: 1px solid #d9d9d9;
|
|
9
|
+
min-width: 100px;
|
|
10
|
+
|
|
11
|
+
.icon {
|
|
12
|
+
// color: @primary-color;
|
|
13
|
+
color: var(--ant-primary-color, @primary-color);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface TypeZPointerBlockProps {
|
|
4
|
+
/** 标题 */
|
|
5
|
+
title: string | React.ReactNode;
|
|
6
|
+
/** 值 */
|
|
7
|
+
value: string;
|
|
8
|
+
/** 图标 */
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
align?: 'top' | 'middle' | 'bottom';
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
onClick?: (item?: any) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const ZPointerBlock: (props: TypeZPointerBlockProps) => import("react").JSX.Element;
|
|
15
|
+
export default ZPointerBlock;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports["default"] = void 0;
|
|
6
|
+
var _row = _interopRequireDefault(require("antd/lib/row"));
|
|
7
|
+
var _col = _interopRequireDefault(require("antd/lib/col"));
|
|
8
|
+
var _statistic = _interopRequireDefault(require("antd/lib/statistic"));
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
require("./index.less");
|
|
11
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
+
var ZPointerBlock = function ZPointerBlock(props) {
|
|
13
|
+
var style = props.style,
|
|
14
|
+
title = props.title,
|
|
15
|
+
value = props.value,
|
|
16
|
+
icon = props.icon,
|
|
17
|
+
align = props.align,
|
|
18
|
+
_onClick = props.onClick;
|
|
19
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: (0, _classnames["default"])('z-pointer-block', {
|
|
21
|
+
// 聚合指标里可点击时添加css动效
|
|
22
|
+
animate: !!_onClick
|
|
23
|
+
}),
|
|
24
|
+
style: (0, _extends2["default"])({}, style),
|
|
25
|
+
onClick: function onClick() {
|
|
26
|
+
_onClick === null || _onClick === void 0 ? void 0 : _onClick(props);
|
|
27
|
+
}
|
|
28
|
+
}, /*#__PURE__*/React.createElement(_row["default"], {
|
|
29
|
+
align: align,
|
|
30
|
+
gutter: 8
|
|
31
|
+
}, /*#__PURE__*/React.createElement(_col["default"], {
|
|
32
|
+
flex: 1
|
|
33
|
+
}, /*#__PURE__*/React.createElement(_statistic["default"], {
|
|
34
|
+
title: title,
|
|
35
|
+
value: value,
|
|
36
|
+
groupSeparator: ""
|
|
37
|
+
})), icon ? /*#__PURE__*/React.createElement(_col["default"], {
|
|
38
|
+
className: "icon"
|
|
39
|
+
}, icon) : null));
|
|
40
|
+
};
|
|
41
|
+
var _default = ZPointerBlock;
|
|
42
|
+
exports["default"] = _default;
|