@cuvp1225/antd 0.2.74 → 0.2.76
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 +399 -25
- package/dist/index.js +386 -12
- package/lib/cjs/components/affix.d.ts +1 -0
- package/lib/cjs/components/affix.js +18 -0
- package/lib/cjs/components/alert.d.ts +3 -0
- package/lib/cjs/components/alert.js +32 -0
- package/lib/cjs/components/anchor.d.ts +3 -0
- package/lib/cjs/components/anchor.js +47 -0
- package/lib/cjs/components/auto-complete.d.ts +7 -0
- package/lib/cjs/components/auto-complete.js +34 -0
- package/lib/cjs/components/avatar.d.ts +3 -0
- package/lib/cjs/components/avatar.js +34 -0
- package/lib/cjs/components/badge.d.ts +3 -0
- package/lib/cjs/components/badge.js +37 -0
- package/lib/cjs/components/calendar.d.ts +3 -0
- package/lib/cjs/components/calendar.js +34 -0
- package/lib/cjs/components/card.d.ts +3 -0
- package/lib/cjs/components/card.js +34 -0
- package/lib/cjs/components/carousel.d.ts +3 -0
- package/lib/cjs/components/carousel.js +32 -0
- package/lib/cjs/components/checkbox.js +17 -3
- package/lib/cjs/components/collapse.d.ts +4 -2
- package/lib/cjs/components/collapse.js +25 -1
- package/lib/cjs/components/comment.d.ts +3 -0
- package/lib/cjs/components/comment.js +36 -0
- package/lib/cjs/components/date-picker.d.ts +1 -1
- package/lib/cjs/components/date-picker.js +23 -5
- package/lib/cjs/components/descriptions.d.ts +3 -0
- package/lib/cjs/components/descriptions.js +32 -0
- package/lib/cjs/components/divider.d.ts +3 -0
- package/lib/cjs/components/divider.js +34 -0
- package/lib/cjs/components/drawer.js +1 -2
- package/lib/cjs/components/empty.d.ts +3 -0
- package/lib/cjs/components/empty.js +34 -0
- package/lib/cjs/components/image.d.ts +3 -0
- package/lib/cjs/components/image.js +35 -0
- package/lib/cjs/components/index.d.ts +34 -0
- package/lib/cjs/components/index.js +71 -1
- package/lib/cjs/components/input-number.js +27 -24
- package/lib/cjs/components/mentions.d.ts +3 -0
- package/lib/cjs/components/mentions.js +34 -0
- package/lib/cjs/components/pageheader.d.ts +3 -0
- package/lib/cjs/components/pageheader.js +51 -0
- package/lib/cjs/components/pagination.d.ts +3 -0
- package/lib/cjs/components/pagination.js +34 -0
- package/lib/cjs/components/placeholder.js +9 -0
- package/lib/cjs/components/popconfirm.js +17 -26
- package/lib/cjs/components/popover.d.ts +3 -0
- package/lib/cjs/components/popover.js +41 -0
- package/lib/cjs/components/progress.d.ts +3 -0
- package/lib/cjs/components/progress.js +38 -0
- package/lib/cjs/components/radio.js +25 -8
- package/lib/cjs/components/rate.d.ts +3 -0
- package/lib/cjs/components/rate.js +51 -0
- package/lib/cjs/components/result.d.ts +3 -0
- package/lib/cjs/components/result.js +51 -0
- package/lib/cjs/components/row.js +12 -5
- package/lib/cjs/components/skeleton.d.ts +3 -0
- package/lib/cjs/components/skeleton.js +51 -0
- package/lib/cjs/components/slider.d.ts +2 -0
- package/lib/cjs/components/slider.js +51 -0
- package/lib/cjs/components/spin.d.ts +3 -0
- package/lib/cjs/components/spin.js +37 -0
- package/lib/cjs/components/statistic.d.ts +3 -0
- package/lib/cjs/components/statistic.js +57 -0
- package/lib/cjs/components/switch.d.ts +3 -0
- package/lib/cjs/components/switch.js +34 -0
- package/lib/cjs/components/table.d.ts +7 -0
- package/lib/cjs/components/table.js +37 -0
- package/lib/cjs/components/tabs.d.ts +3 -0
- package/lib/cjs/components/tabs.js +32 -0
- package/lib/cjs/components/tag.d.ts +3 -0
- package/lib/cjs/components/tag.js +34 -0
- package/lib/cjs/components/time-picker.d.ts +3 -0
- package/lib/cjs/components/time-picker.js +33 -0
- package/lib/cjs/components/timeline.d.ts +4 -2
- package/lib/cjs/components/timeline.js +37 -1
- package/lib/cjs/components/tooltip.d.ts +2 -0
- package/lib/cjs/components/tooltip.js +41 -0
- package/lib/cjs/components/transfer.d.ts +3 -0
- package/lib/cjs/components/transfer.js +51 -0
- package/lib/cjs/components/tree-select.d.ts +7 -0
- package/lib/cjs/components/tree-select.js +34 -0
- package/lib/cjs/components/tree.d.ts +7 -0
- package/lib/cjs/components/tree.js +32 -0
- package/lib/cjs/components/typography.js +2 -1
- package/lib/cjs/components/upload.d.ts +3 -0
- package/lib/cjs/components/upload.js +50 -0
- package/lib/cjs/prototypes/anchor.js +1 -0
- package/lib/cjs/prototypes/auto-complete.js +6 -5
- package/lib/cjs/prototypes/breadcrumb.js +33 -4
- package/lib/cjs/prototypes/descriptions.js +12 -0
- package/lib/cjs/prototypes/divider.js +1 -1
- package/lib/cjs/prototypes/modal.js +1 -0
- package/lib/cjs/prototypes/page-header.js +2 -1
- package/lib/cjs/prototypes/radio.js +11 -10
- package/lib/cjs/prototypes/slider.js +1 -1
- package/lib/cjs/prototypes/steps.js +6 -5
- package/lib/cjs/prototypes/tabs.js +2 -1
- package/lib/cjs/prototypes/tree-select.js +7 -6
- package/lib/esm/components/affix.d.ts +1 -0
- package/lib/esm/components/affix.js +16 -0
- package/lib/esm/components/alert.d.ts +3 -0
- package/lib/esm/components/alert.js +29 -0
- package/lib/esm/components/anchor.d.ts +3 -0
- package/lib/esm/components/anchor.js +44 -0
- package/lib/esm/components/auto-complete.d.ts +7 -0
- package/lib/esm/components/auto-complete.js +31 -0
- package/lib/esm/components/avatar.d.ts +3 -0
- package/lib/esm/components/avatar.js +31 -0
- package/lib/esm/components/badge.d.ts +3 -0
- package/lib/esm/components/badge.js +34 -0
- package/lib/esm/components/calendar.d.ts +3 -0
- package/lib/esm/components/calendar.js +31 -0
- package/lib/esm/components/card.d.ts +3 -0
- package/lib/esm/components/card.js +31 -0
- package/lib/esm/components/carousel.d.ts +3 -0
- package/lib/esm/components/carousel.js +29 -0
- package/lib/esm/components/checkbox.js +17 -3
- package/lib/esm/components/collapse.d.ts +4 -2
- package/lib/esm/components/collapse.js +25 -1
- package/lib/esm/components/comment.d.ts +3 -0
- package/lib/esm/components/comment.js +33 -0
- package/lib/esm/components/date-picker.d.ts +1 -1
- package/lib/esm/components/date-picker.js +23 -5
- package/lib/esm/components/descriptions.d.ts +3 -0
- package/lib/esm/components/descriptions.js +29 -0
- package/lib/esm/components/divider.d.ts +3 -0
- package/lib/esm/components/divider.js +31 -0
- package/lib/esm/components/drawer.js +1 -2
- package/lib/esm/components/empty.d.ts +3 -0
- package/lib/esm/components/empty.js +31 -0
- package/lib/esm/components/image.d.ts +3 -0
- package/lib/esm/components/image.js +32 -0
- package/lib/esm/components/index.d.ts +34 -0
- package/lib/esm/components/index.js +35 -0
- package/lib/esm/components/input-number.js +27 -24
- package/lib/esm/components/mentions.d.ts +3 -0
- package/lib/esm/components/mentions.js +31 -0
- package/lib/esm/components/pageheader.d.ts +3 -0
- package/lib/esm/components/pageheader.js +48 -0
- package/lib/esm/components/pagination.d.ts +3 -0
- package/lib/esm/components/pagination.js +31 -0
- package/lib/esm/components/placeholder.js +9 -0
- package/lib/esm/components/popconfirm.js +18 -27
- package/lib/esm/components/popover.d.ts +3 -0
- package/lib/esm/components/popover.js +38 -0
- package/lib/esm/components/progress.d.ts +3 -0
- package/lib/esm/components/progress.js +35 -0
- package/lib/esm/components/radio.js +25 -8
- package/lib/esm/components/rate.d.ts +3 -0
- package/lib/esm/components/rate.js +48 -0
- package/lib/esm/components/result.d.ts +3 -0
- package/lib/esm/components/result.js +48 -0
- package/lib/esm/components/row.js +12 -5
- package/lib/esm/components/skeleton.d.ts +3 -0
- package/lib/esm/components/skeleton.js +48 -0
- package/lib/esm/components/slider.d.ts +2 -0
- package/lib/esm/components/slider.js +48 -0
- package/lib/esm/components/spin.d.ts +3 -0
- package/lib/esm/components/spin.js +34 -0
- package/lib/esm/components/statistic.d.ts +3 -0
- package/lib/esm/components/statistic.js +54 -0
- package/lib/esm/components/switch.d.ts +3 -0
- package/lib/esm/components/switch.js +31 -0
- package/lib/esm/components/table.d.ts +7 -0
- package/lib/esm/components/table.js +34 -0
- package/lib/esm/components/tabs.d.ts +3 -0
- package/lib/esm/components/tabs.js +29 -0
- package/lib/esm/components/tag.d.ts +3 -0
- package/lib/esm/components/tag.js +31 -0
- package/lib/esm/components/time-picker.d.ts +3 -0
- package/lib/esm/components/time-picker.js +30 -0
- package/lib/esm/components/timeline.d.ts +4 -2
- package/lib/esm/components/timeline.js +37 -1
- package/lib/esm/components/tooltip.d.ts +2 -0
- package/lib/esm/components/tooltip.js +38 -0
- package/lib/esm/components/transfer.d.ts +3 -0
- package/lib/esm/components/transfer.js +48 -0
- package/lib/esm/components/tree-select.d.ts +7 -0
- package/lib/esm/components/tree-select.js +31 -0
- package/lib/esm/components/tree.d.ts +7 -0
- package/lib/esm/components/tree.js +29 -0
- package/lib/esm/components/typography.js +2 -1
- package/lib/esm/components/upload.d.ts +3 -0
- package/lib/esm/components/upload.js +47 -0
- package/lib/esm/prototypes/anchor.js +1 -0
- package/lib/esm/prototypes/auto-complete.js +6 -5
- package/lib/esm/prototypes/breadcrumb.js +33 -4
- package/lib/esm/prototypes/descriptions.js +12 -0
- package/lib/esm/prototypes/divider.js +1 -1
- package/lib/esm/prototypes/modal.js +1 -0
- package/lib/esm/prototypes/page-header.js +2 -1
- package/lib/esm/prototypes/radio.js +11 -10
- package/lib/esm/prototypes/slider.js +1 -1
- package/lib/esm/prototypes/steps.js +6 -5
- package/lib/esm/prototypes/tabs.js +2 -1
- package/lib/esm/prototypes/tree-select.js +7 -6
- package/package.json +2 -2
@@ -0,0 +1,2 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export declare const Slider: React.ForwardRefExoticComponent<(Omit<import("antd").SliderSingleProps & React.RefAttributes<unknown> & import("@music163/tango-boot").TangoComponentProps, "ref"> | Omit<import("antd/lib/slider").SliderRangeProps & React.RefAttributes<unknown> & import("@music163/tango-boot").TangoComponentProps, "ref">) & React.RefAttributes<unknown>>;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Slider as AntSlider } 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 SliderDesigner(_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 rateRef = useRef(null);
|
9
|
+
// 监听弹层显示事件
|
10
|
+
// const handleVisibleChange = (visible: boolean) => {
|
11
|
+
// console.log('handleVisibleChange', visible);
|
12
|
+
// if (visible) {
|
13
|
+
// // 使用微任务确保弹层已渲染
|
14
|
+
// Promise.resolve().then(() => {
|
15
|
+
// const popoverNode = document.querySelector('.ant-popover-placement-top');
|
16
|
+
// console.log('popoverNode' ,popoverNode)
|
17
|
+
// if (popoverNode) {
|
18
|
+
// popoverNode.setAttribute('data-dnd', dataDnd);
|
19
|
+
// popoverNode.setAttribute('data-id', dataId);
|
20
|
+
// }
|
21
|
+
// });
|
22
|
+
// }
|
23
|
+
// };
|
24
|
+
useEffect(() => {
|
25
|
+
Promise.resolve().then(() => {
|
26
|
+
const popoverNode = document.querySelector(`.${dataId}`);
|
27
|
+
console.log('rate', popoverNode);
|
28
|
+
if (popoverNode) {
|
29
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
30
|
+
popoverNode.setAttribute('data-id', dataId);
|
31
|
+
popoverNode.setAttribute('draggable', 'true');
|
32
|
+
}
|
33
|
+
});
|
34
|
+
}, [dataDnd, dataId]);
|
35
|
+
return (React.createElement("div", { ref: rateRef },
|
36
|
+
React.createElement(AntSlider, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest))));
|
37
|
+
}
|
38
|
+
export const Slider = defineComponent(AntSlider, {
|
39
|
+
name: 'Slider',
|
40
|
+
designerConfig: {
|
41
|
+
render({ designerProps, originalProps }) {
|
42
|
+
console.log("Slider: designerProps:", designerProps, "originalProps:", originalProps);
|
43
|
+
return React.createElement(SliderDesigner, Object.assign({ title: "\u4E00\u7EA7\u6807\u9898" }, designerProps, originalProps));
|
44
|
+
},
|
45
|
+
},
|
46
|
+
// designerConfig: {
|
47
|
+
// },
|
48
|
+
});
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Spin as AntSpin } 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 SpinDesigner(_a) {
|
7
|
+
var { children, spinning } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["children", "spinning", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
const spinRef = 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: spinRef },
|
21
|
+
React.createElement(AntSpin, Object.assign({ className: dataId, spinning: spinning,
|
22
|
+
// data-dnd={dataDnd}
|
23
|
+
// data-id={dataId}
|
24
|
+
style: style }, rest), children)));
|
25
|
+
}
|
26
|
+
export const Spin = defineComponent(AntSpin, {
|
27
|
+
name: 'Spin',
|
28
|
+
designerConfig: {
|
29
|
+
render({ designerProps, originalProps }) {
|
30
|
+
// console.log("Spin: designerProps:", designerProps, "originalProps:", originalProps);
|
31
|
+
return React.createElement(SpinDesigner, Object.assign({ spinning: true }, designerProps, originalProps));
|
32
|
+
},
|
33
|
+
},
|
34
|
+
});
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Statistic as AntStatistic } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useEffect } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
function StatisticDesigner(_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 statisticRef = useRef<HTMLDivElement>(null);
|
9
|
+
// 监听弹层显示事件
|
10
|
+
// const handleVisibleChange = (visible: boolean) => {
|
11
|
+
// console.log('handleVisibleChange', visible);
|
12
|
+
// if (visible) {
|
13
|
+
// // 使用微任务确保弹层已渲染
|
14
|
+
// Promise.resolve().then(() => {
|
15
|
+
// const popoverNode = document.querySelector('.ant-popover-placement-top');
|
16
|
+
// console.log('popoverNode' ,popoverNode)
|
17
|
+
// if (popoverNode) {
|
18
|
+
// popoverNode.setAttribute('data-dnd', dataDnd);
|
19
|
+
// popoverNode.setAttribute('data-id', dataId);
|
20
|
+
// }
|
21
|
+
// });
|
22
|
+
// }
|
23
|
+
// };
|
24
|
+
useEffect(() => {
|
25
|
+
Promise.resolve().then(() => {
|
26
|
+
const popoverNode = document.querySelector(`.${dataId}`);
|
27
|
+
console.log('rate', popoverNode);
|
28
|
+
if (popoverNode) {
|
29
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
30
|
+
popoverNode.setAttribute('data-id', dataId);
|
31
|
+
popoverNode.setAttribute('draggable', 'true');
|
32
|
+
}
|
33
|
+
});
|
34
|
+
}, [dataDnd, dataId]);
|
35
|
+
return (
|
36
|
+
// <div ref={statisticRef}>
|
37
|
+
React.createElement(AntStatistic, Object.assign({ className: dataId,
|
38
|
+
// data-dnd={dataDnd}
|
39
|
+
// data-id={dataId}
|
40
|
+
style: style }, rest))
|
41
|
+
// </div>
|
42
|
+
);
|
43
|
+
}
|
44
|
+
export const Statistic = defineComponent(AntStatistic, {
|
45
|
+
name: 'Statistic',
|
46
|
+
designerConfig: {
|
47
|
+
render({ designerProps, originalProps }) {
|
48
|
+
console.log("Statistic: designerProps:", designerProps, "originalProps:", originalProps);
|
49
|
+
return React.createElement(StatisticDesigner, Object.assign({ title: "\u4E00\u7EA7\u6807\u9898" }, designerProps, originalProps));
|
50
|
+
},
|
51
|
+
},
|
52
|
+
// designerConfig: {
|
53
|
+
// },
|
54
|
+
});
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Switch as AntSwitch } 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 SwitchDesigner(_a) {
|
7
|
+
var _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
const switchRef = 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: switchRef },
|
21
|
+
React.createElement(AntSwitch, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest))));
|
22
|
+
}
|
23
|
+
export const Switch = defineComponent(AntSwitch, {
|
24
|
+
name: 'Switch',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
// console.log("Switch: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(SwitchDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
}
|
30
|
+
}
|
31
|
+
});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { TableProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
export declare const Table: React.ForwardRefExoticComponent<Omit<TableProps<object> & {
|
4
|
+
children?: React.ReactNode;
|
5
|
+
} & {
|
6
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
7
|
+
} & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Table as AntTable } 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 TableDesigner(_a) {
|
7
|
+
var { children, columns, dataSource } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, ["children", "columns", "dataSource", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
const tableRef = 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: tableRef },
|
21
|
+
React.createElement(AntTable, Object.assign({ className: dataId, columns: columns, dataSource: dataSource,
|
22
|
+
// data-dnd={dataDnd}
|
23
|
+
// data-id={dataId}
|
24
|
+
style: style }, rest), children)));
|
25
|
+
}
|
26
|
+
export const Table = defineComponent(AntTable, {
|
27
|
+
name: 'Table',
|
28
|
+
designerConfig: {
|
29
|
+
render({ designerProps, originalProps }) {
|
30
|
+
// console.log("Table: designerProps:", designerProps, "originalProps:", originalProps);
|
31
|
+
return React.createElement(TableDesigner, Object.assign({}, designerProps, originalProps));
|
32
|
+
}
|
33
|
+
}
|
34
|
+
});
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Tabs as AntTabs } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useEffect } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
function TabsDesigner(_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(AntTabs, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children));
|
20
|
+
}
|
21
|
+
export const Tabs = defineComponent(AntTabs, {
|
22
|
+
name: 'Tabs',
|
23
|
+
designerConfig: {
|
24
|
+
render({ designerProps, originalProps }) {
|
25
|
+
console.log("Tabs: designerProps:", designerProps, "originalProps:", originalProps);
|
26
|
+
return React.createElement(TabsDesigner, Object.assign({}, designerProps, originalProps));
|
27
|
+
},
|
28
|
+
},
|
29
|
+
});
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Tag as AntTag } 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 TagDesigner(_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
|
+
const tagRef = 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: tagRef },
|
21
|
+
React.createElement(AntTag, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children)));
|
22
|
+
}
|
23
|
+
export const Tag = defineComponent(AntTag, {
|
24
|
+
name: 'Tag',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
// console.log("Tag: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(TagDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
}
|
30
|
+
}
|
31
|
+
});
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { TimePickerProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
export declare const TimePicker: React.ForwardRefExoticComponent<Omit<TimePickerProps & React.RefAttributes<any> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { TimePicker as AntTimePicker } 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 TimePickerDesigner(_a) {
|
7
|
+
var _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
const timePickerRef = 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(AntTimePicker, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest)));
|
21
|
+
}
|
22
|
+
export const TimePicker = defineComponent(AntTimePicker, {
|
23
|
+
name: 'TimePicker',
|
24
|
+
designerConfig: {
|
25
|
+
render({ designerProps, originalProps }) {
|
26
|
+
// console.log("TimePicker: designerProps:", designerProps, "originalProps:", originalProps);
|
27
|
+
return React.createElement(TimePickerDesigner, Object.assign({}, designerProps, originalProps));
|
28
|
+
}
|
29
|
+
}
|
30
|
+
});
|
@@ -1,2 +1,4 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import { TimelineProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
export declare const Timeline: React.ForwardRefExoticComponent<TimelineProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
|
4
|
+
export declare const TimelineItem: React.ForwardRefExoticComponent<import("antd").TimelineItemProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
|
@@ -1,7 +1,43 @@
|
|
1
1
|
import { defineComponent } from '@music163/tango-boot';
|
2
2
|
import { Timeline as AntTimeline } from 'antd';
|
3
|
+
// function TimelineDesigner({
|
4
|
+
// children,
|
5
|
+
// [SLOT.dnd]: dataDnd,
|
6
|
+
// [SLOT.id]: dataId,
|
7
|
+
// style,
|
8
|
+
// ...rest
|
9
|
+
// }: TimelineProps & { [key: string]: any; dnd?: string; children?: React.ReactNode }) {
|
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
|
+
// return (
|
22
|
+
// <AntTimeline
|
23
|
+
// className={dataId}
|
24
|
+
// // data-dnd={dataDnd}
|
25
|
+
// // data-id={dataId}
|
26
|
+
// style={style}
|
27
|
+
// {...rest}
|
28
|
+
// >
|
29
|
+
// {children}
|
30
|
+
// </AntTimeline>
|
31
|
+
// );
|
32
|
+
// }
|
3
33
|
export const Timeline = defineComponent(AntTimeline, {
|
4
|
-
name: 'Timeline'
|
34
|
+
name: 'Timeline',
|
35
|
+
// designerConfig: {
|
36
|
+
// render({ designerProps, originalProps }) {
|
37
|
+
// console.log("Timeline: designerProps:", designerProps, "originalProps:", originalProps);
|
38
|
+
// return <TimelineDesigner {...designerProps} {...originalProps} />;
|
39
|
+
// },
|
40
|
+
// },
|
5
41
|
});
|
6
42
|
export const TimelineItem = defineComponent(AntTimeline.Item, {
|
7
43
|
name: 'TimelineItem',
|
@@ -0,0 +1,2 @@
|
|
1
|
+
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>>;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Tooltip as AntTooltip } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useRef } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
function TooltipDesigner(_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 tooltipRef = 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: tooltipRef },
|
26
|
+
React.createElement(AntTooltip, Object.assign({ title: title, id: dataId, onOpenChange: handleVisibleChange }, rest), children)));
|
27
|
+
}
|
28
|
+
export const Tooltip = defineComponent(AntTooltip, {
|
29
|
+
name: 'Tooltip',
|
30
|
+
designerConfig: {
|
31
|
+
render({ designerProps, originalProps }) {
|
32
|
+
console.log("Tooltip: designerProps:", designerProps, "originalProps:", originalProps);
|
33
|
+
return React.createElement(TooltipDesigner, Object.assign({ title: "Are you sure?" }, designerProps, originalProps));
|
34
|
+
},
|
35
|
+
},
|
36
|
+
// designerConfig: {
|
37
|
+
// },
|
38
|
+
});
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Transfer as AntTransfer } 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 TransferDesigner(_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 transferRef = useRef(null);
|
9
|
+
// 监听弹层显示事件
|
10
|
+
// const handleVisibleChange = (visible: boolean) => {
|
11
|
+
// console.log('handleVisibleChange', visible);
|
12
|
+
// if (visible) {
|
13
|
+
// // 使用微任务确保弹层已渲染
|
14
|
+
// Promise.resolve().then(() => {
|
15
|
+
// const popoverNode = document.querySelector('.ant-popover-placement-top');
|
16
|
+
// console.log('popoverNode' ,popoverNode)
|
17
|
+
// if (popoverNode) {
|
18
|
+
// popoverNode.setAttribute('data-dnd', dataDnd);
|
19
|
+
// popoverNode.setAttribute('data-id', dataId);
|
20
|
+
// }
|
21
|
+
// });
|
22
|
+
// }
|
23
|
+
// };
|
24
|
+
useEffect(() => {
|
25
|
+
Promise.resolve().then(() => {
|
26
|
+
const popoverNode = document.querySelector(`.${dataId}`);
|
27
|
+
console.log('rate', popoverNode);
|
28
|
+
if (popoverNode) {
|
29
|
+
popoverNode.setAttribute('data-dnd', dataDnd);
|
30
|
+
popoverNode.setAttribute('data-id', dataId);
|
31
|
+
popoverNode.setAttribute('draggable', 'true');
|
32
|
+
}
|
33
|
+
});
|
34
|
+
}, [dataDnd, dataId]);
|
35
|
+
return (React.createElement("div", { ref: transferRef },
|
36
|
+
React.createElement(AntTransfer, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId }, rest))));
|
37
|
+
}
|
38
|
+
export const Transfer = defineComponent(AntTransfer, {
|
39
|
+
name: 'Transfer',
|
40
|
+
designerConfig: {
|
41
|
+
render({ designerProps, originalProps }) {
|
42
|
+
console.log("Transfer: designerProps:", designerProps, "originalProps:", originalProps);
|
43
|
+
return React.createElement(TransferDesigner, Object.assign({ title: "\u4E00\u7EA7\u6807\u9898" }, designerProps, originalProps));
|
44
|
+
},
|
45
|
+
},
|
46
|
+
// designerConfig: {
|
47
|
+
// },
|
48
|
+
});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { TreeSelectProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
export declare const TreeSelect: React.ForwardRefExoticComponent<Omit<TreeSelectProps<unknown, import("rc-tree-select/lib/TreeSelect").DefaultOptionType | import("rc-tree-select/lib/TreeSelect").BaseOptionType> & {
|
4
|
+
children?: React.ReactNode;
|
5
|
+
} & {
|
6
|
+
ref?: React.Ref<import("antd").RefSelectProps> | undefined;
|
7
|
+
} & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { TreeSelect as AntTreeSelect } 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 TreeSelectDesigner(_a) {
|
7
|
+
var _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
8
|
+
const treeselectRef = 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: treeselectRef },
|
21
|
+
React.createElement(AntTreeSelect, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest))));
|
22
|
+
}
|
23
|
+
export const TreeSelect = defineComponent(AntTreeSelect, {
|
24
|
+
name: 'TreeSelect',
|
25
|
+
designerConfig: {
|
26
|
+
render({ designerProps, originalProps }) {
|
27
|
+
// console.log("TreeSelect: designerProps:", designerProps, "originalProps:", originalProps);
|
28
|
+
return React.createElement(TreeSelectDesigner, Object.assign({}, designerProps, originalProps));
|
29
|
+
}
|
30
|
+
}
|
31
|
+
});
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { TreeProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
export declare const Tree: React.ForwardRefExoticComponent<Omit<TreeProps<import("rc-tree").BasicDataNode | import("antd").TreeDataNode> & {
|
4
|
+
children?: React.ReactNode | undefined;
|
5
|
+
} & {
|
6
|
+
ref?: React.Ref<import("rc-tree").default>;
|
7
|
+
} & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { Tree as AntTree } from 'antd';
|
3
|
+
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React, { useEffect } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
6
|
+
function TreeDesigner(_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(AntTree, Object.assign({ className: dataId, "data-dnd": dataDnd, "data-id": dataId, style: style }, rest), children));
|
20
|
+
}
|
21
|
+
export const Tree = defineComponent(AntTree, {
|
22
|
+
name: 'Tree',
|
23
|
+
designerConfig: {
|
24
|
+
render({ designerProps, originalProps }) {
|
25
|
+
// console.log("Tree: designerProps:", designerProps, "originalProps:", originalProps);
|
26
|
+
return React.createElement(TreeDesigner, Object.assign({}, designerProps, originalProps));
|
27
|
+
}
|
28
|
+
}
|
29
|
+
});
|
@@ -15,7 +15,8 @@ export const Typography = defineComponent(AntTypography, {
|
|
15
15
|
name: 'Typography',
|
16
16
|
designerConfig: {
|
17
17
|
defaultProps: {
|
18
|
-
children: React.createElement(
|
18
|
+
children: React.createElement("div", null,
|
19
|
+
React.createElement(Placeholder, { placeholder: "\u6DFB\u52A0\u6807\u9898\u6216\u6BB5\u843D\u5230\u8FD9\u91CC" })),
|
19
20
|
},
|
20
21
|
},
|
21
22
|
});
|