@cuvp1225/antd 0.1.19-beta.11 → 0.1.19-beta.13
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 +312 -6
- package/dist/index.js +312 -6
- package/lib/cjs/components/anchor.d.ts +4 -1
- package/lib/cjs/components/anchor.js +13 -43
- package/lib/cjs/components/backTop.d.ts +6 -0
- package/lib/cjs/components/backTop.js +17 -0
- package/lib/cjs/components/carousel.d.ts +4 -1
- package/lib/cjs/components/carousel.js +55 -27
- package/lib/cjs/components/collapse.d.ts +12 -2
- package/lib/cjs/components/collapse.js +11 -1
- package/lib/cjs/components/descriptions.js +0 -47
- package/lib/cjs/components/index.d.ts +4 -0
- package/lib/cjs/components/index.js +10 -3
- package/lib/cjs/components/popconfirm.d.ts +4 -1
- package/lib/cjs/components/popconfirm.js +72 -36
- package/lib/cjs/components/popover.d.ts +4 -1
- package/lib/cjs/components/popover.js +13 -36
- package/lib/cjs/components/radio.js +2 -56
- package/lib/cjs/components/tooltip.d.ts +5 -1
- package/lib/cjs/components/tooltip.js +13 -36
- package/lib/cjs/components/upload.js +0 -63
- package/lib/esm/components/anchor.d.ts +4 -1
- package/lib/esm/components/anchor.js +11 -42
- package/lib/esm/components/backTop.d.ts +6 -0
- package/lib/esm/components/backTop.js +13 -0
- package/lib/esm/components/carousel.d.ts +4 -1
- package/lib/esm/components/carousel.js +54 -27
- package/lib/esm/components/collapse.d.ts +12 -2
- package/lib/esm/components/collapse.js +9 -0
- package/lib/esm/components/descriptions.js +0 -47
- package/lib/esm/components/index.d.ts +4 -0
- package/lib/esm/components/index.js +4 -2
- package/lib/esm/components/popconfirm.d.ts +4 -1
- package/lib/esm/components/popconfirm.js +71 -36
- package/lib/esm/components/popover.d.ts +4 -1
- package/lib/esm/components/popover.js +12 -36
- package/lib/esm/components/radio.js +2 -56
- package/lib/esm/components/tooltip.d.ts +5 -1
- package/lib/esm/components/tooltip.js +12 -36
- package/lib/esm/components/upload.js +0 -63
- package/package.json +2 -2
@@ -1,3 +1,6 @@
|
|
1
1
|
import { AnchorProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
export declare const
|
3
|
+
export declare const Carousel: ({ [SLOT.id]: dataId, [SLOT.dnd]: dataDnd, style, ...rest }: AnchorProps & {
|
4
|
+
[key: string]: any;
|
5
|
+
children?: React.ReactNode;
|
6
|
+
}) => React.JSX.Element;
|
@@ -1,47 +1,17 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.Carousel = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const antd_1 = require("antd");
|
6
|
-
const
|
7
|
-
const
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
popoverNode.setAttribute('data-dnd', dataDnd);
|
19
|
-
popoverNode.setAttribute('data-id', dataId);
|
20
|
-
popoverNode.setAttribute('draggable', 'true');
|
21
|
-
}
|
22
|
-
});
|
23
|
-
}, [dataDnd, dataId]);
|
24
|
-
//递归遍历生成子节点
|
25
|
-
const renderLinks = (items) => {
|
26
|
-
return items.map((item) => {
|
27
|
-
const { key, href, title, children } = item;
|
28
|
-
// 如果有子节点,则递归渲染
|
29
|
-
if (children) {
|
30
|
-
return (react_1.default.createElement(Link, { key: key, href: href, title: title }, renderLinks(children)));
|
31
|
-
}
|
32
|
-
// 没有子节点的情况
|
33
|
-
return react_1.default.createElement(Link, { key: key, href: href, title: title });
|
34
|
-
});
|
35
|
-
};
|
36
|
-
return (react_1.default.createElement("div", { ref: anchorRef, draggable: 'true' },
|
37
|
-
react_1.default.createElement(antd_1.Anchor, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), renderLinks(items))));
|
38
|
-
}
|
39
|
-
exports.Anchor = (0, tango_boot_1.defineComponent)(antd_1.Anchor, {
|
40
|
-
name: 'Anchor',
|
41
|
-
designerConfig: {
|
42
|
-
render({ designerProps, originalProps }) {
|
43
|
-
console.log("Anchor: designerProps:", designerProps, "originalProps:", originalProps);
|
44
|
-
return react_1.default.createElement(AnchorDesigner, Object.assign({}, designerProps, originalProps));
|
45
|
-
},
|
46
|
-
},
|
47
|
-
});
|
6
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
7
|
+
const slottype_1 = require("../helpers/slottype");
|
8
|
+
const Carousel = (_a) => {
|
9
|
+
var
|
10
|
+
//items,
|
11
|
+
_b = slottype_1.SLOT.id,
|
12
|
+
//items,
|
13
|
+
dataId = _a[_b], _c = slottype_1.SLOT.dnd, dataDnd = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
14
|
+
return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
|
15
|
+
react_1.default.createElement(antd_1.Anchor, Object.assign({}, rest), rest.children)));
|
16
|
+
};
|
17
|
+
exports.Carousel = Carousel;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.BackTop = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const antd_1 = require("antd");
|
6
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
7
|
+
const slottype_1 = require("../helpers/slottype");
|
8
|
+
const BackTop = (_a) => {
|
9
|
+
var
|
10
|
+
//items,
|
11
|
+
_b = slottype_1.SLOT.id,
|
12
|
+
//items,
|
13
|
+
dataId = _a[_b], _c = slottype_1.SLOT.dnd, dataDnd = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
14
|
+
return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
|
15
|
+
react_1.default.createElement(antd_1.BackTop, Object.assign({}, rest), rest.children)));
|
16
|
+
};
|
17
|
+
exports.BackTop = BackTop;
|
@@ -1,3 +1,6 @@
|
|
1
1
|
import { CarouselProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
export declare const Carousel:
|
3
|
+
export declare const Carousel: ({ [SLOT.id]: dataId, [SLOT.dnd]: dataDnd, style, ...rest }: CarouselProps & {
|
4
|
+
[key: string]: any;
|
5
|
+
children?: React.ReactNode;
|
6
|
+
}) => React.JSX.Element;
|
@@ -1,32 +1,60 @@
|
|
1
1
|
"use strict";
|
2
|
+
// import { Carousel as AntCarousel, CarouselProps } from 'antd';
|
3
|
+
// import { defineComponent } from '@music163/tango-boot';
|
4
|
+
// import React, { useEffect} from 'react';
|
5
|
+
// import { SLOT } from '@music163/tango-helpers';
|
2
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
7
|
exports.Carousel = void 0;
|
4
8
|
const tslib_1 = require("tslib");
|
9
|
+
// function CarouselDesigner({
|
10
|
+
// children,
|
11
|
+
// [SLOT.dnd]: dataDnd,
|
12
|
+
// [SLOT.id]: dataId,
|
13
|
+
// style,
|
14
|
+
// ...rest
|
15
|
+
// }: CarouselProps & { [key: string]: any; dnd?: string; children?: React.ReactNode }) {
|
16
|
+
// useEffect(() => {
|
17
|
+
// Promise.resolve().then(() => {
|
18
|
+
// const popoverNode = document.querySelector(`.${dataId}`);
|
19
|
+
// console.log('spinNode', popoverNode);
|
20
|
+
// if (popoverNode) {
|
21
|
+
// popoverNode.setAttribute('data-dnd', dataDnd);
|
22
|
+
// popoverNode.setAttribute('data-id', dataId);
|
23
|
+
// popoverNode.setAttribute('draggable', 'true');
|
24
|
+
// }
|
25
|
+
// });
|
26
|
+
// }, [dataDnd, dataId]);
|
27
|
+
// return (
|
28
|
+
// <AntCarousel
|
29
|
+
// className={dataId}
|
30
|
+
// data-dnd={dataDnd}
|
31
|
+
// data-id={dataId}
|
32
|
+
// style={style}
|
33
|
+
// {...rest}
|
34
|
+
// >
|
35
|
+
// {children}
|
36
|
+
// </AntCarousel>
|
37
|
+
// );
|
38
|
+
// }
|
39
|
+
// export const Carousel = defineComponent(AntCarousel, {
|
40
|
+
// name: 'Carousel',
|
41
|
+
// designerConfig: {
|
42
|
+
// render({ designerProps, originalProps }) {
|
43
|
+
// console.log("Carousel: designerProps:", designerProps, "originalProps:", originalProps);
|
44
|
+
// return <CarouselDesigner {...designerProps} {...originalProps} />;
|
45
|
+
// },
|
46
|
+
// },
|
47
|
+
// });
|
5
48
|
const antd_1 = require("antd");
|
6
|
-
const
|
7
|
-
const
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
popoverNode.setAttribute('draggable', 'true');
|
19
|
-
}
|
20
|
-
});
|
21
|
-
}, [dataDnd, dataId]);
|
22
|
-
return (react_1.default.createElement(antd_1.Carousel, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children));
|
23
|
-
}
|
24
|
-
exports.Carousel = (0, tango_boot_1.defineComponent)(antd_1.Carousel, {
|
25
|
-
name: 'Carousel',
|
26
|
-
designerConfig: {
|
27
|
-
render({ designerProps, originalProps }) {
|
28
|
-
console.log("Carousel: designerProps:", designerProps, "originalProps:", originalProps);
|
29
|
-
return react_1.default.createElement(CarouselDesigner, Object.assign({}, designerProps, originalProps));
|
30
|
-
},
|
31
|
-
},
|
32
|
-
});
|
49
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
50
|
+
const slottype_1 = require("../helpers/slottype");
|
51
|
+
const Carousel = (_a) => {
|
52
|
+
var
|
53
|
+
//items,
|
54
|
+
_b = slottype_1.SLOT.id,
|
55
|
+
//items,
|
56
|
+
dataId = _a[_b], _c = slottype_1.SLOT.dnd, dataDnd = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
57
|
+
return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
|
58
|
+
react_1.default.createElement(antd_1.Carousel, Object.assign({}, rest), rest.children)));
|
59
|
+
};
|
60
|
+
exports.Carousel = Carousel;
|
@@ -1,6 +1,16 @@
|
|
1
|
-
import { CollapseProps } from 'antd';
|
1
|
+
import { CollapseProps, CollapsePanelProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
export declare const Collapse:
|
3
|
+
export declare const Collapse: {
|
4
|
+
({ [SLOT.id]: dataId, [SLOT.dnd]: dataDnd, style, ...rest }: CollapseProps & {
|
5
|
+
[key: string]: any;
|
6
|
+
children?: React.ReactNode;
|
7
|
+
}): React.JSX.Element;
|
8
|
+
Panel: (props: CollapsePanelProps & {
|
9
|
+
[key: string]: any;
|
10
|
+
children?: React.ReactNode;
|
11
|
+
}) => React.JSX.Element;
|
12
|
+
};
|
13
|
+
export declare const CollapsePanel: (props: CollapsePanelProps & {
|
4
14
|
[key: string]: any;
|
5
15
|
children?: React.ReactNode;
|
6
16
|
}) => React.JSX.Element;
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// import React, { useEffect} from 'react';
|
5
5
|
// import { SLOT } from '@music163/tango-helpers';
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
7
|
-
exports.Collapse = void 0;
|
7
|
+
exports.CollapsePanel = exports.Collapse = void 0;
|
8
8
|
const tslib_1 = require("tslib");
|
9
9
|
// function CollapseDesigner({
|
10
10
|
// children,
|
@@ -62,3 +62,13 @@ const Collapse = (_a) => {
|
|
62
62
|
react_1.default.createElement(antd_1.Collapse, Object.assign({}, rest), rest.children)));
|
63
63
|
};
|
64
64
|
exports.Collapse = Collapse;
|
65
|
+
const CollapsePanel = (props) => {
|
66
|
+
//console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
|
67
|
+
return (
|
68
|
+
// <div data-dnd={dataDnd} data-id={rest.tid} draggable={true} style={style} >
|
69
|
+
react_1.default.createElement(antd_1.Collapse.Panel, Object.assign({}, props))
|
70
|
+
// </div>
|
71
|
+
);
|
72
|
+
};
|
73
|
+
exports.CollapsePanel = CollapsePanel;
|
74
|
+
exports.Collapse.Panel = exports.CollapsePanel;
|
@@ -1,54 +1,7 @@
|
|
1
1
|
"use strict";
|
2
|
-
// import { Descriptions as AntDescriptions, DescriptionsProps } from 'antd';
|
3
|
-
// import { defineComponent } from '@music163/tango-boot';
|
4
|
-
// import React, { useEffect} from 'react';
|
5
|
-
// import { SLOT } from '@music163/tango-helpers';
|
6
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
7
3
|
exports.Descriptions = void 0;
|
8
4
|
const tslib_1 = require("tslib");
|
9
|
-
// function DescriptionsDesigner({
|
10
|
-
// items,
|
11
|
-
// [SLOT.dnd]: dataDnd,
|
12
|
-
// [SLOT.id]: dataId,
|
13
|
-
// style,
|
14
|
-
// ...rest
|
15
|
-
// }: DescriptionsProps & { [key: string]: any; dnd?: string; children?: React.ReactNode }) {
|
16
|
-
// useEffect(() => {
|
17
|
-
// Promise.resolve().then(() => {
|
18
|
-
// const popoverNode = document.querySelector(`.${dataId}`);
|
19
|
-
// console.log('spinNode', popoverNode);
|
20
|
-
// if (popoverNode) {
|
21
|
-
// popoverNode.setAttribute('data-dnd', dataDnd);
|
22
|
-
// popoverNode.setAttribute('data-id', dataId);
|
23
|
-
// popoverNode.setAttribute('draggable', 'true');
|
24
|
-
// }
|
25
|
-
// });
|
26
|
-
// }, [dataDnd, dataId]);
|
27
|
-
// return (
|
28
|
-
// <AntDescriptions
|
29
|
-
// className={dataId}
|
30
|
-
// data-dnd={dataDnd}
|
31
|
-
// data-id={dataId}
|
32
|
-
// style={style}
|
33
|
-
// {...rest}
|
34
|
-
// >
|
35
|
-
// {items.map((item: { label:string; value: string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal; }) => (
|
36
|
-
// <AntDescriptions.Item label={item.label} key={item.label}>
|
37
|
-
// {item.value}
|
38
|
-
// </AntDescriptions.Item>
|
39
|
-
// ))}
|
40
|
-
// </AntDescriptions>
|
41
|
-
// );
|
42
|
-
// }
|
43
|
-
// export const Descriptions = defineComponent(AntDescriptions, {
|
44
|
-
// name: 'Descriptions',
|
45
|
-
// designerConfig: {
|
46
|
-
// render({ designerProps, originalProps }) {
|
47
|
-
// console.log("Descriptions: designerProps:", designerProps, "originalProps:", originalProps);
|
48
|
-
// return <DescriptionsDesigner {...designerProps} {...originalProps} />;
|
49
|
-
// },
|
50
|
-
// },
|
51
|
-
// });
|
52
5
|
const antd_1 = require("antd");
|
53
6
|
const react_1 = tslib_1.__importDefault(require("react"));
|
54
7
|
const slottype_1 = require("../helpers/slottype");
|
@@ -10,6 +10,8 @@ export * from './placeholder';
|
|
10
10
|
export * from './section';
|
11
11
|
export { Select } from './select';
|
12
12
|
export { Space } from './space';
|
13
|
+
export { Popconfirm } from './popconfirm';
|
14
|
+
export { Popover } from './popover';
|
13
15
|
export { Result } from './result2';
|
14
16
|
export { Drawer } from "./drawer";
|
15
17
|
export { DatePicker } from "./date-picker";
|
@@ -45,3 +47,5 @@ export { Descriptions } from './descriptions';
|
|
45
47
|
export { Tree } from './tree';
|
46
48
|
export { Alert } from "./alert";
|
47
49
|
export { Progress } from './progress';
|
50
|
+
export { BackTop } from './backTop';
|
51
|
+
export { AntdIcon } from './icon';
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.Alert = exports.Tree = exports.Descriptions = 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.Collapse = exports.Cascader = exports.CheckboxGroup = exports.Checkbox = exports.RadioGroup = exports.Radio = exports.DatePicker = exports.Drawer = exports.Result = exports.Popover = exports.Popconfirm = exports.Space = exports.Select = exports.Password = exports.TextArea = exports.Input = exports.InputNumber = exports.ButtonGroup = exports.Button = exports.Box = exports.When = exports.Each = void 0;
|
4
|
+
exports.AntdIcon = exports.BackTop = exports.Progress = void 0;
|
4
5
|
const tslib_1 = require("tslib");
|
5
6
|
tslib_1.__exportStar(require("antd"), exports);
|
6
7
|
//以下组件都从antd中导出,解决下述组件卡顿问题
|
@@ -32,8 +33,10 @@ var space_1 = require("./space");
|
|
32
33
|
Object.defineProperty(exports, "Space", { enumerable: true, get: function () { return space_1.Space; } });
|
33
34
|
//export { Typography, Title, Paragraph,Text } from './typography';
|
34
35
|
//export { Columns, Column } from './columns';
|
35
|
-
|
36
|
-
|
36
|
+
var popconfirm_1 = require("./popconfirm");
|
37
|
+
Object.defineProperty(exports, "Popconfirm", { enumerable: true, get: function () { return popconfirm_1.Popconfirm; } });
|
38
|
+
var popover_1 = require("./popover");
|
39
|
+
Object.defineProperty(exports, "Popover", { enumerable: true, get: function () { return popover_1.Popover; } });
|
37
40
|
//export {Tooltip} from './tooltip';
|
38
41
|
//export {Result} from './result';
|
39
42
|
//export {Result} from './result1';
|
@@ -127,6 +130,10 @@ var alert_1 = require("./alert");
|
|
127
130
|
Object.defineProperty(exports, "Alert", { enumerable: true, get: function () { return alert_1.Alert; } });
|
128
131
|
var progress_1 = require("./progress");
|
129
132
|
Object.defineProperty(exports, "Progress", { enumerable: true, get: function () { return progress_1.Progress; } });
|
133
|
+
var backTop_1 = require("./backTop");
|
134
|
+
Object.defineProperty(exports, "BackTop", { enumerable: true, get: function () { return backTop_1.BackTop; } });
|
135
|
+
var icon_1 = require("./icon");
|
136
|
+
Object.defineProperty(exports, "AntdIcon", { enumerable: true, get: function () { return icon_1.AntdIcon; } });
|
130
137
|
//export {Affix} from './affix';
|
131
138
|
//import * as echarts from 'echarts';
|
132
139
|
//export {LineChart} from './LineChart';
|
@@ -1,3 +1,6 @@
|
|
1
1
|
import { PopconfirmProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
export declare const Popconfirm:
|
3
|
+
export declare const Popconfirm: ({ [SLOT.id]: dataId, [SLOT.dnd]: dataDnd, style, ...rest }: PopconfirmProps & {
|
4
|
+
[key: string]: any;
|
5
|
+
children?: React.ReactNode;
|
6
|
+
}) => React.JSX.Element;
|
@@ -1,41 +1,77 @@
|
|
1
1
|
"use strict";
|
2
|
+
// import { Popconfirm as AntPopconfirm, PopconfirmProps } from 'antd';
|
3
|
+
// //import { CloseOutlined } from '@ant-design/icons';
|
4
|
+
// import CloseOutlined from '@ant-design/icons/CloseOutlined';
|
5
|
+
// import { defineComponent } from '@music163/tango-boot';
|
6
|
+
// import { Button } from './button';
|
7
|
+
// import React, { useEffect, useRef } from 'react';
|
8
|
+
// import { ShadowContainer } from './shadow-container';
|
9
|
+
// import { SLOT } from '@music163/tango-helpers';
|
10
|
+
// function PopconfirmDesigner({
|
11
|
+
// children,
|
12
|
+
// title,
|
13
|
+
// [SLOT.dnd]:dataDnd,
|
14
|
+
// [SLOT.id]:dataId,
|
15
|
+
// style,
|
16
|
+
// ...rest
|
17
|
+
// }: PopconfirmProps& { [key: string]: any, // 添加索引签名
|
18
|
+
// dnd?: string, children?: React.ReactNode }) {
|
19
|
+
// const popconfirmRef = useRef<HTMLDivElement>(null);
|
2
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
21
|
exports.Popconfirm = void 0;
|
4
22
|
const tslib_1 = require("tslib");
|
23
|
+
// // 监听弹层显示事件
|
24
|
+
// const handleVisibleChange = (visible: boolean) => {
|
25
|
+
// console.log('handleVisibleChange', visible);
|
26
|
+
// if (visible) {
|
27
|
+
// // 使用微任务确保弹层已渲染
|
28
|
+
// Promise.resolve().then(() => {
|
29
|
+
// const popoverNode = document.querySelector(`#${dataId}`);
|
30
|
+
// console.log('popoverNode' ,popoverNode)
|
31
|
+
// if (popoverNode) {
|
32
|
+
// popoverNode.setAttribute('data-dnd', dataDnd);
|
33
|
+
// popoverNode.setAttribute('data-id', dataId);
|
34
|
+
// popoverNode.setAttribute('draggable', 'true');
|
35
|
+
// }
|
36
|
+
// });
|
37
|
+
// }
|
38
|
+
// };
|
39
|
+
// return (
|
40
|
+
// <div ref={popconfirmRef}>
|
41
|
+
// <AntPopconfirm
|
42
|
+
// id={dataId}
|
43
|
+
// className={dataId}
|
44
|
+
// title={title}
|
45
|
+
// onOpenChange={handleVisibleChange}
|
46
|
+
// {...rest}
|
47
|
+
// >
|
48
|
+
// {children}
|
49
|
+
// </AntPopconfirm>
|
50
|
+
// </div>
|
51
|
+
// );
|
52
|
+
// }
|
53
|
+
// export const Popconfirm = defineComponent(AntPopconfirm, {
|
54
|
+
// name: 'Popconfirm',
|
55
|
+
// designerConfig: {
|
56
|
+
// render({ designerProps, originalProps }) {
|
57
|
+
// console.log("Popconfirm: designerProps:",designerProps,"originalProps:",originalProps)
|
58
|
+
// return <PopconfirmDesigner title="Are you sure?" {...designerProps} {...originalProps} />;
|
59
|
+
// },
|
60
|
+
// },
|
61
|
+
// // designerConfig: {
|
62
|
+
// // },
|
63
|
+
// });
|
5
64
|
const antd_1 = require("antd");
|
6
|
-
const
|
7
|
-
const
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
//
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
console.log('popoverNode', popoverNode);
|
20
|
-
if (popoverNode) {
|
21
|
-
popoverNode.setAttribute('data-dnd', dataDnd);
|
22
|
-
popoverNode.setAttribute('data-id', dataId);
|
23
|
-
popoverNode.setAttribute('draggable', 'true');
|
24
|
-
}
|
25
|
-
});
|
26
|
-
}
|
27
|
-
};
|
28
|
-
return (react_1.default.createElement("div", { ref: popconfirmRef },
|
29
|
-
react_1.default.createElement(antd_1.Popconfirm, Object.assign({ id: dataId, className: dataId, title: title, onOpenChange: handleVisibleChange }, rest), children)));
|
30
|
-
}
|
31
|
-
exports.Popconfirm = (0, tango_boot_1.defineComponent)(antd_1.Popconfirm, {
|
32
|
-
name: 'Popconfirm',
|
33
|
-
designerConfig: {
|
34
|
-
render({ designerProps, originalProps }) {
|
35
|
-
console.log("Popconfirm: designerProps:", designerProps, "originalProps:", originalProps);
|
36
|
-
return react_1.default.createElement(PopconfirmDesigner, Object.assign({ title: "Are you sure?" }, designerProps, originalProps));
|
37
|
-
},
|
38
|
-
},
|
39
|
-
// designerConfig: {
|
40
|
-
// },
|
41
|
-
});
|
65
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
66
|
+
const slottype_1 = require("../helpers/slottype");
|
67
|
+
const Popconfirm = (_a) => {
|
68
|
+
var
|
69
|
+
//items,
|
70
|
+
_b = slottype_1.SLOT.id,
|
71
|
+
//items,
|
72
|
+
dataId = _a[_b], _c = slottype_1.SLOT.dnd, dataDnd = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
73
|
+
//console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
|
74
|
+
return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
|
75
|
+
react_1.default.createElement(antd_1.Popconfirm, Object.assign({ title: '确认吗' }, rest), rest.children)));
|
76
|
+
};
|
77
|
+
exports.Popconfirm = Popconfirm;
|
@@ -1,3 +1,6 @@
|
|
1
1
|
import { PopoverProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
export declare const Popover:
|
3
|
+
export declare const Popover: ({ [SLOT.id]: dataId, [SLOT.dnd]: dataDnd, style, ...rest }: PopoverProps & {
|
4
|
+
[key: string]: any;
|
5
|
+
children?: React.ReactNode;
|
6
|
+
}) => React.JSX.Element;
|
@@ -3,39 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Popover = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const antd_1 = require("antd");
|
6
|
-
const
|
7
|
-
const
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
//
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
console.log('popoverNode', popoverNode);
|
20
|
-
if (popoverNode) {
|
21
|
-
popoverNode.setAttribute('data-dnd', dataDnd);
|
22
|
-
popoverNode.setAttribute('data-id', dataId);
|
23
|
-
popoverNode.setAttribute('draggable', 'true');
|
24
|
-
}
|
25
|
-
});
|
26
|
-
}
|
27
|
-
};
|
28
|
-
return (react_1.default.createElement("div", { ref: popoverRef },
|
29
|
-
react_1.default.createElement(antd_1.Popover, Object.assign({ id: dataId, title: title, onOpenChange: handleVisibleChange }, rest), children)));
|
30
|
-
}
|
31
|
-
exports.Popover = (0, tango_boot_1.defineComponent)(antd_1.Popover, {
|
32
|
-
name: 'Popover',
|
33
|
-
designerConfig: {
|
34
|
-
render({ designerProps, originalProps }) {
|
35
|
-
console.log("Popover: designerProps:", designerProps, "originalProps:", originalProps);
|
36
|
-
return react_1.default.createElement(PopoverDesigner, Object.assign({ title: "Are you sure?" }, designerProps, originalProps));
|
37
|
-
},
|
38
|
-
},
|
39
|
-
// designerConfig: {
|
40
|
-
// },
|
41
|
-
});
|
6
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
7
|
+
const slottype_1 = require("../helpers/slottype");
|
8
|
+
const Popover = (_a) => {
|
9
|
+
var
|
10
|
+
//items,
|
11
|
+
_b = slottype_1.SLOT.id,
|
12
|
+
//items,
|
13
|
+
dataId = _a[_b], _c = slottype_1.SLOT.dnd, dataDnd = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
14
|
+
//console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
|
15
|
+
return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
|
16
|
+
react_1.default.createElement(antd_1.Popover, Object.assign({ title: '标题' }, rest), rest.children)));
|
17
|
+
};
|
18
|
+
exports.Popover = Popover;
|
@@ -6,65 +6,11 @@ const tango_boot_1 = require("@music163/tango-boot");
|
|
6
6
|
const tango_helpers_1 = require("@music163/tango-helpers");
|
7
7
|
const antd_1 = require("antd");
|
8
8
|
const react_1 = tslib_1.__importDefault(require("react"));
|
9
|
-
// function RadioDesigner({
|
10
|
-
// children,
|
11
|
-
// style,
|
12
|
-
// [SLOT.dnd]: dataDnd,
|
13
|
-
// [SLOT.id]: dataId,
|
14
|
-
// ...rest
|
15
|
-
// }: RadioProps & {
|
16
|
-
// [key: string]: any, // 添加索引签名
|
17
|
-
// dnd?: string, children?: React.ReactNode
|
18
|
-
// }) {
|
19
|
-
// // const radioRef = useRef<HTMLDivElement>(null);
|
20
|
-
// useEffect(() => {
|
21
|
-
// Promise.resolve().then(() => {
|
22
|
-
// const popoverNode = document.querySelector(`.${dataId}`);
|
23
|
-
// console.log('popoverNode', popoverNode);
|
24
|
-
// if (popoverNode) {
|
25
|
-
// popoverNode.setAttribute('data-dnd', dataDnd);
|
26
|
-
// popoverNode.setAttribute('data-id', dataId);
|
27
|
-
// popoverNode.setAttribute('draggable', 'true');
|
28
|
-
// }
|
29
|
-
// });
|
30
|
-
// }, [dataDnd, dataId]);
|
31
|
-
// // const { optionType } = rest;
|
32
|
-
// // if (optionType === 'button') {
|
33
|
-
// // return (
|
34
|
-
// // <div ref={radioRef} className='.ant-radio'>
|
35
|
-
// // <AntRadio.Button {...rest} style={style} >{rest.label}</AntRadio.Button>
|
36
|
-
// // </div>
|
37
|
-
// // );
|
38
|
-
// // }
|
39
|
-
// return (
|
40
|
-
// <AntRadio
|
41
|
-
// {...rest}
|
42
|
-
// style={style}
|
43
|
-
// className={dataId}
|
44
|
-
// data-dnd={dataDnd}
|
45
|
-
// data-id={dataId}
|
46
|
-
// >
|
47
|
-
// {children}
|
48
|
-
// </AntRadio>
|
49
|
-
// );
|
50
|
-
// }
|
51
|
-
// export const Radio = defineComponent(AntRadio, {
|
52
|
-
// name: 'Radio',
|
53
|
-
// designerConfig: {
|
54
|
-
// render({ designerProps, originalProps, }) {
|
55
|
-
// console.log("designerProps:", designerProps, "originalProps:", originalProps)
|
56
|
-
// return <RadioDesigner {...designerProps} {...originalProps} />;
|
57
|
-
// },
|
58
|
-
// },
|
59
|
-
// });
|
60
|
-
// export const Radio = defineComponent(AntRadio, {
|
61
|
-
// name: 'Radio',
|
62
|
-
// });
|
63
9
|
const Radio = (_a) => {
|
64
|
-
|
65
|
-
console.log("新的单选组件", dataId, dataDnd, rest);
|
10
|
+
//console.log("新的单选组件",dataId,dataDnd,rest);
|
66
11
|
//const newProps = {...rest, ...{draggable:true}}
|
67
12
|
//console.log("新的表格组件01",newProps);
|
13
|
+
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 + ""]);
|
68
14
|
return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": dataId, draggable: true },
|
69
15
|
react_1.default.createElement(antd_1.Radio, Object.assign({}, rest))));
|
70
16
|
};
|
@@ -1,2 +1,6 @@
|
|
1
|
+
import { TooltipProps } from 'antd';
|
1
2
|
import React from 'react';
|
2
|
-
export declare const Tooltip:
|
3
|
+
export declare const Tooltip: ({ [SLOT.id]: dataId, [SLOT.dnd]: dataDnd, style, ...rest }: TooltipProps & {
|
4
|
+
[key: string]: any;
|
5
|
+
children?: React.ReactNode;
|
6
|
+
}) => React.JSX.Element;
|