@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.
Files changed (69) hide show
  1. package/dist/designer.js +130 -9
  2. package/dist/index.js +130 -9
  3. package/lib/cjs/components/anchor.d.ts +15 -2
  4. package/lib/cjs/components/anchor.js +24 -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/breadcrumb.d.ts +16 -2
  8. package/lib/cjs/components/breadcrumb.js +23 -7
  9. package/lib/cjs/components/carousel.d.ts +4 -1
  10. package/lib/cjs/components/carousel.js +56 -27
  11. package/lib/cjs/components/checkbox.d.ts +3 -2
  12. package/lib/cjs/components/checkbox.js +47 -26
  13. package/lib/cjs/components/collapse.d.ts +15 -2
  14. package/lib/cjs/components/collapse.js +68 -29
  15. package/lib/cjs/components/comment.js +1 -3
  16. package/lib/cjs/components/descriptions.d.ts +1 -5
  17. package/lib/cjs/components/descriptions.js +15 -58
  18. package/lib/cjs/components/dropdown.d.ts +6 -2
  19. package/lib/cjs/components/dropdown.js +23 -8
  20. package/lib/cjs/components/index.d.ts +11 -1
  21. package/lib/cjs/components/index.js +24 -11
  22. package/lib/cjs/components/popconfirm.d.ts +4 -1
  23. package/lib/cjs/components/popconfirm.js +72 -36
  24. package/lib/cjs/components/popover.d.ts +4 -1
  25. package/lib/cjs/components/popover.js +13 -36
  26. package/lib/cjs/components/radio.js +2 -56
  27. package/lib/cjs/components/result2.d.ts +4 -2
  28. package/lib/cjs/components/result2.js +19 -4
  29. package/lib/cjs/components/tooltip.d.ts +5 -1
  30. package/lib/cjs/components/tooltip.js +13 -36
  31. package/lib/cjs/components/upload.d.ts +4 -1
  32. package/lib/cjs/components/upload.js +13 -45
  33. package/lib/cjs/helpers/slottype.d.ts +10 -0
  34. package/lib/cjs/helpers/slottype.js +13 -0
  35. package/lib/cjs/prototypes/collapse.js +27 -13
  36. package/lib/esm/components/anchor.d.ts +15 -2
  37. package/lib/esm/components/anchor.js +21 -42
  38. package/lib/esm/components/backTop.d.ts +6 -0
  39. package/lib/esm/components/backTop.js +13 -0
  40. package/lib/esm/components/breadcrumb.d.ts +16 -2
  41. package/lib/esm/components/breadcrumb.js +21 -7
  42. package/lib/esm/components/carousel.d.ts +4 -1
  43. package/lib/esm/components/carousel.js +55 -27
  44. package/lib/esm/components/checkbox.d.ts +3 -2
  45. package/lib/esm/components/checkbox.js +46 -26
  46. package/lib/esm/components/collapse.d.ts +15 -2
  47. package/lib/esm/components/collapse.js +65 -28
  48. package/lib/esm/components/comment.js +1 -3
  49. package/lib/esm/components/descriptions.d.ts +1 -5
  50. package/lib/esm/components/descriptions.js +14 -56
  51. package/lib/esm/components/dropdown.d.ts +6 -2
  52. package/lib/esm/components/dropdown.js +21 -7
  53. package/lib/esm/components/index.d.ts +11 -1
  54. package/lib/esm/components/index.js +13 -10
  55. package/lib/esm/components/popconfirm.d.ts +4 -1
  56. package/lib/esm/components/popconfirm.js +71 -36
  57. package/lib/esm/components/popover.d.ts +4 -1
  58. package/lib/esm/components/popover.js +12 -36
  59. package/lib/esm/components/radio.js +2 -56
  60. package/lib/esm/components/result2.d.ts +4 -2
  61. package/lib/esm/components/result2.js +19 -4
  62. package/lib/esm/components/tooltip.d.ts +5 -1
  63. package/lib/esm/components/tooltip.js +12 -36
  64. package/lib/esm/components/upload.d.ts +4 -1
  65. package/lib/esm/components/upload.js +12 -45
  66. package/lib/esm/helpers/slottype.d.ts +10 -0
  67. package/lib/esm/helpers/slottype.js +10 -0
  68. package/lib/esm/prototypes/collapse.js +28 -14
  69. package/package.json +2 -2
@@ -14,8 +14,10 @@ exports.Collapse = {
14
14
  type: 'element',
15
15
  hasChildrenItem: true,
16
16
  hasChildren: true,
17
- childrenName: 'Collapse.Panel',
18
- initChildren: `<Collapse.Panel header="panel1" key="1"><Placeholder text="放置替换" /></Collapse.Panel><Collapse.Panel header="panel2" key="2"><Placeholder text="放置替换" /></Collapse.Panel><Collapse.Panel header="panel3" key="3"><Placeholder text="放置替换" /></Collapse.Panel>`,
17
+ // childrenName: 'Collapse.Panel',
18
+ // initChildren: `<Collapse.Panel header="panel1" key="1"><Placeholder text="放置替换" /></Collapse.Panel><Collapse.Panel header="panel2" key="2"><Placeholder text="放置替换" /></Collapse.Panel><Collapse.Panel header="panel3" key="3"><Placeholder text="放置替换" /></Collapse.Panel>`,
19
+ childrenName: 'Panel',
20
+ initChildren: `<Panel header="panel1" key="1"><Placeholder text="放置替换" /></Panel><Panel header="panel2" key="2"><Placeholder text="放置替换" /></Panel>`,
19
21
  relatedImports: ['Placeholder'],
20
22
  props: [
21
23
  ...common_1.StylePrototypes,
@@ -28,32 +30,44 @@ exports.Collapse = {
28
30
  {
29
31
  label: '面板头内容',
30
32
  name: 'header',
33
+ defaultValue: 'panel'
31
34
  },
32
35
  {
33
- label: '对应 activeKey',
36
+ label: 'activeKey',
34
37
  name: 'key',
38
+ required: true,
39
+ },
40
+ {
41
+ label: '面板内容',
42
+ name: 'children',
43
+ defaultValue: '<Placeholder text="放置替换" />',
44
+ // required: true,
45
+ },
46
+ {
47
+ label: '指定可折叠触发区域',
48
+ name: 'collapsible',
49
+ component: react_1.default.createElement(antd_1.Select, { options: [
50
+ { value: 'header', label: '面板头', },
51
+ { value: 'icon', label: '箭头', },
52
+ { value: 'disabled', label: '不可折叠', },
53
+ ] })
35
54
  },
36
- // {
37
- // label: '是否可折叠',
38
- // name: 'collapsible',
39
- // component: <Switch />
40
- // },
41
55
  {
42
56
  label: '自定义渲染',
43
57
  name: 'extra',
44
- component: react_1.default.createElement(antd_1.Switch, null)
58
+ component: react_1.default.createElement(antd_1.Switch, { defaultChecked: false })
45
59
  },
46
60
  {
47
61
  label: '隐藏时保留',
48
62
  name: 'forceRender',
49
- component: react_1.default.createElement(antd_1.Switch, null),
50
- defaultValue: false,
63
+ component: react_1.default.createElement(antd_1.Switch, { defaultChecked: false }),
64
+ // defaultValue: false,
51
65
  },
52
66
  {
53
67
  label: '是否展示当前面板上的箭头',
54
68
  name: 'showArrow',
55
- component: react_1.default.createElement(antd_1.Switch, null),
56
- defaultValue: true,
69
+ component: react_1.default.createElement(antd_1.Switch, { defaultChecked: true }),
70
+ // defaultValue: true,
57
71
  },
58
72
  ]
59
73
  }
@@ -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: React.ForwardRefExoticComponent<AnchorProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
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,44 +1,23 @@
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 Anchor = (_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("0515001-锚点",dataId,dataDnd,rest)
12
+ return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
13
+ React.createElement(AntAnchor, Object.assign({}, rest), rest.children)));
14
+ };
15
+ export const AnchorLink = (props) => {
16
+ //console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
17
+ return (
18
+ // <div data-dnd={dataDnd} data-id={rest.tid} draggable={true} style={style} >
19
+ React.createElement(AntAnchor.Link, Object.assign({}, props))
20
+ // </div>
21
+ );
22
+ };
23
+ Anchor.Link = AnchorLink;
@@ -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,2 +1,16 @@
1
- export declare const Breadcrumb: import("react").ForwardRefExoticComponent<import("antd").BreadcrumbProps & import("@music163/tango-boot").TangoComponentProps & import("react").RefAttributes<unknown>>;
2
- export declare const BreadcrumbItem: import("react").ForwardRefExoticComponent<import("antd").BreadcrumbItemProps & import("@music163/tango-boot").TangoComponentProps & import("react").RefAttributes<unknown>>;
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,8 +1,22 @@
1
- import { defineComponent } from '@music163/tango-boot';
1
+ import { __rest } from "tslib";
2
2
  import { Breadcrumb as AntBreadcrumb } from 'antd';
3
- export const Breadcrumb = defineComponent(AntBreadcrumb, {
4
- name: 'Breadcrumb'
5
- });
6
- export const BreadcrumbItem = defineComponent(AntBreadcrumb.Item, {
7
- name: 'BreadcrumbItem',
8
- });
3
+ import React from 'react';
4
+ import { SLOT } from '../helpers/slottype';
5
+ export const Breadcrumb = (_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(AntBreadcrumb, Object.assign({}, rest), rest.children)));
13
+ };
14
+ export const BreadcrumbItem = (props) => {
15
+ //console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
16
+ return (
17
+ // <div data-dnd={dataDnd} data-id={rest.tid} draggable={true} style={style} >
18
+ React.createElement(AntBreadcrumb.Item, Object.assign({}, props))
19
+ // </div>
20
+ );
21
+ };
22
+ Breadcrumb.Item = BreadcrumbItem;
@@ -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,57 @@
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
+ //console.log("0515001-走马灯",dataId,dataDnd,rest)
55
+ return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
56
+ React.createElement(AntCarousel, Object.assign({}, rest), rest.children)));
57
+ };
@@ -1,6 +1,7 @@
1
- import { CheckboxProps } from 'antd';
2
1
  import React from 'react';
3
- export declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxProps & React.RefAttributes<HTMLInputElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
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>>;
@@ -2,32 +2,52 @@ import { __rest } from "tslib";
2
2
  import { defineComponent } from '@music163/tango-boot';
3
3
  import { SLOT } from '@music163/tango-helpers';
4
4
  import { Checkbox as AntCheckbox } from 'antd';
5
- import React, { useRef, useEffect } from 'react';
6
- function CheckboxDesigner(_a) {
7
- var { style } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], rest = __rest(_a, ["style", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + ""]);
8
- const checkBoxRef = useRef(null);
9
- useEffect(() => {
10
- Promise.resolve().then(() => {
11
- const popoverNode = document.querySelector(`.${dataId}`);
12
- // console.log('spinNode', popoverNode);
13
- if (popoverNode) {
14
- popoverNode.setAttribute('data-dnd', dataDnd);
15
- popoverNode.setAttribute('data-id', dataId);
16
- popoverNode.setAttribute('draggable', 'true');
17
- }
18
- });
19
- }, [dataDnd, dataId]);
20
- return (React.createElement("div", { ref: checkBoxRef },
21
- React.createElement(AntCheckbox, Object.assign({}, rest, { style: style, className: dataId, "data-dnd": dataDnd, "data-id": dataId }), rest.label)));
22
- }
23
- export const Checkbox = defineComponent(AntCheckbox, {
24
- name: 'Checkbox',
25
- designerConfig: {
26
- render({ designerProps, originalProps, }) {
27
- return React.createElement(CheckboxDesigner, Object.assign({ label: '多选项1' }, designerProps, originalProps));
28
- },
29
- },
30
- });
5
+ import React from 'react';
6
+ // function CheckboxDesigner({
7
+ // style,
8
+ // [SLOT.dnd]: dataDnd,
9
+ // [SLOT.id]: dataId,
10
+ // ...rest
11
+ // }: CheckboxProps & { [key: string]: any; dnd?: string; label: string }) {
12
+ // const checkBoxRef = useRef<HTMLDivElement>(null);
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
+ // <div ref={checkBoxRef}>
26
+ // <AntCheckbox {...rest}
27
+ // style={style}
28
+ // className={dataId}
29
+ // data-dnd={dataDnd}
30
+ // data-id={dataId}
31
+ // >{rest.label}</AntCheckbox>
32
+ // </div>
33
+ // );
34
+ // }
35
+ // export const Checkbox = defineComponent(AntCheckbox, {
36
+ // name: 'Checkbox',
37
+ // designerConfig: {
38
+ // render({ designerProps, originalProps, }) {
39
+ // return <CheckboxDesigner label={'多选项1'} {...designerProps} {...originalProps} />;
40
+ // },
41
+ // },
42
+ // });
43
+ export const Checkbox = (_a) => {
44
+ 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 + ""]);
45
+ console.log("新的多选组件", dataId, dataDnd, rest);
46
+ //const newProps = {...rest, ...{draggable:true}}
47
+ //console.log("新的表格组件01",newProps);
48
+ return (React.createElement("div", { "data-dnd": dataDnd, "data-id": dataId, draggable: true },
49
+ React.createElement(AntCheckbox, Object.assign({}, rest))));
50
+ };
31
51
  export const CheckboxGroup = defineComponent(AntCheckbox.Group, {
32
52
  name: 'CheckboxGroup',
33
53
  });
@@ -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: React.ForwardRefExoticComponent<CollapseProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
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,32 +1,69 @@
1
+ // import { defineComponent } from '@music163/tango-boot';
2
+ // import { Collapse as AntCollapse, CollapseProps} from 'antd';
3
+ // import React, { useEffect} from 'react';
4
+ // import { SLOT } from '@music163/tango-helpers';
1
5
  import { __rest } from "tslib";
2
- import { defineComponent } from '@music163/tango-boot';
3
- import { Collapse as AntCollapse } from 'antd';
4
- import React, { useEffect } from 'react';
5
- import { SLOT } from '@music163/tango-helpers';
6
- function CollapseDesigner(_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(AntCollapse, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children));
20
- }
21
- export const Collapse = defineComponent(AntCollapse, {
22
- name: 'Collapse',
23
- designerConfig: {
24
- render({ designerProps, originalProps }) {
25
- console.log("Collapse: designerProps:", designerProps, "originalProps:", originalProps);
26
- return React.createElement(CollapseDesigner, Object.assign({}, designerProps, originalProps));
27
- },
28
- },
29
- });
6
+ // function CollapseDesigner({
7
+ // children,
8
+ // [SLOT.dnd]: dataDnd,
9
+ // [SLOT.id]: dataId,
10
+ // style,
11
+ // ...rest
12
+ // }: CollapseProps & { [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
+ // <AntCollapse
26
+ // className={dataId}
27
+ // data-dnd={dataDnd}
28
+ // data-id={dataId}
29
+ // style={style}
30
+ // {...rest}
31
+ // >
32
+ // {children}
33
+ // </AntCollapse>
34
+ // );
35
+ // }
36
+ // export const Collapse = defineComponent(AntCollapse, {
37
+ // name: 'Collapse',
38
+ // designerConfig: {
39
+ // render({ designerProps, originalProps }) {
40
+ // console.log("Collapse: designerProps:", designerProps, "originalProps:", originalProps);
41
+ // return <CollapseDesigner {...designerProps} {...originalProps} />;
42
+ // },
43
+ // },
44
+ // });
30
45
  // export const CollapsePanel = defineComponent(AntCollapse.Panel, {
31
46
  // name: 'CollapsePanel',
32
47
  // });
48
+ import { Collapse as AntCollapse } from 'antd';
49
+ import React from 'react';
50
+ import { SLOT } from '../helpers/slottype';
51
+ export const Collapse = (_a) => {
52
+ var
53
+ //items,
54
+ _b = SLOT.id,
55
+ //items,
56
+ 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"]);
57
+ //console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
58
+ return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
59
+ React.createElement(AntCollapse, Object.assign({}, rest), rest.children)));
60
+ };
61
+ export const CollapsePanel = (props) => {
62
+ //console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
63
+ return (
64
+ // <div data-dnd={dataDnd} data-id={rest.tid} draggable={true} style={style} >
65
+ React.createElement(AntCollapse.Panel, Object.assign({}, props))
66
+ // </div>
67
+ );
68
+ };
69
+ Collapse.Panel = CollapsePanel;
@@ -3,7 +3,6 @@ import { Comment as AntComment } from 'antd';
3
3
  import { defineComponent } from '@music163/tango-boot';
4
4
  import React, { useEffect, useRef } from 'react';
5
5
  import { SLOT } from '@music163/tango-helpers';
6
- import { Placeholder } from './placeholder';
7
6
  function CommentDesigner(_a) {
8
7
  var { children, content } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["children", "content", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
9
8
  const commentRef = useRef(null);
@@ -26,8 +25,7 @@ export const Comment = defineComponent(AntComment, {
26
25
  designerConfig: {
27
26
  render({ designerProps, originalProps }) {
28
27
  // console.log("Comment: designerProps:", designerProps, "originalProps:", originalProps);
29
- return React.createElement(CommentDesigner, Object.assign({ content: React.createElement("div", null,
30
- React.createElement(Placeholder, { placeholder: "\u653E\u7F6E\u66FF\u6362" })) }, designerProps, originalProps));
28
+ return React.createElement(CommentDesigner, Object.assign({ content: React.createElement("div", null) }, designerProps, originalProps));
31
29
  }
32
30
  }
33
31
  });
@@ -1,10 +1,6 @@
1
1
  import { DescriptionsProps } from 'antd';
2
2
  import React from 'react';
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 & {
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;