@cuvp1225/antd 0.2.90 → 0.2.92
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/designer.js +75 -6147
- package/dist/index.js +74 -6146
- package/lib/cjs/components/index.d.ts +2 -1
- package/lib/cjs/components/index.js +6 -5
- package/lib/cjs/components/statistic.d.ts +3 -2
- package/lib/cjs/components/statistic.js +78 -51
- package/lib/cjs/prototypes/timeline.js +4 -4
- package/lib/esm/components/index.d.ts +2 -1
- package/lib/esm/components/index.js +3 -3
- package/lib/esm/components/statistic.d.ts +3 -2
- package/lib/esm/components/statistic.js +77 -51
- package/lib/esm/prototypes/timeline.js +4 -4
- package/package.json +2 -2
@@ -25,6 +25,7 @@ export { Calendar } from './calendar';
|
|
25
25
|
export { Divider } from './divider';
|
26
26
|
export { Badge } from './badge';
|
27
27
|
export { Pagination } from './pagination';
|
28
|
+
export { Table } from './table1';
|
28
29
|
export { Card } from './card';
|
29
30
|
export { Avatar } from './avatar';
|
30
31
|
export { Empty } from './empty';
|
@@ -33,6 +34,7 @@ export { Rate } from './rate';
|
|
33
34
|
export { Comment } from './comment';
|
34
35
|
export { TimePicker } from './time-picker';
|
35
36
|
export { Transfer } from './transfer';
|
37
|
+
export { Statistic } from './statistic';
|
36
38
|
export { PageHeader } from './pageheader';
|
37
39
|
export { Switch } from './switch';
|
38
40
|
export { AutoComplete } from './auto-complete';
|
@@ -42,4 +44,3 @@ export { Image } from './image';
|
|
42
44
|
export { Tree } from './tree';
|
43
45
|
export { Alert } from "./alert";
|
44
46
|
export { Progress } from './progress';
|
45
|
-
export { LineChart } from './LineChart';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.Progress = exports.Alert = exports.Tree = exports.Image = exports.TreeSelect = exports.Mentions = exports.AutoComplete = exports.Switch = exports.PageHeader = exports.Statistic = exports.Transfer = exports.TimePicker = exports.Comment = exports.Rate = exports.Slider = exports.Empty = exports.Avatar = exports.Card = exports.Table = exports.Pagination = exports.Badge = exports.Divider = exports.Calendar = exports.Spin = exports.Skeleton = exports.Upload = exports.DropdownButton = exports.Dropdown = exports.Cascader = exports.CheckboxGroup = exports.Checkbox = exports.RadioGroup = exports.Radio = exports.DatePicker = exports.Drawer = exports.Result = exports.Space = exports.Select = exports.Modalnew = exports.Password = exports.TextArea = exports.Input = exports.InputNumber = exports.ButtonGroup = exports.Button = exports.Box = exports.When = exports.Link = exports.Each = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
tslib_1.__exportStar(require("antd"), exports);
|
6
6
|
//以下组件都从antd中导出,解决下述组件卡顿问题
|
@@ -82,7 +82,8 @@ Object.defineProperty(exports, "Badge", { enumerable: true, get: function () { r
|
|
82
82
|
var pagination_1 = require("./pagination");
|
83
83
|
Object.defineProperty(exports, "Pagination", { enumerable: true, get: function () { return pagination_1.Pagination; } });
|
84
84
|
//export { Table } from './table'
|
85
|
-
|
85
|
+
var table1_1 = require("./table1");
|
86
|
+
Object.defineProperty(exports, "Table", { enumerable: true, get: function () { return table1_1.Table; } });
|
86
87
|
var card_1 = require("./card");
|
87
88
|
Object.defineProperty(exports, "Card", { enumerable: true, get: function () { return card_1.Card; } });
|
88
89
|
//export { Tag } from './tag'
|
@@ -100,7 +101,8 @@ var time_picker_1 = require("./time-picker");
|
|
100
101
|
Object.defineProperty(exports, "TimePicker", { enumerable: true, get: function () { return time_picker_1.TimePicker; } });
|
101
102
|
var transfer_1 = require("./transfer");
|
102
103
|
Object.defineProperty(exports, "Transfer", { enumerable: true, get: function () { return transfer_1.Transfer; } });
|
103
|
-
|
104
|
+
var statistic_1 = require("./statistic");
|
105
|
+
Object.defineProperty(exports, "Statistic", { enumerable: true, get: function () { return statistic_1.Statistic; } });
|
104
106
|
var pageheader_1 = require("./pageheader");
|
105
107
|
Object.defineProperty(exports, "PageHeader", { enumerable: true, get: function () { return pageheader_1.PageHeader; } });
|
106
108
|
var switch_1 = require("./switch");
|
@@ -123,5 +125,4 @@ var progress_1 = require("./progress");
|
|
123
125
|
Object.defineProperty(exports, "Progress", { enumerable: true, get: function () { return progress_1.Progress; } });
|
124
126
|
//export {Affix} from './affix';
|
125
127
|
//import * as echarts from 'echarts';
|
126
|
-
|
127
|
-
Object.defineProperty(exports, "LineChart", { enumerable: true, get: function () { return LineChart_1.LineChart; } });
|
128
|
+
//export {LineChart} from './LineChart';
|
@@ -1,3 +1,4 @@
|
|
1
|
-
import { StatisticProps } from 'antd';
|
2
1
|
import React from 'react';
|
3
|
-
export declare const Statistic:
|
2
|
+
export declare const Statistic: ({ [SLOT.id]: dataId, [SLOT.dnd]: dataDnd, ...rest }: {
|
3
|
+
[x: string]: any;
|
4
|
+
}) => React.JSX.Element;
|
@@ -3,55 +3,82 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Statistic = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const antd_1 = require("antd");
|
6
|
-
|
7
|
-
const react_1 = tslib_1.
|
6
|
+
//import { defineComponent } from '@music163/tango-boot';
|
7
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
8
8
|
const tango_helpers_1 = require("@music163/tango-helpers");
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
}
|
9
|
+
// interface RecordType {
|
10
|
+
// key: string;
|
11
|
+
// title: string;
|
12
|
+
// description: string;
|
13
|
+
// }
|
14
|
+
// function StatisticDesigner({
|
15
|
+
// children,
|
16
|
+
// title,
|
17
|
+
// [SLOT.dnd]: dataDnd,
|
18
|
+
// [SLOT.id]: dataId,
|
19
|
+
// style,
|
20
|
+
// ...rest
|
21
|
+
// }: StatisticProps & {
|
22
|
+
// [key: string]: any, // 添加索引签名
|
23
|
+
// dnd?: string,
|
24
|
+
// children?: React.ReactNode
|
25
|
+
// }) {
|
26
|
+
// // const statisticRef = useRef<HTMLDivElement>(null);
|
27
|
+
// // 监听弹层显示事件
|
28
|
+
// // const handleVisibleChange = (visible: boolean) => {
|
29
|
+
// // console.log('handleVisibleChange', visible);
|
30
|
+
// // if (visible) {
|
31
|
+
// // // 使用微任务确保弹层已渲染
|
32
|
+
// // Promise.resolve().then(() => {
|
33
|
+
// // const popoverNode = document.querySelector('.ant-popover-placement-top');
|
34
|
+
// // console.log('popoverNode' ,popoverNode)
|
35
|
+
// // if (popoverNode) {
|
36
|
+
// // popoverNode.setAttribute('data-dnd', dataDnd);
|
37
|
+
// // popoverNode.setAttribute('data-id', dataId);
|
38
|
+
// // }
|
39
|
+
// // });
|
40
|
+
// // }
|
41
|
+
// // };
|
42
|
+
// useEffect(() => {
|
43
|
+
// Promise.resolve().then(() => {
|
44
|
+
// const popoverNode = document.querySelector(`.${dataId}`);
|
45
|
+
// console.log('rate', popoverNode);
|
46
|
+
// if (popoverNode) {
|
47
|
+
// popoverNode.setAttribute('data-dnd', dataDnd);
|
48
|
+
// popoverNode.setAttribute('data-id', dataId);
|
49
|
+
// popoverNode.setAttribute('draggable', 'true');
|
50
|
+
// }
|
51
|
+
// });
|
52
|
+
// }, [dataDnd, dataId]);
|
53
|
+
// return (
|
54
|
+
// // <div ref={statisticRef}>
|
55
|
+
// <AntStatistic
|
56
|
+
// className={dataId}
|
57
|
+
// // data-dnd={dataDnd}
|
58
|
+
// // data-id={dataId}
|
59
|
+
// style={style}
|
60
|
+
// {...rest}
|
61
|
+
// />
|
62
|
+
// // </div>
|
63
|
+
// );
|
64
|
+
// }
|
65
|
+
// export const Statistic = defineComponent(AntStatistic, {
|
66
|
+
// name: 'Statistic',
|
67
|
+
// designerConfig: {
|
68
|
+
// render({ designerProps, originalProps }) {
|
69
|
+
// console.log("Statistic: designerProps:", designerProps, "originalProps:", originalProps)
|
70
|
+
// return <StatisticDesigner title="一级标题" {...designerProps} {...originalProps} />;
|
71
|
+
// },
|
72
|
+
// },
|
73
|
+
// // designerConfig: {
|
74
|
+
// // },
|
75
|
+
// });
|
76
|
+
const Statistic = (_a) => {
|
77
|
+
var _b = tango_helpers_1.SLOT.id, dataId = _a[_b], _c = tango_helpers_1.SLOT.dnd, dataDnd = _a[_c], rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + ""]);
|
78
|
+
console.log("新的数值统计组件", dataId, dataDnd, rest);
|
79
|
+
const newProps = Object.assign(Object.assign({}, rest), { draggable: true });
|
80
|
+
console.log("新的数值统计组件01", newProps);
|
81
|
+
return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": dataId, draggable: true },
|
82
|
+
react_1.default.createElement(antd_1.Statistic, Object.assign({}, rest))));
|
83
|
+
};
|
84
|
+
exports.Statistic = Statistic;
|
@@ -10,9 +10,9 @@ exports.Timeline = {
|
|
10
10
|
type: 'element',
|
11
11
|
help: '垂直展示的时间流信息,用于一系列信息需按时间排列时',
|
12
12
|
hasChildren: true,
|
13
|
-
childrenName: '
|
14
|
-
initChildren: `<
|
15
|
-
relatedImports: ['TimelineItem'],
|
13
|
+
childrenName: 'Timeline.Item',
|
14
|
+
initChildren: `<Timeline.Item>阶段1</Timeline.Item><Timeline.Item>阶段2</Timeline.Item><Timeline.Item>阶段3</Timeline.Item>`,
|
15
|
+
//relatedImports: ['TimelineItem'],
|
16
16
|
props: [
|
17
17
|
...common_1.StylePrototypes,
|
18
18
|
{
|
@@ -48,7 +48,7 @@ exports.Timeline = {
|
|
48
48
|
],
|
49
49
|
};
|
50
50
|
exports.TimelineItem = {
|
51
|
-
name: '
|
51
|
+
name: 'Timeline.Item',
|
52
52
|
title: '时间轴',
|
53
53
|
package: '@cuvp1225/antd',
|
54
54
|
icon: 'icon-shijianzhouitem',
|
@@ -25,6 +25,7 @@ export { Calendar } from './calendar';
|
|
25
25
|
export { Divider } from './divider';
|
26
26
|
export { Badge } from './badge';
|
27
27
|
export { Pagination } from './pagination';
|
28
|
+
export { Table } from './table1';
|
28
29
|
export { Card } from './card';
|
29
30
|
export { Avatar } from './avatar';
|
30
31
|
export { Empty } from './empty';
|
@@ -33,6 +34,7 @@ export { Rate } from './rate';
|
|
33
34
|
export { Comment } from './comment';
|
34
35
|
export { TimePicker } from './time-picker';
|
35
36
|
export { Transfer } from './transfer';
|
37
|
+
export { Statistic } from './statistic';
|
36
38
|
export { PageHeader } from './pageheader';
|
37
39
|
export { Switch } from './switch';
|
38
40
|
export { AutoComplete } from './auto-complete';
|
@@ -42,4 +44,3 @@ export { Image } from './image';
|
|
42
44
|
export { Tree } from './tree';
|
43
45
|
export { Alert } from "./alert";
|
44
46
|
export { Progress } from './progress';
|
45
|
-
export { LineChart } from './LineChart';
|
@@ -48,7 +48,7 @@ export { Divider } from './divider';
|
|
48
48
|
export { Badge } from './badge';
|
49
49
|
export { Pagination } from './pagination';
|
50
50
|
//export { Table } from './table'
|
51
|
-
|
51
|
+
export { Table } from './table1';
|
52
52
|
export { Card } from './card';
|
53
53
|
//export { Tag } from './tag'
|
54
54
|
export { Avatar } from './avatar';
|
@@ -58,7 +58,7 @@ export { Rate } from './rate';
|
|
58
58
|
export { Comment } from './comment';
|
59
59
|
export { TimePicker } from './time-picker';
|
60
60
|
export { Transfer } from './transfer';
|
61
|
-
|
61
|
+
export { Statistic } from './statistic';
|
62
62
|
export { PageHeader } from './pageheader';
|
63
63
|
export { Switch } from './switch';
|
64
64
|
export { AutoComplete } from './auto-complete';
|
@@ -72,4 +72,4 @@ export { Alert } from "./alert";
|
|
72
72
|
export { Progress } from './progress';
|
73
73
|
//export {Affix} from './affix';
|
74
74
|
//import * as echarts from 'echarts';
|
75
|
-
export {
|
75
|
+
//export {LineChart} from './LineChart';
|
@@ -1,3 +1,4 @@
|
|
1
|
-
import { StatisticProps } from 'antd';
|
2
1
|
import React from 'react';
|
3
|
-
export declare const Statistic:
|
2
|
+
export declare const Statistic: ({ [SLOT.id]: dataId, [SLOT.dnd]: dataDnd, ...rest }: {
|
3
|
+
[x: string]: any;
|
4
|
+
}) => React.JSX.Element;
|
@@ -1,54 +1,80 @@
|
|
1
1
|
import { __rest } from "tslib";
|
2
2
|
import { Statistic as AntStatistic } from 'antd';
|
3
|
-
import { defineComponent } from '@music163/tango-boot';
|
4
|
-
import React
|
3
|
+
//import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React from 'react';
|
5
5
|
import { SLOT } from '@music163/tango-helpers';
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
}
|
6
|
+
// interface RecordType {
|
7
|
+
// key: string;
|
8
|
+
// title: string;
|
9
|
+
// description: string;
|
10
|
+
// }
|
11
|
+
// function StatisticDesigner({
|
12
|
+
// children,
|
13
|
+
// title,
|
14
|
+
// [SLOT.dnd]: dataDnd,
|
15
|
+
// [SLOT.id]: dataId,
|
16
|
+
// style,
|
17
|
+
// ...rest
|
18
|
+
// }: StatisticProps & {
|
19
|
+
// [key: string]: any, // 添加索引签名
|
20
|
+
// dnd?: string,
|
21
|
+
// children?: React.ReactNode
|
22
|
+
// }) {
|
23
|
+
// // const statisticRef = useRef<HTMLDivElement>(null);
|
24
|
+
// // 监听弹层显示事件
|
25
|
+
// // const handleVisibleChange = (visible: boolean) => {
|
26
|
+
// // console.log('handleVisibleChange', visible);
|
27
|
+
// // if (visible) {
|
28
|
+
// // // 使用微任务确保弹层已渲染
|
29
|
+
// // Promise.resolve().then(() => {
|
30
|
+
// // const popoverNode = document.querySelector('.ant-popover-placement-top');
|
31
|
+
// // console.log('popoverNode' ,popoverNode)
|
32
|
+
// // if (popoverNode) {
|
33
|
+
// // popoverNode.setAttribute('data-dnd', dataDnd);
|
34
|
+
// // popoverNode.setAttribute('data-id', dataId);
|
35
|
+
// // }
|
36
|
+
// // });
|
37
|
+
// // }
|
38
|
+
// // };
|
39
|
+
// useEffect(() => {
|
40
|
+
// Promise.resolve().then(() => {
|
41
|
+
// const popoverNode = document.querySelector(`.${dataId}`);
|
42
|
+
// console.log('rate', popoverNode);
|
43
|
+
// if (popoverNode) {
|
44
|
+
// popoverNode.setAttribute('data-dnd', dataDnd);
|
45
|
+
// popoverNode.setAttribute('data-id', dataId);
|
46
|
+
// popoverNode.setAttribute('draggable', 'true');
|
47
|
+
// }
|
48
|
+
// });
|
49
|
+
// }, [dataDnd, dataId]);
|
50
|
+
// return (
|
51
|
+
// // <div ref={statisticRef}>
|
52
|
+
// <AntStatistic
|
53
|
+
// className={dataId}
|
54
|
+
// // data-dnd={dataDnd}
|
55
|
+
// // data-id={dataId}
|
56
|
+
// style={style}
|
57
|
+
// {...rest}
|
58
|
+
// />
|
59
|
+
// // </div>
|
60
|
+
// );
|
61
|
+
// }
|
62
|
+
// export const Statistic = defineComponent(AntStatistic, {
|
63
|
+
// name: 'Statistic',
|
64
|
+
// designerConfig: {
|
65
|
+
// render({ designerProps, originalProps }) {
|
66
|
+
// console.log("Statistic: designerProps:", designerProps, "originalProps:", originalProps)
|
67
|
+
// return <StatisticDesigner title="一级标题" {...designerProps} {...originalProps} />;
|
68
|
+
// },
|
69
|
+
// },
|
70
|
+
// // designerConfig: {
|
71
|
+
// // },
|
72
|
+
// });
|
73
|
+
export const Statistic = (_a) => {
|
74
|
+
var _b = SLOT.id, dataId = _a[_b], _c = SLOT.dnd, dataDnd = _a[_c], rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + ""]);
|
75
|
+
console.log("新的数值统计组件", dataId, dataDnd, rest);
|
76
|
+
const newProps = Object.assign(Object.assign({}, rest), { draggable: true });
|
77
|
+
console.log("新的数值统计组件01", newProps);
|
78
|
+
return (React.createElement("div", { "data-dnd": dataDnd, "data-id": dataId, draggable: true },
|
79
|
+
React.createElement(AntStatistic, Object.assign({}, rest))));
|
80
|
+
};
|
@@ -7,9 +7,9 @@ export const Timeline = {
|
|
7
7
|
type: 'element',
|
8
8
|
help: '垂直展示的时间流信息,用于一系列信息需按时间排列时',
|
9
9
|
hasChildren: true,
|
10
|
-
childrenName: '
|
11
|
-
initChildren: `<
|
12
|
-
relatedImports: ['TimelineItem'],
|
10
|
+
childrenName: 'Timeline.Item',
|
11
|
+
initChildren: `<Timeline.Item>阶段1</Timeline.Item><Timeline.Item>阶段2</Timeline.Item><Timeline.Item>阶段3</Timeline.Item>`,
|
12
|
+
//relatedImports: ['TimelineItem'],
|
13
13
|
props: [
|
14
14
|
...StylePrototypes,
|
15
15
|
{
|
@@ -45,7 +45,7 @@ export const Timeline = {
|
|
45
45
|
],
|
46
46
|
};
|
47
47
|
export const TimelineItem = {
|
48
|
-
name: '
|
48
|
+
name: 'Timeline.Item',
|
49
49
|
title: '时间轴',
|
50
50
|
package: '@cuvp1225/antd',
|
51
51
|
icon: 'icon-shijianzhouitem',
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cuvp1225/antd",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.92",
|
4
4
|
"description": "antd components for tango app",
|
5
5
|
"author": "wwsun <ww.sww@outlook.com>",
|
6
6
|
"homepage": "https://github.com/netease/tango-components#readme",
|
@@ -54,5 +54,5 @@
|
|
54
54
|
"classnames": "^2.3.2",
|
55
55
|
"coral-system": "^1.0.6"
|
56
56
|
},
|
57
|
-
"gitHead": "
|
57
|
+
"gitHead": "abd603e88ccbc511acc4b9bed79d230ef7b5b205"
|
58
58
|
}
|