@cuvp1225/antd 0.2.90 → 0.2.91

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.
@@ -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.LineChart = exports.Progress = exports.Alert = exports.Tree = exports.Image = exports.TreeSelect = exports.Mentions = exports.AutoComplete = exports.Switch = exports.PageHeader = exports.Transfer = exports.TimePicker = exports.Comment = exports.Rate = exports.Slider = exports.Empty = exports.Avatar = exports.Card = 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;
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
- //export { Table } from './table1'
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
- //export { Statistic } from './statistic';
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
- var LineChart_1 = require("./LineChart");
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: React.ForwardRefExoticComponent<StatisticProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
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
- const tango_boot_1 = require("@music163/tango-boot");
7
- const react_1 = tslib_1.__importStar(require("react"));
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
- function StatisticDesigner(_a) {
10
- var { children, title } = _a, _b = tango_helpers_1.SLOT.dnd, dataDnd = _a[_b], _c = tango_helpers_1.SLOT.id, dataId = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, ["children", "title", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
11
- // const statisticRef = useRef<HTMLDivElement>(null);
12
- // 监听弹层显示事件
13
- // const handleVisibleChange = (visible: boolean) => {
14
- // console.log('handleVisibleChange', visible);
15
- // if (visible) {
16
- // // 使用微任务确保弹层已渲染
17
- // Promise.resolve().then(() => {
18
- // const popoverNode = document.querySelector('.ant-popover-placement-top');
19
- // console.log('popoverNode' ,popoverNode)
20
- // if (popoverNode) {
21
- // popoverNode.setAttribute('data-dnd', dataDnd);
22
- // popoverNode.setAttribute('data-id', dataId);
23
- // }
24
- // });
25
- // }
26
- // };
27
- (0, react_1.useEffect)(() => {
28
- Promise.resolve().then(() => {
29
- const popoverNode = document.querySelector(`.${dataId}`);
30
- console.log('rate', popoverNode);
31
- if (popoverNode) {
32
- popoverNode.setAttribute('data-dnd', dataDnd);
33
- popoverNode.setAttribute('data-id', dataId);
34
- popoverNode.setAttribute('draggable', 'true');
35
- }
36
- });
37
- }, [dataDnd, dataId]);
38
- return (
39
- // <div ref={statisticRef}>
40
- react_1.default.createElement(antd_1.Statistic, Object.assign({ className: dataId,
41
- // data-dnd={dataDnd}
42
- // data-id={dataId}
43
- style: style }, rest))
44
- // </div>
45
- );
46
- }
47
- exports.Statistic = (0, tango_boot_1.defineComponent)(antd_1.Statistic, {
48
- name: 'Statistic',
49
- designerConfig: {
50
- render({ designerProps, originalProps }) {
51
- console.log("Statistic: designerProps:", designerProps, "originalProps:", originalProps);
52
- return react_1.default.createElement(StatisticDesigner, Object.assign({ title: "\u4E00\u7EA7\u6807\u9898" }, designerProps, originalProps));
53
- },
54
- },
55
- // designerConfig: {
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;
@@ -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
- //export { Table } from './table1'
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
- //export { Statistic } from './statistic';
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 { LineChart } from './LineChart';
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: React.ForwardRefExoticComponent<StatisticProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
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, { useEffect } from 'react';
3
+ //import { defineComponent } from '@music163/tango-boot';
4
+ import React from 'react';
5
5
  import { SLOT } from '@music163/tango-helpers';
6
- function StatisticDesigner(_a) {
7
- var { children, title } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["children", "title", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
8
- // const statisticRef = useRef<HTMLDivElement>(null);
9
- // 监听弹层显示事件
10
- // const handleVisibleChange = (visible: boolean) => {
11
- // console.log('handleVisibleChange', visible);
12
- // if (visible) {
13
- // // 使用微任务确保弹层已渲染
14
- // Promise.resolve().then(() => {
15
- // const popoverNode = document.querySelector('.ant-popover-placement-top');
16
- // console.log('popoverNode' ,popoverNode)
17
- // if (popoverNode) {
18
- // popoverNode.setAttribute('data-dnd', dataDnd);
19
- // popoverNode.setAttribute('data-id', dataId);
20
- // }
21
- // });
22
- // }
23
- // };
24
- useEffect(() => {
25
- Promise.resolve().then(() => {
26
- const popoverNode = document.querySelector(`.${dataId}`);
27
- console.log('rate', popoverNode);
28
- if (popoverNode) {
29
- popoverNode.setAttribute('data-dnd', dataDnd);
30
- popoverNode.setAttribute('data-id', dataId);
31
- popoverNode.setAttribute('draggable', 'true');
32
- }
33
- });
34
- }, [dataDnd, dataId]);
35
- return (
36
- // <div ref={statisticRef}>
37
- React.createElement(AntStatistic, Object.assign({ className: dataId,
38
- // data-dnd={dataDnd}
39
- // data-id={dataId}
40
- style: style }, rest))
41
- // </div>
42
- );
43
- }
44
- export const Statistic = defineComponent(AntStatistic, {
45
- name: 'Statistic',
46
- designerConfig: {
47
- render({ designerProps, originalProps }) {
48
- console.log("Statistic: designerProps:", designerProps, "originalProps:", originalProps);
49
- return React.createElement(StatisticDesigner, Object.assign({ title: "\u4E00\u7EA7\u6807\u9898" }, designerProps, originalProps));
50
- },
51
- },
52
- // designerConfig: {
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
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuvp1225/antd",
3
- "version": "0.2.90",
3
+ "version": "0.2.91",
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": "b68fe501cce00407392e5af8b14ea44727ff09c6"
57
+ "gitHead": "66a661b6076db43ca80bf88e2745e89f7544bec3"
58
58
  }