@cuvp1225/antd 0.1.19-beta.14 → 0.1.19-beta.3
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 +7 -62
- package/dist/index.js +7 -62
- package/lib/cjs/components/anchor.d.ts +1 -4
- package/lib/cjs/components/anchor.js +43 -13
- package/lib/cjs/components/carousel.d.ts +1 -4
- package/lib/cjs/components/carousel.js +27 -55
- package/lib/cjs/components/collapse.d.ts +2 -15
- package/lib/cjs/components/collapse.js +29 -68
- package/lib/cjs/components/comment.js +3 -1
- package/lib/cjs/components/descriptions.d.ts +5 -1
- package/lib/cjs/components/descriptions.js +58 -15
- package/lib/cjs/components/index.d.ts +0 -4
- package/lib/cjs/components/index.js +4 -11
- package/lib/cjs/components/popconfirm.d.ts +1 -4
- package/lib/cjs/components/popconfirm.js +36 -72
- package/lib/cjs/components/popover.d.ts +1 -4
- package/lib/cjs/components/popover.js +36 -13
- package/lib/cjs/components/radio.js +56 -2
- package/lib/cjs/components/result2.d.ts +2 -4
- package/lib/cjs/components/result2.js +4 -19
- package/lib/cjs/components/tooltip.d.ts +1 -5
- package/lib/cjs/components/tooltip.js +36 -13
- package/lib/cjs/components/upload.d.ts +1 -4
- package/lib/cjs/components/upload.js +45 -13
- package/lib/cjs/prototypes/collapse.js +13 -27
- package/lib/esm/components/anchor.d.ts +1 -4
- package/lib/esm/components/anchor.js +42 -11
- package/lib/esm/components/carousel.d.ts +1 -4
- package/lib/esm/components/carousel.js +27 -54
- package/lib/esm/components/collapse.d.ts +2 -15
- package/lib/esm/components/collapse.js +28 -65
- package/lib/esm/components/comment.js +3 -1
- package/lib/esm/components/descriptions.d.ts +5 -1
- package/lib/esm/components/descriptions.js +56 -14
- package/lib/esm/components/index.d.ts +0 -4
- package/lib/esm/components/index.js +3 -5
- package/lib/esm/components/popconfirm.d.ts +1 -4
- package/lib/esm/components/popconfirm.js +36 -71
- package/lib/esm/components/popover.d.ts +1 -4
- package/lib/esm/components/popover.js +36 -12
- package/lib/esm/components/radio.js +56 -2
- package/lib/esm/components/result2.d.ts +2 -4
- package/lib/esm/components/result2.js +4 -19
- package/lib/esm/components/tooltip.d.ts +1 -5
- package/lib/esm/components/tooltip.js +36 -12
- package/lib/esm/components/upload.d.ts +1 -4
- package/lib/esm/components/upload.js +45 -12
- package/lib/esm/prototypes/collapse.js +14 -28
- package/package.json +2 -2
- package/lib/cjs/components/backTop.d.ts +0 -6
- package/lib/cjs/components/backTop.js +0 -17
- package/lib/cjs/helpers/slottype.d.ts +0 -10
- package/lib/cjs/helpers/slottype.js +0 -13
- package/lib/esm/components/backTop.d.ts +0 -6
- package/lib/esm/components/backTop.js +0 -13
- package/lib/esm/helpers/slottype.d.ts +0 -10
- package/lib/esm/helpers/slottype.js +0 -10
@@ -1,6 +1,3 @@
|
|
1
1
|
import { AnchorProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
export declare const
|
4
|
-
[key: string]: any;
|
5
|
-
children?: React.ReactNode;
|
6
|
-
}) => React.JSX.Element;
|
3
|
+
export declare const Anchor: React.ForwardRefExoticComponent<AnchorProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
|
@@ -1,17 +1,47 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.Anchor = 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
|
-
_b =
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
6
|
+
const tango_boot_1 = require("@music163/tango-boot");
|
7
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
8
|
+
const tango_helpers_1 = require("@music163/tango-helpers");
|
9
|
+
const { Link } = antd_1.Anchor;
|
10
|
+
function AnchorDesigner(_a) {
|
11
|
+
var { items } = _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, ["items", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
12
|
+
const anchorRef = (0, react_1.useRef)(null);
|
13
|
+
(0, react_1.useEffect)(() => {
|
14
|
+
Promise.resolve().then(() => {
|
15
|
+
const popoverNode = document.querySelector(`.${dataId}`);
|
16
|
+
console.log('spinNode', popoverNode);
|
17
|
+
if (popoverNode) {
|
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
|
+
});
|
@@ -1,6 +1,3 @@
|
|
1
1
|
import { CarouselProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
export declare const Carousel:
|
4
|
-
[key: string]: any;
|
5
|
-
children?: React.ReactNode;
|
6
|
-
}) => React.JSX.Element;
|
3
|
+
export declare const Carousel: React.ForwardRefExoticComponent<Omit<CarouselProps & React.RefAttributes<import("antd/lib/carousel").CarouselRef> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|
@@ -1,60 +1,32 @@
|
|
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';
|
6
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
7
3
|
exports.Carousel = void 0;
|
8
4
|
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
|
-
// });
|
48
5
|
const antd_1 = require("antd");
|
49
|
-
const
|
50
|
-
const
|
51
|
-
const
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
6
|
+
const tango_boot_1 = require("@music163/tango-boot");
|
7
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
8
|
+
const tango_helpers_1 = require("@music163/tango-helpers");
|
9
|
+
function CarouselDesigner(_a) {
|
10
|
+
var { children } = _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", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
11
|
+
(0, react_1.useEffect)(() => {
|
12
|
+
Promise.resolve().then(() => {
|
13
|
+
const popoverNode = document.querySelector(`.${dataId}`);
|
14
|
+
console.log('spinNode', popoverNode);
|
15
|
+
if (popoverNode) {
|
16
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
17
|
+
popoverNode.setAttribute('data-id', dataId);
|
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
|
+
});
|
@@ -1,16 +1,3 @@
|
|
1
|
-
import { CollapseProps
|
1
|
+
import { CollapseProps } from 'antd';
|
2
2
|
import React from 'react';
|
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 & {
|
14
|
-
[key: string]: any;
|
15
|
-
children?: React.ReactNode;
|
16
|
-
}) => React.JSX.Element;
|
3
|
+
export declare const Collapse: React.ForwardRefExoticComponent<CollapseProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
|
@@ -1,74 +1,35 @@
|
|
1
1
|
"use strict";
|
2
|
-
// import { defineComponent } from '@music163/tango-boot';
|
3
|
-
// import { Collapse as AntCollapse, CollapseProps} from 'antd';
|
4
|
-
// import React, { useEffect} from 'react';
|
5
|
-
// import { SLOT } from '@music163/tango-helpers';
|
6
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
7
|
-
exports.
|
3
|
+
exports.Collapse = void 0;
|
8
4
|
const tslib_1 = require("tslib");
|
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
|
-
// export const Collapse = defineComponent(AntCollapse, {
|
40
|
-
// name: 'Collapse',
|
41
|
-
// designerConfig: {
|
42
|
-
// render({ designerProps, originalProps }) {
|
43
|
-
// console.log("Collapse: designerProps:", designerProps, "originalProps:", originalProps);
|
44
|
-
// return <CollapseDesigner {...designerProps} {...originalProps} />;
|
45
|
-
// },
|
46
|
-
// },
|
47
|
-
// });
|
5
|
+
const tango_boot_1 = require("@music163/tango-boot");
|
6
|
+
const antd_1 = require("antd");
|
7
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
8
|
+
const tango_helpers_1 = require("@music163/tango-helpers");
|
9
|
+
function CollapseDesigner(_a) {
|
10
|
+
var { children } = _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", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
11
|
+
(0, react_1.useEffect)(() => {
|
12
|
+
Promise.resolve().then(() => {
|
13
|
+
const popoverNode = document.querySelector(`.${dataId}`);
|
14
|
+
console.log('spinNode', popoverNode);
|
15
|
+
if (popoverNode) {
|
16
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
17
|
+
popoverNode.setAttribute('data-id', dataId);
|
18
|
+
popoverNode.setAttribute('draggable', 'true');
|
19
|
+
}
|
20
|
+
});
|
21
|
+
}, [dataDnd, dataId]);
|
22
|
+
return (react_1.default.createElement(antd_1.Collapse, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children));
|
23
|
+
}
|
24
|
+
exports.Collapse = (0, tango_boot_1.defineComponent)(antd_1.Collapse, {
|
25
|
+
name: 'Collapse',
|
26
|
+
designerConfig: {
|
27
|
+
render({ designerProps, originalProps }) {
|
28
|
+
console.log("Collapse: designerProps:", designerProps, "originalProps:", originalProps);
|
29
|
+
return react_1.default.createElement(CollapseDesigner, Object.assign({}, designerProps, originalProps));
|
30
|
+
},
|
31
|
+
},
|
32
|
+
});
|
48
33
|
// export const CollapsePanel = defineComponent(AntCollapse.Panel, {
|
49
34
|
// name: 'CollapsePanel',
|
50
35
|
// });
|
51
|
-
const antd_1 = require("antd");
|
52
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
53
|
-
const slottype_1 = require("../helpers/slottype");
|
54
|
-
const Collapse = (_a) => {
|
55
|
-
var
|
56
|
-
//items,
|
57
|
-
_b = slottype_1.SLOT.id,
|
58
|
-
//items,
|
59
|
-
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"]);
|
60
|
-
//console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
|
61
|
-
return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
|
62
|
-
react_1.default.createElement(antd_1.Collapse, Object.assign({}, rest), rest.children)));
|
63
|
-
};
|
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;
|
@@ -6,6 +6,7 @@ const antd_1 = require("antd");
|
|
6
6
|
const tango_boot_1 = require("@music163/tango-boot");
|
7
7
|
const react_1 = tslib_1.__importStar(require("react"));
|
8
8
|
const tango_helpers_1 = require("@music163/tango-helpers");
|
9
|
+
const placeholder_1 = require("./placeholder");
|
9
10
|
function CommentDesigner(_a) {
|
10
11
|
var { children, content } = _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", "content", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
11
12
|
const commentRef = (0, react_1.useRef)(null);
|
@@ -28,7 +29,8 @@ exports.Comment = (0, tango_boot_1.defineComponent)(antd_1.Comment, {
|
|
28
29
|
designerConfig: {
|
29
30
|
render({ designerProps, originalProps }) {
|
30
31
|
// console.log("Comment: designerProps:", designerProps, "originalProps:", originalProps);
|
31
|
-
return react_1.default.createElement(CommentDesigner, Object.assign({ content: react_1.default.createElement("div", null
|
32
|
+
return react_1.default.createElement(CommentDesigner, Object.assign({ content: react_1.default.createElement("div", null,
|
33
|
+
react_1.default.createElement(placeholder_1.Placeholder, { placeholder: "\u653E\u7F6E\u66FF\u6362" })) }, designerProps, originalProps));
|
32
34
|
}
|
33
35
|
}
|
34
36
|
});
|
@@ -1,6 +1,10 @@
|
|
1
1
|
import { DescriptionsProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
export declare const Descriptions: ({ [SLOT.id]: dataId, [SLOT.dnd]: dataDnd,
|
3
|
+
export declare const Descriptions: ({ items, [SLOT.id]: dataId, [SLOT.dnd]: dataDnd, ...rest }: DescriptionsProps & {
|
4
|
+
[key: string]: any;
|
5
|
+
children?: React.ReactNode;
|
6
|
+
}) => React.JSX.Element;
|
7
|
+
export declare const DescriptionsItem: ({ ...rest }: DescriptionsProps & {
|
4
8
|
[key: string]: any;
|
5
9
|
children?: React.ReactNode;
|
6
10
|
}) => React.JSX.Element;
|
@@ -1,23 +1,66 @@
|
|
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';
|
2
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Descriptions = void 0;
|
7
|
+
exports.DescriptionsItem = exports.Descriptions = void 0;
|
4
8
|
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
|
+
// });
|
5
52
|
const antd_1 = require("antd");
|
6
53
|
const react_1 = tslib_1.__importDefault(require("react"));
|
7
|
-
const
|
54
|
+
const tango_helpers_1 = require("@music163/tango-helpers");
|
8
55
|
const Descriptions = (_a) => {
|
9
|
-
var
|
10
|
-
|
11
|
-
|
12
|
-
|
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.Descriptions, Object.assign({}, rest), rest.children)));
|
56
|
+
var { items } = _a, _b = tango_helpers_1.SLOT.id, dataId = _a[_b], _c = tango_helpers_1.SLOT.dnd, dataDnd = _a[_c], rest = tslib_1.__rest(_a, ["items", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + ""]);
|
57
|
+
console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
|
58
|
+
return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": dataId, draggable: true },
|
59
|
+
react_1.default.createElement(antd_1.Descriptions, Object.assign({}, rest), items)));
|
17
60
|
};
|
18
61
|
exports.Descriptions = Descriptions;
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
62
|
+
const DescriptionsItem = (_a) => {
|
63
|
+
var rest = tslib_1.__rest(_a, []);
|
64
|
+
return react_1.default.createElement(antd_1.Descriptions.Item, Object.assign({}, rest), " ");
|
65
|
+
};
|
66
|
+
exports.DescriptionsItem = DescriptionsItem;
|
@@ -10,9 +10,6 @@ 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';
|
15
|
-
export { Result } from './result2';
|
16
13
|
export { Drawer } from "./drawer";
|
17
14
|
export { DatePicker } from "./date-picker";
|
18
15
|
export { Radio, RadioGroup } from "./radio";
|
@@ -47,4 +44,3 @@ export { Descriptions } from './descriptions';
|
|
47
44
|
export { Tree } from './tree';
|
48
45
|
export { Alert } from "./alert";
|
49
46
|
export { Progress } from './progress';
|
50
|
-
export { BackTop } from './backTop';
|
@@ -1,7 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
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.
|
4
|
-
exports.BackTop = exports.Progress = void 0;
|
3
|
+
exports.Progress = 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.Space = exports.Select = exports.Password = exports.TextArea = exports.Input = exports.InputNumber = exports.ButtonGroup = exports.Button = exports.Box = exports.When = exports.Each = void 0;
|
5
4
|
const tslib_1 = require("tslib");
|
6
5
|
tslib_1.__exportStar(require("antd"), exports);
|
7
6
|
//以下组件都从antd中导出,解决下述组件卡顿问题
|
@@ -33,15 +32,12 @@ var space_1 = require("./space");
|
|
33
32
|
Object.defineProperty(exports, "Space", { enumerable: true, get: function () { return space_1.Space; } });
|
34
33
|
//export { Typography, Title, Paragraph,Text } from './typography';
|
35
34
|
//export { Columns, Column } from './columns';
|
36
|
-
|
37
|
-
|
38
|
-
var popover_1 = require("./popover");
|
39
|
-
Object.defineProperty(exports, "Popover", { enumerable: true, get: function () { return popover_1.Popover; } });
|
35
|
+
//export { Popconfirm } from './popconfirm';
|
36
|
+
//export {Popover} from './popover';
|
40
37
|
//export {Tooltip} from './tooltip';
|
41
38
|
//export {Result} from './result';
|
42
39
|
//export {Result} from './result1';
|
43
|
-
|
44
|
-
Object.defineProperty(exports, "Result", { enumerable: true, get: function () { return result2_1.Result; } });
|
40
|
+
//export {Result} from './result2';
|
45
41
|
//export {Result} from './result3';
|
46
42
|
var drawer_1 = require("./drawer");
|
47
43
|
Object.defineProperty(exports, "Drawer", { enumerable: true, get: function () { return drawer_1.Drawer; } });
|
@@ -130,9 +126,6 @@ var alert_1 = require("./alert");
|
|
130
126
|
Object.defineProperty(exports, "Alert", { enumerable: true, get: function () { return alert_1.Alert; } });
|
131
127
|
var progress_1 = require("./progress");
|
132
128
|
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
|
-
//export { AntdIcon } from './icon'
|
136
129
|
//export {Affix} from './affix';
|
137
130
|
//import * as echarts from 'echarts';
|
138
131
|
//export {LineChart} from './LineChart';
|
@@ -1,6 +1,3 @@
|
|
1
1
|
import { PopconfirmProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
export declare const Popconfirm:
|
4
|
-
[key: string]: any;
|
5
|
-
children?: React.ReactNode;
|
6
|
-
}) => React.JSX.Element;
|
3
|
+
export declare const Popconfirm: React.ForwardRefExoticComponent<Omit<PopconfirmProps & React.RefAttributes<unknown> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|
@@ -1,77 +1,41 @@
|
|
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);
|
20
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
21
3
|
exports.Popconfirm = void 0;
|
22
4
|
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
|
-
// });
|
64
5
|
const antd_1 = require("antd");
|
65
|
-
const
|
66
|
-
const
|
67
|
-
const
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
//
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
6
|
+
const tango_boot_1 = require("@music163/tango-boot");
|
7
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
8
|
+
const tango_helpers_1 = require("@music163/tango-helpers");
|
9
|
+
function PopconfirmDesigner(_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 popconfirmRef = (0, react_1.useRef)(null);
|
12
|
+
// 监听弹层显示事件
|
13
|
+
const handleVisibleChange = (visible) => {
|
14
|
+
console.log('handleVisibleChange', visible);
|
15
|
+
if (visible) {
|
16
|
+
// 使用微任务确保弹层已渲染
|
17
|
+
Promise.resolve().then(() => {
|
18
|
+
const popoverNode = document.querySelector(`#${dataId}`);
|
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
|
+
});
|
@@ -1,6 +1,3 @@
|
|
1
1
|
import { PopoverProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
export declare const Popover:
|
4
|
-
[key: string]: any;
|
5
|
-
children?: React.ReactNode;
|
6
|
-
}) => React.JSX.Element;
|
3
|
+
export declare const Popover: React.ForwardRefExoticComponent<Omit<PopoverProps & React.RefAttributes<unknown> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|