@cuvp1225/antd 0.1.19-beta.12 → 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.
Files changed (37) hide show
  1. package/dist/designer.js +311 -5
  2. package/dist/index.js +311 -5
  3. package/lib/cjs/components/anchor.d.ts +4 -1
  4. package/lib/cjs/components/anchor.js +13 -43
  5. package/lib/cjs/components/backTop.d.ts +6 -0
  6. package/lib/cjs/components/backTop.js +17 -0
  7. package/lib/cjs/components/carousel.d.ts +4 -1
  8. package/lib/cjs/components/carousel.js +55 -27
  9. package/lib/cjs/components/descriptions.js +0 -47
  10. package/lib/cjs/components/index.d.ts +4 -0
  11. package/lib/cjs/components/index.js +10 -3
  12. package/lib/cjs/components/popconfirm.d.ts +4 -1
  13. package/lib/cjs/components/popconfirm.js +72 -36
  14. package/lib/cjs/components/popover.d.ts +4 -1
  15. package/lib/cjs/components/popover.js +13 -36
  16. package/lib/cjs/components/radio.js +2 -56
  17. package/lib/cjs/components/tooltip.d.ts +5 -1
  18. package/lib/cjs/components/tooltip.js +13 -36
  19. package/lib/cjs/components/upload.js +0 -63
  20. package/lib/esm/components/anchor.d.ts +4 -1
  21. package/lib/esm/components/anchor.js +11 -42
  22. package/lib/esm/components/backTop.d.ts +6 -0
  23. package/lib/esm/components/backTop.js +13 -0
  24. package/lib/esm/components/carousel.d.ts +4 -1
  25. package/lib/esm/components/carousel.js +54 -27
  26. package/lib/esm/components/descriptions.js +0 -47
  27. package/lib/esm/components/index.d.ts +4 -0
  28. package/lib/esm/components/index.js +4 -2
  29. package/lib/esm/components/popconfirm.d.ts +4 -1
  30. package/lib/esm/components/popconfirm.js +71 -36
  31. package/lib/esm/components/popover.d.ts +4 -1
  32. package/lib/esm/components/popover.js +12 -36
  33. package/lib/esm/components/radio.js +2 -56
  34. package/lib/esm/components/tooltip.d.ts +5 -1
  35. package/lib/esm/components/tooltip.js +12 -36
  36. package/lib/esm/components/upload.js +0 -63
  37. package/package.json +2 -2
@@ -1,70 +1,7 @@
1
1
  "use strict";
2
- // import { Upload as AntUpload, UploadProps } from 'antd';
3
- // import { defineComponent } from '@music163/tango-boot';
4
- // import React, { useEffect, useRef } from 'react';
5
- // import { SLOT } from '@music163/tango-helpers';
6
- // function UploadDesigner({
7
- // children,
8
- // title,
9
- // [SLOT.dnd]:dataDnd,
10
- // [SLOT.id]:dataId,
11
- // style,
12
- // ...rest
13
- // }: UploadProps& { [key: string]: any, // 添加索引签名
14
- // dnd?: string, children?: React.ReactNode }) {
15
- // const uploadRef = useRef<HTMLDivElement>(null);
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
3
  exports.Upload = void 0;
18
4
  const tslib_1 = require("tslib");
19
- // useEffect(() => {
20
- // Promise.resolve().then(() => {
21
- // const popoverNode = document.querySelector(`.${dataId}`);
22
- // console.log('uploadNode' ,popoverNode)
23
- // if (popoverNode) {
24
- // popoverNode.setAttribute('data-dnd', dataDnd);
25
- // popoverNode.setAttribute('data-id', dataId);
26
- // }
27
- // });
28
- // },[dataDnd,dataId])
29
- // // 监听弹层显示事件
30
- // // const handleVisibleChange = (visible: boolean) => {
31
- // // console.log('handleVisibleChange', visible);
32
- // // if (visible) {
33
- // // // 使用微任务确保弹层已渲染
34
- // // Promise.resolve().then(() => {
35
- // // const popoverNode = document.querySelector('.ant-popover-placement-top');
36
- // // console.log('popoverNode' ,popoverNode)
37
- // // if (popoverNode) {
38
- // // popoverNode.setAttribute('data-dnd', dataDnd);
39
- // // popoverNode.setAttribute('data-id', dataId);
40
- // // }
41
- // // });
42
- // // }
43
- // // };
44
- // return (
45
- // <div ref={uploadRef}>
46
- // <AntUpload
47
- // className={dataId}
48
- // data-dnd={dataDnd}
49
- // data-id={dataId}
50
- // {...rest}
51
- // >
52
- // {children}
53
- // </AntUpload>
54
- // </div>
55
- // );
56
- // }
57
- // export const Upload = defineComponent(AntUpload, {
58
- // name: 'Upload',
59
- // designerConfig: {
60
- // render({ designerProps, originalProps }) {
61
- // console.log("Upload: designerProps:",designerProps,"originalProps:",originalProps)
62
- // return <UploadDesigner title="Are you sure?" {...designerProps} {...originalProps} />;
63
- // },
64
- // },
65
- // // designerConfig: {
66
- // // },
67
- // });
68
5
  const antd_1 = require("antd");
69
6
  const react_1 = tslib_1.__importDefault(require("react"));
70
7
  const slottype_1 = require("../helpers/slottype");
@@ -1,3 +1,6 @@
1
1
  import { AnchorProps } from 'antd';
2
2
  import React from 'react';
3
- export declare const Anchor: React.ForwardRefExoticComponent<AnchorProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
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,44 +1,13 @@
1
1
  import { __rest } from "tslib";
2
2
  import { Anchor as AntAnchor } from 'antd';
3
- import { defineComponent } from '@music163/tango-boot';
4
- import React, { useEffect, useRef } from 'react';
5
- import { SLOT } from '@music163/tango-helpers';
6
- const { Link } = AntAnchor;
7
- function AnchorDesigner(_a) {
8
- var { items } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["items", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
9
- const anchorRef = useRef(null);
10
- useEffect(() => {
11
- Promise.resolve().then(() => {
12
- const popoverNode = document.querySelector(`.${dataId}`);
13
- console.log('spinNode', popoverNode);
14
- if (popoverNode) {
15
- popoverNode.setAttribute('data-dnd', dataDnd);
16
- popoverNode.setAttribute('data-id', dataId);
17
- popoverNode.setAttribute('draggable', 'true');
18
- }
19
- });
20
- }, [dataDnd, dataId]);
21
- //递归遍历生成子节点
22
- const renderLinks = (items) => {
23
- return items.map((item) => {
24
- const { key, href, title, children } = item;
25
- // 如果有子节点,则递归渲染
26
- if (children) {
27
- return (React.createElement(Link, { key: key, href: href, title: title }, renderLinks(children)));
28
- }
29
- // 没有子节点的情况
30
- return React.createElement(Link, { key: key, href: href, title: title });
31
- });
32
- };
33
- return (React.createElement("div", { ref: anchorRef, draggable: 'true' },
34
- React.createElement(AntAnchor, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), renderLinks(items))));
35
- }
36
- export const Anchor = defineComponent(AntAnchor, {
37
- name: 'Anchor',
38
- designerConfig: {
39
- render({ designerProps, originalProps }) {
40
- console.log("Anchor: designerProps:", designerProps, "originalProps:", originalProps);
41
- return React.createElement(AnchorDesigner, Object.assign({}, designerProps, originalProps));
42
- },
43
- },
44
- });
3
+ import React from 'react';
4
+ import { SLOT } from '../helpers/slottype';
5
+ export const Carousel = (_a) => {
6
+ var
7
+ //items,
8
+ _b = SLOT.id,
9
+ //items,
10
+ dataId = _a[_b], _c = SLOT.dnd, dataDnd = _a[_c], { style } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
11
+ return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
12
+ React.createElement(AntAnchor, Object.assign({}, rest), rest.children)));
13
+ };
@@ -0,0 +1,6 @@
1
+ import { BackTopProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const BackTop: ({ [SLOT.id]: dataId, [SLOT.dnd]: dataDnd, style, ...rest }: BackTopProps & {
4
+ [key: string]: any;
5
+ children?: React.ReactNode;
6
+ }) => React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { __rest } from "tslib";
2
+ import { BackTop as AntBackTop } from 'antd';
3
+ import React from 'react';
4
+ import { SLOT } from '../helpers/slottype';
5
+ export const BackTop = (_a) => {
6
+ var
7
+ //items,
8
+ _b = SLOT.id,
9
+ //items,
10
+ dataId = _a[_b], _c = SLOT.dnd, dataDnd = _a[_c], { style } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
11
+ return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
12
+ React.createElement(AntBackTop, Object.assign({}, rest), rest.children)));
13
+ };
@@ -1,3 +1,6 @@
1
1
  import { CarouselProps } from 'antd';
2
2
  import React from 'react';
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>>;
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,29 +1,56 @@
1
+ // import { Carousel as AntCarousel, CarouselProps } from 'antd';
2
+ // import { defineComponent } from '@music163/tango-boot';
3
+ // import React, { useEffect} from 'react';
4
+ // import { SLOT } from '@music163/tango-helpers';
1
5
  import { __rest } from "tslib";
6
+ // function CarouselDesigner({
7
+ // children,
8
+ // [SLOT.dnd]: dataDnd,
9
+ // [SLOT.id]: dataId,
10
+ // style,
11
+ // ...rest
12
+ // }: CarouselProps & { [key: string]: any; dnd?: string; children?: React.ReactNode }) {
13
+ // 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
+ // return (
25
+ // <AntCarousel
26
+ // className={dataId}
27
+ // data-dnd={dataDnd}
28
+ // data-id={dataId}
29
+ // style={style}
30
+ // {...rest}
31
+ // >
32
+ // {children}
33
+ // </AntCarousel>
34
+ // );
35
+ // }
36
+ // export const Carousel = defineComponent(AntCarousel, {
37
+ // name: 'Carousel',
38
+ // designerConfig: {
39
+ // render({ designerProps, originalProps }) {
40
+ // console.log("Carousel: designerProps:", designerProps, "originalProps:", originalProps);
41
+ // return <CarouselDesigner {...designerProps} {...originalProps} />;
42
+ // },
43
+ // },
44
+ // });
2
45
  import { Carousel as AntCarousel } from 'antd';
3
- import { defineComponent } from '@music163/tango-boot';
4
- import React, { useEffect } from 'react';
5
- import { SLOT } from '@music163/tango-helpers';
6
- function CarouselDesigner(_a) {
7
- var { children } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["children", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
8
- useEffect(() => {
9
- Promise.resolve().then(() => {
10
- const popoverNode = document.querySelector(`.${dataId}`);
11
- console.log('spinNode', popoverNode);
12
- if (popoverNode) {
13
- popoverNode.setAttribute('data-dnd', dataDnd);
14
- popoverNode.setAttribute('data-id', dataId);
15
- popoverNode.setAttribute('draggable', 'true');
16
- }
17
- });
18
- }, [dataDnd, dataId]);
19
- return (React.createElement(AntCarousel, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children));
20
- }
21
- export const Carousel = defineComponent(AntCarousel, {
22
- name: 'Carousel',
23
- designerConfig: {
24
- render({ designerProps, originalProps }) {
25
- console.log("Carousel: designerProps:", designerProps, "originalProps:", originalProps);
26
- return React.createElement(CarouselDesigner, Object.assign({}, designerProps, originalProps));
27
- },
28
- },
29
- });
46
+ import React from 'react';
47
+ import { SLOT } from '../helpers/slottype';
48
+ export const Carousel = (_a) => {
49
+ var
50
+ //items,
51
+ _b = SLOT.id,
52
+ //items,
53
+ dataId = _a[_b], _c = SLOT.dnd, dataDnd = _a[_c], { style } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
54
+ return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
55
+ React.createElement(AntCarousel, Object.assign({}, rest), rest.children)));
56
+ };
@@ -1,51 +1,4 @@
1
- // import { Descriptions as AntDescriptions, DescriptionsProps } from 'antd';
2
- // import { defineComponent } from '@music163/tango-boot';
3
- // import React, { useEffect} from 'react';
4
- // import { SLOT } from '@music163/tango-helpers';
5
1
  import { __rest } from "tslib";
6
- // function DescriptionsDesigner({
7
- // items,
8
- // [SLOT.dnd]: dataDnd,
9
- // [SLOT.id]: dataId,
10
- // style,
11
- // ...rest
12
- // }: DescriptionsProps & { [key: string]: any; dnd?: string; children?: React.ReactNode }) {
13
- // 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
- // return (
25
- // <AntDescriptions
26
- // className={dataId}
27
- // data-dnd={dataDnd}
28
- // data-id={dataId}
29
- // style={style}
30
- // {...rest}
31
- // >
32
- // {items.map((item: { label:string; value: string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal; }) => (
33
- // <AntDescriptions.Item label={item.label} key={item.label}>
34
- // {item.value}
35
- // </AntDescriptions.Item>
36
- // ))}
37
- // </AntDescriptions>
38
- // );
39
- // }
40
- // export const Descriptions = defineComponent(AntDescriptions, {
41
- // name: 'Descriptions',
42
- // designerConfig: {
43
- // render({ designerProps, originalProps }) {
44
- // console.log("Descriptions: designerProps:", designerProps, "originalProps:", originalProps);
45
- // return <DescriptionsDesigner {...designerProps} {...originalProps} />;
46
- // },
47
- // },
48
- // });
49
2
  import { Descriptions as AntDescriptions } from 'antd';
50
3
  import React from 'react';
51
4
  import { SLOT } from '../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';
@@ -17,8 +17,8 @@ export { Select } from './select';
17
17
  export { Space } from './space';
18
18
  //export { Typography, Title, Paragraph,Text } from './typography';
19
19
  //export { Columns, Column } from './columns';
20
- //export { Popconfirm } from './popconfirm';
21
- //export {Popover} from './popover';
20
+ export { Popconfirm } from './popconfirm';
21
+ export { Popover } from './popover';
22
22
  //export {Tooltip} from './tooltip';
23
23
  //export {Result} from './result';
24
24
  //export {Result} from './result1';
@@ -74,6 +74,8 @@ export { Descriptions } from './descriptions';
74
74
  export { Tree } from './tree';
75
75
  export { Alert } from "./alert";
76
76
  export { Progress } from './progress';
77
+ export { BackTop } from './backTop';
78
+ export { AntdIcon } from './icon';
77
79
  //export {Affix} from './affix';
78
80
  //import * as echarts from 'echarts';
79
81
  //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: React.ForwardRefExoticComponent<Omit<PopconfirmProps & React.RefAttributes<unknown> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
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,38 +1,73 @@
1
+ // import { Popconfirm as AntPopconfirm, PopconfirmProps } from 'antd';
2
+ // //import { CloseOutlined } from '@ant-design/icons';
3
+ // import CloseOutlined from '@ant-design/icons/CloseOutlined';
4
+ // import { defineComponent } from '@music163/tango-boot';
5
+ // import { Button } from './button';
6
+ // import React, { useEffect, useRef } from 'react';
7
+ // import { ShadowContainer } from './shadow-container';
8
+ // import { SLOT } from '@music163/tango-helpers';
9
+ // function PopconfirmDesigner({
10
+ // children,
11
+ // title,
12
+ // [SLOT.dnd]:dataDnd,
13
+ // [SLOT.id]:dataId,
14
+ // style,
15
+ // ...rest
16
+ // }: PopconfirmProps& { [key: string]: any, // 添加索引签名
17
+ // dnd?: string, children?: React.ReactNode }) {
18
+ // const popconfirmRef = useRef<HTMLDivElement>(null);
1
19
  import { __rest } from "tslib";
20
+ // // 监听弹层显示事件
21
+ // const handleVisibleChange = (visible: boolean) => {
22
+ // console.log('handleVisibleChange', visible);
23
+ // if (visible) {
24
+ // // 使用微任务确保弹层已渲染
25
+ // Promise.resolve().then(() => {
26
+ // const popoverNode = document.querySelector(`#${dataId}`);
27
+ // console.log('popoverNode' ,popoverNode)
28
+ // if (popoverNode) {
29
+ // popoverNode.setAttribute('data-dnd', dataDnd);
30
+ // popoverNode.setAttribute('data-id', dataId);
31
+ // popoverNode.setAttribute('draggable', 'true');
32
+ // }
33
+ // });
34
+ // }
35
+ // };
36
+ // return (
37
+ // <div ref={popconfirmRef}>
38
+ // <AntPopconfirm
39
+ // id={dataId}
40
+ // className={dataId}
41
+ // title={title}
42
+ // onOpenChange={handleVisibleChange}
43
+ // {...rest}
44
+ // >
45
+ // {children}
46
+ // </AntPopconfirm>
47
+ // </div>
48
+ // );
49
+ // }
50
+ // export const Popconfirm = defineComponent(AntPopconfirm, {
51
+ // name: 'Popconfirm',
52
+ // designerConfig: {
53
+ // render({ designerProps, originalProps }) {
54
+ // console.log("Popconfirm: designerProps:",designerProps,"originalProps:",originalProps)
55
+ // return <PopconfirmDesigner title="Are you sure?" {...designerProps} {...originalProps} />;
56
+ // },
57
+ // },
58
+ // // designerConfig: {
59
+ // // },
60
+ // });
2
61
  import { Popconfirm as AntPopconfirm } from 'antd';
3
- import { defineComponent } from '@music163/tango-boot';
4
- import React, { useRef } from 'react';
5
- import { SLOT } from '@music163/tango-helpers';
6
- function PopconfirmDesigner(_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 popconfirmRef = useRef(null);
9
- // 监听弹层显示事件
10
- const handleVisibleChange = (visible) => {
11
- console.log('handleVisibleChange', visible);
12
- if (visible) {
13
- // 使用微任务确保弹层已渲染
14
- Promise.resolve().then(() => {
15
- const popoverNode = document.querySelector(`#${dataId}`);
16
- console.log('popoverNode', popoverNode);
17
- if (popoverNode) {
18
- popoverNode.setAttribute('data-dnd', dataDnd);
19
- popoverNode.setAttribute('data-id', dataId);
20
- popoverNode.setAttribute('draggable', 'true');
21
- }
22
- });
23
- }
24
- };
25
- return (React.createElement("div", { ref: popconfirmRef },
26
- React.createElement(AntPopconfirm, Object.assign({ id: dataId, className: dataId, title: title, onOpenChange: handleVisibleChange }, rest), children)));
27
- }
28
- export const Popconfirm = defineComponent(AntPopconfirm, {
29
- name: 'Popconfirm',
30
- designerConfig: {
31
- render({ designerProps, originalProps }) {
32
- console.log("Popconfirm: designerProps:", designerProps, "originalProps:", originalProps);
33
- return React.createElement(PopconfirmDesigner, Object.assign({ title: "Are you sure?" }, designerProps, originalProps));
34
- },
35
- },
36
- // designerConfig: {
37
- // },
38
- });
62
+ import React from 'react';
63
+ import { SLOT } from '../helpers/slottype';
64
+ export const Popconfirm = (_a) => {
65
+ var
66
+ //items,
67
+ _b = SLOT.id,
68
+ //items,
69
+ dataId = _a[_b], _c = SLOT.dnd, dataDnd = _a[_c], { style } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
70
+ //console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
71
+ return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
72
+ React.createElement(AntPopconfirm, Object.assign({ title: '确认吗' }, rest), rest.children)));
73
+ };
@@ -1,3 +1,6 @@
1
1
  import { PopoverProps } from 'antd';
2
2
  import React from 'react';
3
- export declare const Popover: React.ForwardRefExoticComponent<Omit<PopoverProps & React.RefAttributes<unknown> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
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;
@@ -1,38 +1,14 @@
1
1
  import { __rest } from "tslib";
2
2
  import { Popover as AntPopover } from 'antd';
3
- import { defineComponent } from '@music163/tango-boot';
4
- import React, { useRef } from 'react';
5
- import { SLOT } from '@music163/tango-helpers';
6
- function PopoverDesigner(_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 popoverRef = useRef(null);
9
- // 监听弹层显示事件
10
- const handleVisibleChange = (visible) => {
11
- console.log('handleVisibleChange', visible);
12
- if (visible) {
13
- // 使用微任务确保弹层已渲染
14
- Promise.resolve().then(() => {
15
- const popoverNode = document.querySelector(`#${dataId}`);
16
- console.log('popoverNode', popoverNode);
17
- if (popoverNode) {
18
- popoverNode.setAttribute('data-dnd', dataDnd);
19
- popoverNode.setAttribute('data-id', dataId);
20
- popoverNode.setAttribute('draggable', 'true');
21
- }
22
- });
23
- }
24
- };
25
- return (React.createElement("div", { ref: popoverRef },
26
- React.createElement(AntPopover, Object.assign({ id: dataId, title: title, onOpenChange: handleVisibleChange }, rest), children)));
27
- }
28
- export const Popover = defineComponent(AntPopover, {
29
- name: 'Popover',
30
- designerConfig: {
31
- render({ designerProps, originalProps }) {
32
- console.log("Popover: designerProps:", designerProps, "originalProps:", originalProps);
33
- return React.createElement(PopoverDesigner, Object.assign({ title: "Are you sure?" }, designerProps, originalProps));
34
- },
35
- },
36
- // designerConfig: {
37
- // },
38
- });
3
+ import React from 'react';
4
+ import { SLOT } from '../helpers/slottype';
5
+ export const Popover = (_a) => {
6
+ var
7
+ //items,
8
+ _b = SLOT.id,
9
+ //items,
10
+ dataId = _a[_b], _c = SLOT.dnd, dataDnd = _a[_c], { style } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
11
+ //console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
12
+ return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
13
+ React.createElement(AntPopover, Object.assign({ title: '标题' }, rest), rest.children)));
14
+ };
@@ -3,65 +3,11 @@ import { defineComponent } from '@music163/tango-boot';
3
3
  import { SLOT } from '@music163/tango-helpers';
4
4
  import { Radio as AntRadio } from 'antd';
5
5
  import React from 'react';
6
- // function RadioDesigner({
7
- // children,
8
- // style,
9
- // [SLOT.dnd]: dataDnd,
10
- // [SLOT.id]: dataId,
11
- // ...rest
12
- // }: RadioProps & {
13
- // [key: string]: any, // 添加索引签名
14
- // dnd?: string, children?: React.ReactNode
15
- // }) {
16
- // // const radioRef = useRef<HTMLDivElement>(null);
17
- // useEffect(() => {
18
- // Promise.resolve().then(() => {
19
- // const popoverNode = document.querySelector(`.${dataId}`);
20
- // console.log('popoverNode', popoverNode);
21
- // if (popoverNode) {
22
- // popoverNode.setAttribute('data-dnd', dataDnd);
23
- // popoverNode.setAttribute('data-id', dataId);
24
- // popoverNode.setAttribute('draggable', 'true');
25
- // }
26
- // });
27
- // }, [dataDnd, dataId]);
28
- // // const { optionType } = rest;
29
- // // if (optionType === 'button') {
30
- // // return (
31
- // // <div ref={radioRef} className='.ant-radio'>
32
- // // <AntRadio.Button {...rest} style={style} >{rest.label}</AntRadio.Button>
33
- // // </div>
34
- // // );
35
- // // }
36
- // return (
37
- // <AntRadio
38
- // {...rest}
39
- // style={style}
40
- // className={dataId}
41
- // data-dnd={dataDnd}
42
- // data-id={dataId}
43
- // >
44
- // {children}
45
- // </AntRadio>
46
- // );
47
- // }
48
- // export const Radio = defineComponent(AntRadio, {
49
- // name: 'Radio',
50
- // designerConfig: {
51
- // render({ designerProps, originalProps, }) {
52
- // console.log("designerProps:", designerProps, "originalProps:", originalProps)
53
- // return <RadioDesigner {...designerProps} {...originalProps} />;
54
- // },
55
- // },
56
- // });
57
- // export const Radio = defineComponent(AntRadio, {
58
- // name: 'Radio',
59
- // });
60
6
  export const Radio = (_a) => {
61
- 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 + ""]);
62
- console.log("新的单选组件", dataId, dataDnd, rest);
7
+ //console.log("新的单选组件",dataId,dataDnd,rest);
63
8
  //const newProps = {...rest, ...{draggable:true}}
64
9
  //console.log("新的表格组件01",newProps);
10
+ 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 + ""]);
65
11
  return (React.createElement("div", { "data-dnd": dataDnd, "data-id": dataId, draggable: true },
66
12
  React.createElement(AntRadio, Object.assign({}, rest))));
67
13
  };
@@ -1,2 +1,6 @@
1
+ import { TooltipProps } from 'antd';
1
2
  import React from 'react';
2
- export declare const Tooltip: React.ForwardRefExoticComponent<(Omit<import("antd/lib/tooltip").TooltipPropsWithTitle & React.RefAttributes<unknown> & import("@music163/tango-boot").TangoComponentProps, "ref"> | Omit<import("antd/lib/tooltip").TooltipPropsWithOverlay & React.RefAttributes<unknown> & import("@music163/tango-boot").TangoComponentProps, "ref">) & React.RefAttributes<unknown>>;
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;