@ztocwst/rc-pro-materials 0.1.23 → 0.1.24
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 +119 -0
- package/es/components/z-agg-block/z-agg-block.d.ts +28 -0
- package/es/components/z-agg-block/z-agg-block.js +53 -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 +14 -0
- package/es/components/z-pointer-block/z-pointer-block.js +28 -0
- package/es/index.d.ts +4 -0
- package/es/index.js +4 -0
- package/es/style.js +2 -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 +119 -0
- package/lib/components/z-agg-block/z-agg-block.d.ts +28 -0
- package/lib/components/z-agg-block/z-agg-block.js +59 -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 +14 -0
- package/lib/components/z-pointer-block/z-pointer-block.js +34 -0
- 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,119 @@
|
|
|
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
|
+
|
|
21
|
+
.ant-typography {
|
|
22
|
+
color: inherit;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.pointer-block-title-l {
|
|
27
|
+
flex: 1;
|
|
28
|
+
|
|
29
|
+
.title {
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.sub-title {
|
|
34
|
+
font-size: 24px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
img {
|
|
38
|
+
width: 80px;
|
|
39
|
+
height: 80px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.pointer-block-content {
|
|
44
|
+
margin-top: 10px;
|
|
45
|
+
display: grid;
|
|
46
|
+
grid-gap: 10px;
|
|
47
|
+
grid-template-columns: repeat(1, 1fr);
|
|
48
|
+
|
|
49
|
+
// 流程指标块
|
|
50
|
+
&.process .z-pointer-block,
|
|
51
|
+
&.process > * {
|
|
52
|
+
position: relative;
|
|
53
|
+
|
|
54
|
+
&::before {
|
|
55
|
+
position: absolute;
|
|
56
|
+
top: -6px;
|
|
57
|
+
// left: -20px;
|
|
58
|
+
left: 0;
|
|
59
|
+
display: inline-block;
|
|
60
|
+
width: 104%;
|
|
61
|
+
height: 1px;
|
|
62
|
+
background: #e5e5e5;
|
|
63
|
+
content: '';
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:first-child::before {
|
|
67
|
+
left: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&::after {
|
|
71
|
+
position: absolute;
|
|
72
|
+
top: -10px;
|
|
73
|
+
left: -10px;
|
|
74
|
+
display: inline-block;
|
|
75
|
+
width: 10px;
|
|
76
|
+
height: 10px;
|
|
77
|
+
background: #fff;
|
|
78
|
+
border: 2px solid @primary-color;
|
|
79
|
+
// border: 2px solid var(--ant-primary-color);
|
|
80
|
+
border-radius: 50%;
|
|
81
|
+
content: '';
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// 纵向
|
|
86
|
+
&.vertical .z-pointer-block,
|
|
87
|
+
&.vertical > * {
|
|
88
|
+
&::before {
|
|
89
|
+
position: absolute;
|
|
90
|
+
// top: -20px;
|
|
91
|
+
top: 0;
|
|
92
|
+
left: -6px;
|
|
93
|
+
display: inline-block;
|
|
94
|
+
width: 1px;
|
|
95
|
+
height: 110%;
|
|
96
|
+
background: #e5e5e5;
|
|
97
|
+
content: '';
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:first-child::before {
|
|
101
|
+
top: 0;
|
|
102
|
+
left: -6px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&::after {
|
|
106
|
+
position: absolute;
|
|
107
|
+
top: -10px;
|
|
108
|
+
left: -10px;
|
|
109
|
+
display: inline-block;
|
|
110
|
+
width: 10px;
|
|
111
|
+
height: 10px;
|
|
112
|
+
background: #fff;
|
|
113
|
+
border: 2px solid @primary-color;
|
|
114
|
+
// border: 2px solid var(--ant-primary-color);
|
|
115
|
+
border-radius: 50%;
|
|
116
|
+
content: '';
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
animate?: boolean;
|
|
12
|
+
/** 标题 */
|
|
13
|
+
title?: React.ReactNode;
|
|
14
|
+
/** 副标题 */
|
|
15
|
+
subTitle?: React.ReactNode;
|
|
16
|
+
/** 额外附属配置 */
|
|
17
|
+
extra?: React.ReactNode;
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
/** 流程指标 */
|
|
20
|
+
process?: boolean;
|
|
21
|
+
/** 方向:横向 | 纵向 */
|
|
22
|
+
direction?: 'horizontal' | 'vertical';
|
|
23
|
+
/** 一行几列 */
|
|
24
|
+
column?: number;
|
|
25
|
+
items?: TypeZPointerBlockProps[] | React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
declare const ZAggBlock: React.FC<TypeAggBlockProps>;
|
|
28
|
+
export default ZAggBlock;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["color", "animate", "title", "subTitle", "extra", "process", "direction", "column"];
|
|
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
|
+
animate = _ref.animate,
|
|
12
|
+
title = _ref.title,
|
|
13
|
+
subTitle = _ref.subTitle,
|
|
14
|
+
extra = _ref.extra,
|
|
15
|
+
process = _ref.process,
|
|
16
|
+
direction = _ref.direction,
|
|
17
|
+
column = _ref.column,
|
|
18
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
19
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: classnames('pointer-block-wrap', {
|
|
21
|
+
animate: !!animate
|
|
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
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
className: "pointer-block-title"
|
|
28
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
className: "pointer-block-title-l"
|
|
30
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
className: "title"
|
|
32
|
+
}, title), /*#__PURE__*/React.createElement("div", {
|
|
33
|
+
className: "sub-title"
|
|
34
|
+
}, subTitle)), /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
className: "pointer-block-title-r"
|
|
36
|
+
}, extra)), /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
className: classnames('pointer-block-content', {
|
|
38
|
+
process: !!process,
|
|
39
|
+
vertical: direction === 'vertical'
|
|
40
|
+
}),
|
|
41
|
+
style: {
|
|
42
|
+
gridTemplateColumns: "repeat(" + (column || 1) + ", 1fr)"
|
|
43
|
+
}
|
|
44
|
+
}, /*#__PURE__*/React.isValidElement(rest.items) ? rest.items : (_rest$items = rest.items) === null || _rest$items === void 0 ? void 0 : _rest$items.map(function (e, index) {
|
|
45
|
+
if ( /*#__PURE__*/React.isValidElement(e)) {
|
|
46
|
+
return e;
|
|
47
|
+
}
|
|
48
|
+
return /*#__PURE__*/React.createElement(ZPointerBlock, _extends({
|
|
49
|
+
key: index
|
|
50
|
+
}, e));
|
|
51
|
+
})));
|
|
52
|
+
};
|
|
53
|
+
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);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
}
|
|
13
|
+
declare const ZPointerBlock: ({ style, title, value, icon, align }: TypeZPointerBlockProps) => import("react").JSX.Element;
|
|
14
|
+
export default ZPointerBlock;
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
var ZPointerBlock = function ZPointerBlock(_ref) {
|
|
7
|
+
var style = _ref.style,
|
|
8
|
+
title = _ref.title,
|
|
9
|
+
value = _ref.value,
|
|
10
|
+
icon = _ref.icon,
|
|
11
|
+
align = _ref.align;
|
|
12
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: "z-pointer-block",
|
|
14
|
+
style: _extends({}, style)
|
|
15
|
+
}, /*#__PURE__*/React.createElement(_Row, {
|
|
16
|
+
align: align,
|
|
17
|
+
gutter: 8
|
|
18
|
+
}, /*#__PURE__*/React.createElement(_Col, {
|
|
19
|
+
flex: 1
|
|
20
|
+
}, /*#__PURE__*/React.createElement(_Statistic, {
|
|
21
|
+
title: title,
|
|
22
|
+
value: value,
|
|
23
|
+
groupSeparator: ""
|
|
24
|
+
})), icon ? /*#__PURE__*/React.createElement(_Col, {
|
|
25
|
+
className: "icon"
|
|
26
|
+
}, icon) : null));
|
|
27
|
+
};
|
|
28
|
+
export default ZPointerBlock;
|
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
|
@@ -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,119 @@
|
|
|
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
|
+
|
|
21
|
+
.ant-typography {
|
|
22
|
+
color: inherit;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.pointer-block-title-l {
|
|
27
|
+
flex: 1;
|
|
28
|
+
|
|
29
|
+
.title {
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.sub-title {
|
|
34
|
+
font-size: 24px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
img {
|
|
38
|
+
width: 80px;
|
|
39
|
+
height: 80px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.pointer-block-content {
|
|
44
|
+
margin-top: 10px;
|
|
45
|
+
display: grid;
|
|
46
|
+
grid-gap: 10px;
|
|
47
|
+
grid-template-columns: repeat(1, 1fr);
|
|
48
|
+
|
|
49
|
+
// 流程指标块
|
|
50
|
+
&.process .z-pointer-block,
|
|
51
|
+
&.process > * {
|
|
52
|
+
position: relative;
|
|
53
|
+
|
|
54
|
+
&::before {
|
|
55
|
+
position: absolute;
|
|
56
|
+
top: -6px;
|
|
57
|
+
// left: -20px;
|
|
58
|
+
left: 0;
|
|
59
|
+
display: inline-block;
|
|
60
|
+
width: 104%;
|
|
61
|
+
height: 1px;
|
|
62
|
+
background: #e5e5e5;
|
|
63
|
+
content: '';
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:first-child::before {
|
|
67
|
+
left: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&::after {
|
|
71
|
+
position: absolute;
|
|
72
|
+
top: -10px;
|
|
73
|
+
left: -10px;
|
|
74
|
+
display: inline-block;
|
|
75
|
+
width: 10px;
|
|
76
|
+
height: 10px;
|
|
77
|
+
background: #fff;
|
|
78
|
+
border: 2px solid @primary-color;
|
|
79
|
+
// border: 2px solid var(--ant-primary-color);
|
|
80
|
+
border-radius: 50%;
|
|
81
|
+
content: '';
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// 纵向
|
|
86
|
+
&.vertical .z-pointer-block,
|
|
87
|
+
&.vertical > * {
|
|
88
|
+
&::before {
|
|
89
|
+
position: absolute;
|
|
90
|
+
// top: -20px;
|
|
91
|
+
top: 0;
|
|
92
|
+
left: -6px;
|
|
93
|
+
display: inline-block;
|
|
94
|
+
width: 1px;
|
|
95
|
+
height: 110%;
|
|
96
|
+
background: #e5e5e5;
|
|
97
|
+
content: '';
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:first-child::before {
|
|
101
|
+
top: 0;
|
|
102
|
+
left: -6px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&::after {
|
|
106
|
+
position: absolute;
|
|
107
|
+
top: -10px;
|
|
108
|
+
left: -10px;
|
|
109
|
+
display: inline-block;
|
|
110
|
+
width: 10px;
|
|
111
|
+
height: 10px;
|
|
112
|
+
background: #fff;
|
|
113
|
+
border: 2px solid @primary-color;
|
|
114
|
+
// border: 2px solid var(--ant-primary-color);
|
|
115
|
+
border-radius: 50%;
|
|
116
|
+
content: '';
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
animate?: boolean;
|
|
12
|
+
/** 标题 */
|
|
13
|
+
title?: React.ReactNode;
|
|
14
|
+
/** 副标题 */
|
|
15
|
+
subTitle?: React.ReactNode;
|
|
16
|
+
/** 额外附属配置 */
|
|
17
|
+
extra?: React.ReactNode;
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
/** 流程指标 */
|
|
20
|
+
process?: boolean;
|
|
21
|
+
/** 方向:横向 | 纵向 */
|
|
22
|
+
direction?: 'horizontal' | 'vertical';
|
|
23
|
+
/** 一行几列 */
|
|
24
|
+
column?: number;
|
|
25
|
+
items?: TypeZPointerBlockProps[] | React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
declare const ZAggBlock: React.FC<TypeAggBlockProps>;
|
|
28
|
+
export default ZAggBlock;
|
|
@@ -0,0 +1,59 @@
|
|
|
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", "animate", "title", "subTitle", "extra", "process", "direction", "column"];
|
|
13
|
+
var ZAggBlock = function ZAggBlock(_ref) {
|
|
14
|
+
var _rest$items;
|
|
15
|
+
var color = _ref.color,
|
|
16
|
+
animate = _ref.animate,
|
|
17
|
+
title = _ref.title,
|
|
18
|
+
subTitle = _ref.subTitle,
|
|
19
|
+
extra = _ref.extra,
|
|
20
|
+
process = _ref.process,
|
|
21
|
+
direction = _ref.direction,
|
|
22
|
+
column = _ref.column,
|
|
23
|
+
rest = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
24
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
25
|
+
className: (0, _classnames["default"])('pointer-block-wrap', {
|
|
26
|
+
animate: !!animate
|
|
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
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
32
|
+
className: "pointer-block-title"
|
|
33
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
34
|
+
className: "pointer-block-title-l"
|
|
35
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
36
|
+
className: "title"
|
|
37
|
+
}, title), /*#__PURE__*/_react["default"].createElement("div", {
|
|
38
|
+
className: "sub-title"
|
|
39
|
+
}, subTitle)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
40
|
+
className: "pointer-block-title-r"
|
|
41
|
+
}, extra)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
42
|
+
className: (0, _classnames["default"])('pointer-block-content', {
|
|
43
|
+
process: !!process,
|
|
44
|
+
vertical: direction === 'vertical'
|
|
45
|
+
}),
|
|
46
|
+
style: {
|
|
47
|
+
gridTemplateColumns: "repeat(" + (column || 1) + ", 1fr)"
|
|
48
|
+
}
|
|
49
|
+
}, /*#__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) {
|
|
50
|
+
if ( /*#__PURE__*/_react["default"].isValidElement(e)) {
|
|
51
|
+
return e;
|
|
52
|
+
}
|
|
53
|
+
return /*#__PURE__*/_react["default"].createElement(_zPointerBlock["default"], (0, _extends2["default"])({
|
|
54
|
+
key: index
|
|
55
|
+
}, e));
|
|
56
|
+
})));
|
|
57
|
+
};
|
|
58
|
+
var _default = ZAggBlock;
|
|
59
|
+
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);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
}
|
|
13
|
+
declare const ZPointerBlock: ({ style, title, value, icon, align }: TypeZPointerBlockProps) => import("react").JSX.Element;
|
|
14
|
+
export default ZPointerBlock;
|
|
@@ -0,0 +1,34 @@
|
|
|
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 ZPointerBlock = function ZPointerBlock(_ref) {
|
|
12
|
+
var style = _ref.style,
|
|
13
|
+
title = _ref.title,
|
|
14
|
+
value = _ref.value,
|
|
15
|
+
icon = _ref.icon,
|
|
16
|
+
align = _ref.align;
|
|
17
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
className: "z-pointer-block",
|
|
19
|
+
style: (0, _extends2["default"])({}, style)
|
|
20
|
+
}, /*#__PURE__*/React.createElement(_row["default"], {
|
|
21
|
+
align: align,
|
|
22
|
+
gutter: 8
|
|
23
|
+
}, /*#__PURE__*/React.createElement(_col["default"], {
|
|
24
|
+
flex: 1
|
|
25
|
+
}, /*#__PURE__*/React.createElement(_statistic["default"], {
|
|
26
|
+
title: title,
|
|
27
|
+
value: value,
|
|
28
|
+
groupSeparator: ""
|
|
29
|
+
})), icon ? /*#__PURE__*/React.createElement(_col["default"], {
|
|
30
|
+
className: "icon"
|
|
31
|
+
}, icon) : null));
|
|
32
|
+
};
|
|
33
|
+
var _default = ZPointerBlock;
|
|
34
|
+
exports["default"] = _default;
|
package/lib/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/lib/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
exports.__esModule = true;
|
|
5
|
-
exports.ZWarehouse = exports.ZTpl = exports.ZTable = exports.ZStatistic = exports.ZSingleFactory = exports.ZSimpleBar = exports.ZRcEditTable = exports.ZRankingList = exports.ZProProvider = exports.ZPreview = exports.ZList = exports.ZForm = exports.ZEllipsis = exports.ZDiv = exports.ZConfigProvider = exports.ZButton = exports.ZBox = exports.ZAuth = void 0;
|
|
5
|
+
exports.ZWarehouse = exports.ZTpl = exports.ZTable = exports.ZStatistic = exports.ZSingleFactory = exports.ZSimpleBar = exports.ZRcEditTable = exports.ZRankingList = exports.ZProProvider = exports.ZPreview = exports.ZPointerBlock = exports.ZList = exports.ZForm = exports.ZEllipsis = exports.ZDiv = exports.ZConfigProvider = exports.ZButton = exports.ZBox = exports.ZAuth = exports.ZAggBlock = void 0;
|
|
6
6
|
var _zButton = _interopRequireDefault(require("./components/z-button"));
|
|
7
7
|
exports.ZButton = _zButton["default"];
|
|
8
8
|
var _zForm = _interopRequireDefault(require("./components/z-form"));
|
|
@@ -38,4 +38,8 @@ exports.ZRcEditTable = _zEditTable["default"];
|
|
|
38
38
|
var _zAuth = _interopRequireDefault(require("./components/z-auth"));
|
|
39
39
|
exports.ZAuth = _zAuth["default"];
|
|
40
40
|
var _zProProvider = _interopRequireDefault(require("./components/z-pro-provider"));
|
|
41
|
-
exports.ZProProvider = _zProProvider["default"];
|
|
41
|
+
exports.ZProProvider = _zProProvider["default"];
|
|
42
|
+
var _zPointerBlock = _interopRequireDefault(require("./components/z-pointer-block"));
|
|
43
|
+
exports.ZPointerBlock = _zPointerBlock["default"];
|
|
44
|
+
var _zAggBlock = _interopRequireDefault(require("./components/z-agg-block"));
|
|
45
|
+
exports.ZAggBlock = _zAggBlock["default"];
|
package/lib/style.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ztocwst/rc-pro-materials",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.24",
|
|
4
4
|
"description": "@ztocwst/rc-pro-materials",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -85,9 +85,9 @@
|
|
|
85
85
|
},
|
|
86
86
|
"componentConfig": {
|
|
87
87
|
"isComponentLibrary": true,
|
|
88
|
-
"materialSchema": "https://unpkg.com/@ztocwst/rc-pro-materials@0.1.
|
|
88
|
+
"materialSchema": "https://unpkg.com/@ztocwst/rc-pro-materials@0.1.24/build/lowcode/assets-prod.json"
|
|
89
89
|
},
|
|
90
|
-
"homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.1.
|
|
90
|
+
"homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.1.24/build/index.html",
|
|
91
91
|
"publishConfig": {
|
|
92
92
|
"registry": "https://registry.npmjs.org/",
|
|
93
93
|
"access": "public"
|