@cuvp1225/antd 0.1.19-beta.2 → 0.1.19-beta.21
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 +130 -9
- package/dist/index.js +130 -9
- package/lib/cjs/components/anchor.d.ts +15 -2
- package/lib/cjs/components/anchor.js +24 -43
- package/lib/cjs/components/backTop.d.ts +6 -0
- package/lib/cjs/components/backTop.js +17 -0
- package/lib/cjs/components/breadcrumb.d.ts +16 -2
- package/lib/cjs/components/breadcrumb.js +23 -7
- package/lib/cjs/components/carousel.d.ts +4 -1
- package/lib/cjs/components/carousel.js +56 -27
- package/lib/cjs/components/checkbox.d.ts +3 -2
- package/lib/cjs/components/checkbox.js +47 -26
- package/lib/cjs/components/collapse.d.ts +15 -2
- package/lib/cjs/components/collapse.js +68 -29
- package/lib/cjs/components/comment.js +1 -3
- package/lib/cjs/components/descriptions.d.ts +1 -5
- package/lib/cjs/components/descriptions.js +15 -58
- package/lib/cjs/components/dropdown.d.ts +6 -2
- package/lib/cjs/components/dropdown.js +23 -8
- package/lib/cjs/components/index.d.ts +11 -1
- package/lib/cjs/components/index.js +24 -11
- 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/result2.d.ts +4 -2
- package/lib/cjs/components/result2.js +19 -4
- package/lib/cjs/components/tooltip.d.ts +5 -1
- package/lib/cjs/components/tooltip.js +13 -36
- package/lib/cjs/components/upload.d.ts +4 -1
- package/lib/cjs/components/upload.js +13 -45
- package/lib/cjs/helpers/slottype.d.ts +10 -0
- package/lib/cjs/helpers/slottype.js +13 -0
- package/lib/cjs/prototypes/collapse.js +27 -13
- package/lib/esm/components/anchor.d.ts +15 -2
- package/lib/esm/components/anchor.js +21 -42
- package/lib/esm/components/backTop.d.ts +6 -0
- package/lib/esm/components/backTop.js +13 -0
- package/lib/esm/components/breadcrumb.d.ts +16 -2
- package/lib/esm/components/breadcrumb.js +21 -7
- package/lib/esm/components/carousel.d.ts +4 -1
- package/lib/esm/components/carousel.js +55 -27
- package/lib/esm/components/checkbox.d.ts +3 -2
- package/lib/esm/components/checkbox.js +46 -26
- package/lib/esm/components/collapse.d.ts +15 -2
- package/lib/esm/components/collapse.js +65 -28
- package/lib/esm/components/comment.js +1 -3
- package/lib/esm/components/descriptions.d.ts +1 -5
- package/lib/esm/components/descriptions.js +14 -56
- package/lib/esm/components/dropdown.d.ts +6 -2
- package/lib/esm/components/dropdown.js +21 -7
- package/lib/esm/components/index.d.ts +11 -1
- package/lib/esm/components/index.js +13 -10
- 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/result2.d.ts +4 -2
- package/lib/esm/components/result2.js +19 -4
- package/lib/esm/components/tooltip.d.ts +5 -1
- package/lib/esm/components/tooltip.js +12 -36
- package/lib/esm/components/upload.d.ts +4 -1
- package/lib/esm/components/upload.js +12 -45
- package/lib/esm/helpers/slottype.d.ts +10 -0
- package/lib/esm/helpers/slottype.js +10 -0
- package/lib/esm/prototypes/collapse.js +28 -14
- package/package.json +2 -2
@@ -1,3 +1,16 @@
|
|
1
|
-
import { AnchorProps } from 'antd';
|
1
|
+
import { AnchorProps, AnchorLinkProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
export declare const Anchor:
|
3
|
+
export declare const Anchor: {
|
4
|
+
({ [SLOT.id]: dataId, [SLOT.dnd]: dataDnd, style, ...rest }: AnchorProps & {
|
5
|
+
[key: string]: any;
|
6
|
+
children?: React.ReactNode;
|
7
|
+
}): React.JSX.Element;
|
8
|
+
Link: (props: AnchorLinkProps & {
|
9
|
+
[key: string]: any;
|
10
|
+
children?: React.ReactNode;
|
11
|
+
}) => React.JSX.Element;
|
12
|
+
};
|
13
|
+
export declare const AnchorLink: (props: AnchorLinkProps & {
|
14
|
+
[key: string]: any;
|
15
|
+
children?: React.ReactNode;
|
16
|
+
}) => React.JSX.Element;
|
@@ -1,47 +1,28 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Anchor = void 0;
|
3
|
+
exports.AnchorLink = 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
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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 Anchor = (_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("0515001-锚点",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.Anchor, Object.assign({}, rest), rest.children)));
|
17
|
+
};
|
18
|
+
exports.Anchor = Anchor;
|
19
|
+
const AnchorLink = (props) => {
|
20
|
+
//console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
|
21
|
+
return (
|
22
|
+
// <div data-dnd={dataDnd} data-id={rest.tid} draggable={true} style={style} >
|
23
|
+
react_1.default.createElement(antd_1.Anchor.Link, Object.assign({}, props))
|
24
|
+
// </div>
|
25
|
+
);
|
26
|
+
};
|
27
|
+
exports.AnchorLink = AnchorLink;
|
28
|
+
exports.Anchor.Link = exports.AnchorLink;
|
@@ -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,2 +1,16 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import { BreadcrumbProps, BreadcrumbItemProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
export declare const Breadcrumb: {
|
4
|
+
({ [SLOT.id]: dataId, [SLOT.dnd]: dataDnd, style, ...rest }: BreadcrumbProps & {
|
5
|
+
[key: string]: any;
|
6
|
+
children?: React.ReactNode;
|
7
|
+
}): React.JSX.Element;
|
8
|
+
Item: (props: BreadcrumbItemProps & {
|
9
|
+
[key: string]: any;
|
10
|
+
children?: React.ReactNode;
|
11
|
+
}) => React.JSX.Element;
|
12
|
+
};
|
13
|
+
export declare const BreadcrumbItem: (props: BreadcrumbItemProps & {
|
14
|
+
[key: string]: any;
|
15
|
+
children?: React.ReactNode;
|
16
|
+
}) => React.JSX.Element;
|
@@ -1,11 +1,27 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.BreadcrumbItem = exports.Breadcrumb = void 0;
|
4
|
-
const
|
4
|
+
const tslib_1 = require("tslib");
|
5
5
|
const antd_1 = require("antd");
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
7
|
+
const slottype_1 = require("../helpers/slottype");
|
8
|
+
const Breadcrumb = (_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.Breadcrumb, Object.assign({}, rest), rest.children)));
|
16
|
+
};
|
17
|
+
exports.Breadcrumb = Breadcrumb;
|
18
|
+
const BreadcrumbItem = (props) => {
|
19
|
+
//console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
|
20
|
+
return (
|
21
|
+
// <div data-dnd={dataDnd} data-id={rest.tid} draggable={true} style={style} >
|
22
|
+
react_1.default.createElement(antd_1.Breadcrumb.Item, Object.assign({}, props))
|
23
|
+
// </div>
|
24
|
+
);
|
25
|
+
};
|
26
|
+
exports.BreadcrumbItem = BreadcrumbItem;
|
27
|
+
exports.Breadcrumb.Item = exports.BreadcrumbItem;
|
@@ -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,61 @@
|
|
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
|
-
|
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
|
+
//console.log("0515001-走马灯",dataId,dataDnd,rest)
|
58
|
+
return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
|
59
|
+
react_1.default.createElement(antd_1.Carousel, Object.assign({}, rest), rest.children)));
|
60
|
+
};
|
61
|
+
exports.Carousel = Carousel;
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { CheckboxProps } from 'antd';
|
2
1
|
import React from 'react';
|
3
|
-
export declare const Checkbox:
|
2
|
+
export declare const Checkbox: ({ [SLOT.id]: dataId, [SLOT.dnd]: dataDnd, ...rest }: {
|
3
|
+
[x: string]: any;
|
4
|
+
}) => React.JSX.Element;
|
4
5
|
export declare const CheckboxGroup: React.ForwardRefExoticComponent<Omit<Omit<import("antd/lib/checkbox").CheckboxGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
5
6
|
ref?: React.Ref<HTMLDivElement>;
|
6
7
|
} & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|
@@ -5,32 +5,53 @@ const tslib_1 = require("tslib");
|
|
5
5
|
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
|
-
const react_1 = tslib_1.
|
9
|
-
function CheckboxDesigner(
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
}
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
}
|
8
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
9
|
+
// function CheckboxDesigner({
|
10
|
+
// style,
|
11
|
+
// [SLOT.dnd]: dataDnd,
|
12
|
+
// [SLOT.id]: dataId,
|
13
|
+
// ...rest
|
14
|
+
// }: CheckboxProps & { [key: string]: any; dnd?: string; label: string }) {
|
15
|
+
// const checkBoxRef = useRef<HTMLDivElement>(null);
|
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
|
+
// <div ref={checkBoxRef}>
|
29
|
+
// <AntCheckbox {...rest}
|
30
|
+
// style={style}
|
31
|
+
// className={dataId}
|
32
|
+
// data-dnd={dataDnd}
|
33
|
+
// data-id={dataId}
|
34
|
+
// >{rest.label}</AntCheckbox>
|
35
|
+
// </div>
|
36
|
+
// );
|
37
|
+
// }
|
38
|
+
// export const Checkbox = defineComponent(AntCheckbox, {
|
39
|
+
// name: 'Checkbox',
|
40
|
+
// designerConfig: {
|
41
|
+
// render({ designerProps, originalProps, }) {
|
42
|
+
// return <CheckboxDesigner label={'多选项1'} {...designerProps} {...originalProps} />;
|
43
|
+
// },
|
44
|
+
// },
|
45
|
+
// });
|
46
|
+
const Checkbox = (_a) => {
|
47
|
+
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 + ""]);
|
48
|
+
console.log("新的多选组件", dataId, dataDnd, rest);
|
49
|
+
//const newProps = {...rest, ...{draggable:true}}
|
50
|
+
//console.log("新的表格组件01",newProps);
|
51
|
+
return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": dataId, draggable: true },
|
52
|
+
react_1.default.createElement(antd_1.Checkbox, Object.assign({}, rest))));
|
53
|
+
};
|
54
|
+
exports.Checkbox = Checkbox;
|
34
55
|
exports.CheckboxGroup = (0, tango_boot_1.defineComponent)(antd_1.Checkbox.Group, {
|
35
56
|
name: 'CheckboxGroup',
|
36
57
|
});
|
@@ -1,3 +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 & {
|
14
|
+
[key: string]: any;
|
15
|
+
children?: React.ReactNode;
|
16
|
+
}) => React.JSX.Element;
|
@@ -1,35 +1,74 @@
|
|
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';
|
2
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Collapse = void 0;
|
7
|
+
exports.CollapsePanel = exports.Collapse = void 0;
|
4
8
|
const tslib_1 = require("tslib");
|
5
|
-
|
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
|
-
|
9
|
+
// function CollapseDesigner({
|
10
|
+
// children,
|
11
|
+
// [SLOT.dnd]: dataDnd,
|
12
|
+
// [SLOT.id]: dataId,
|
13
|
+
// style,
|
14
|
+
// ...rest
|
15
|
+
// }: CollapseProps & { [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
|
+
// <AntCollapse
|
29
|
+
// className={dataId}
|
30
|
+
// data-dnd={dataDnd}
|
31
|
+
// data-id={dataId}
|
32
|
+
// style={style}
|
33
|
+
// {...rest}
|
34
|
+
// >
|
35
|
+
// {children}
|
36
|
+
// </AntCollapse>
|
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
|
+
// });
|
33
48
|
// export const CollapsePanel = defineComponent(AntCollapse.Panel, {
|
34
49
|
// name: 'CollapsePanel',
|
35
50
|
// });
|
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,7 +6,6 @@ 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");
|
10
9
|
function CommentDesigner(_a) {
|
11
10
|
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"]);
|
12
11
|
const commentRef = (0, react_1.useRef)(null);
|
@@ -29,8 +28,7 @@ exports.Comment = (0, tango_boot_1.defineComponent)(antd_1.Comment, {
|
|
29
28
|
designerConfig: {
|
30
29
|
render({ designerProps, originalProps }) {
|
31
30
|
// console.log("Comment: designerProps:", designerProps, "originalProps:", originalProps);
|
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));
|
31
|
+
return react_1.default.createElement(CommentDesigner, Object.assign({ content: react_1.default.createElement("div", null) }, designerProps, originalProps));
|
34
32
|
}
|
35
33
|
}
|
36
34
|
});
|
@@ -1,10 +1,6 @@
|
|
1
1
|
import { DescriptionsProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
export declare const Descriptions: ({
|
4
|
-
[key: string]: any;
|
5
|
-
children?: React.ReactNode;
|
6
|
-
}) => React.JSX.Element;
|
7
|
-
export declare const DescriptionsItem: ({ ...rest }: DescriptionsProps & {
|
3
|
+
export declare const Descriptions: ({ [SLOT.id]: dataId, [SLOT.dnd]: dataDnd, style, ...rest }: DescriptionsProps & {
|
8
4
|
[key: string]: any;
|
9
5
|
children?: React.ReactNode;
|
10
6
|
}) => React.JSX.Element;
|
@@ -1,66 +1,23 @@
|
|
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
|
-
exports.
|
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
|
-
const
|
7
|
+
const slottype_1 = require("../helpers/slottype");
|
55
8
|
const Descriptions = (_a) => {
|
56
|
-
var
|
57
|
-
|
58
|
-
|
59
|
-
|
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.Descriptions, Object.assign({}, rest), rest.children)));
|
60
17
|
};
|
61
18
|
exports.Descriptions = Descriptions;
|
62
|
-
const DescriptionsItem = (
|
63
|
-
|
64
|
-
|
65
|
-
}
|
66
|
-
|
19
|
+
// export const DescriptionsItem = ({
|
20
|
+
// ...rest
|
21
|
+
// }: DescriptionsProps & { [key: string]: any; children?: React.ReactNode }) => {
|
22
|
+
// return <AntDescriptions.Item {...rest}> </AntDescriptions.Item>
|
23
|
+
// }
|
@@ -1,2 +1,6 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import { DropdownProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
export declare const Dropdown: ({ [SLOT.id]: dataId, [SLOT.dnd]: dataDnd, style, ...rest }: DropdownProps & {
|
4
|
+
[key: string]: any;
|
5
|
+
children?: React.ReactNode;
|
6
|
+
}) => React.JSX.Element;
|