@cuvp1225/antd 0.1.19-beta.12 → 0.1.19-beta.14
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 +37 -4
- package/dist/index.js +37 -4
- package/lib/cjs/components/anchor.d.ts +4 -1
- package/lib/cjs/components/anchor.js +13 -43
- package/lib/cjs/components/backTop.d.ts +6 -0
- package/lib/cjs/components/backTop.js +17 -0
- package/lib/cjs/components/carousel.d.ts +4 -1
- package/lib/cjs/components/carousel.js +55 -27
- package/lib/cjs/components/descriptions.js +0 -47
- package/lib/cjs/components/index.d.ts +3 -0
- package/lib/cjs/components/index.js +9 -3
- package/lib/cjs/components/popconfirm.d.ts +4 -1
- package/lib/cjs/components/popconfirm.js +72 -36
- package/lib/cjs/components/popover.d.ts +4 -1
- package/lib/cjs/components/popover.js +13 -36
- package/lib/cjs/components/radio.js +2 -56
- package/lib/cjs/components/tooltip.d.ts +5 -1
- package/lib/cjs/components/tooltip.js +13 -36
- package/lib/cjs/components/upload.js +0 -63
- package/lib/esm/components/anchor.d.ts +4 -1
- package/lib/esm/components/anchor.js +11 -42
- package/lib/esm/components/backTop.d.ts +6 -0
- package/lib/esm/components/backTop.js +13 -0
- package/lib/esm/components/carousel.d.ts +4 -1
- package/lib/esm/components/carousel.js +54 -27
- package/lib/esm/components/descriptions.js +0 -47
- package/lib/esm/components/index.d.ts +3 -0
- package/lib/esm/components/index.js +4 -2
- package/lib/esm/components/popconfirm.d.ts +4 -1
- package/lib/esm/components/popconfirm.js +71 -36
- package/lib/esm/components/popover.d.ts +4 -1
- package/lib/esm/components/popover.js +12 -36
- package/lib/esm/components/radio.js +2 -56
- package/lib/esm/components/tooltip.d.ts +5 -1
- package/lib/esm/components/tooltip.js +12 -36
- package/lib/esm/components/upload.js +0 -63
- package/package.json +2 -2
@@ -1,54 +1,7 @@
|
|
1
1
|
"use strict";
|
2
|
-
// import { Descriptions as AntDescriptions, DescriptionsProps } from 'antd';
|
3
|
-
// import { defineComponent } from '@music163/tango-boot';
|
4
|
-
// import React, { useEffect} from 'react';
|
5
|
-
// import { SLOT } from '@music163/tango-helpers';
|
6
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
7
3
|
exports.Descriptions = void 0;
|
8
4
|
const tslib_1 = require("tslib");
|
9
|
-
// function DescriptionsDesigner({
|
10
|
-
// items,
|
11
|
-
// [SLOT.dnd]: dataDnd,
|
12
|
-
// [SLOT.id]: dataId,
|
13
|
-
// style,
|
14
|
-
// ...rest
|
15
|
-
// }: DescriptionsProps & { [key: string]: any; dnd?: string; children?: React.ReactNode }) {
|
16
|
-
// useEffect(() => {
|
17
|
-
// Promise.resolve().then(() => {
|
18
|
-
// const popoverNode = document.querySelector(`.${dataId}`);
|
19
|
-
// console.log('spinNode', popoverNode);
|
20
|
-
// if (popoverNode) {
|
21
|
-
// popoverNode.setAttribute('data-dnd', dataDnd);
|
22
|
-
// popoverNode.setAttribute('data-id', dataId);
|
23
|
-
// popoverNode.setAttribute('draggable', 'true');
|
24
|
-
// }
|
25
|
-
// });
|
26
|
-
// }, [dataDnd, dataId]);
|
27
|
-
// return (
|
28
|
-
// <AntDescriptions
|
29
|
-
// className={dataId}
|
30
|
-
// data-dnd={dataDnd}
|
31
|
-
// data-id={dataId}
|
32
|
-
// style={style}
|
33
|
-
// {...rest}
|
34
|
-
// >
|
35
|
-
// {items.map((item: { label:string; value: string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal; }) => (
|
36
|
-
// <AntDescriptions.Item label={item.label} key={item.label}>
|
37
|
-
// {item.value}
|
38
|
-
// </AntDescriptions.Item>
|
39
|
-
// ))}
|
40
|
-
// </AntDescriptions>
|
41
|
-
// );
|
42
|
-
// }
|
43
|
-
// export const Descriptions = defineComponent(AntDescriptions, {
|
44
|
-
// name: 'Descriptions',
|
45
|
-
// designerConfig: {
|
46
|
-
// render({ designerProps, originalProps }) {
|
47
|
-
// console.log("Descriptions: designerProps:", designerProps, "originalProps:", originalProps);
|
48
|
-
// return <DescriptionsDesigner {...designerProps} {...originalProps} />;
|
49
|
-
// },
|
50
|
-
// },
|
51
|
-
// });
|
52
5
|
const antd_1 = require("antd");
|
53
6
|
const react_1 = tslib_1.__importDefault(require("react"));
|
54
7
|
const slottype_1 = require("../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,4 @@ 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';
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.Alert = exports.Tree = exports.Descriptions = exports.Image = exports.TreeSelect = exports.Mentions = exports.AutoComplete = exports.Switch = exports.PageHeader = exports.Statistic = exports.Transfer = exports.TimePicker = exports.Comment = exports.Rate = exports.Slider = exports.Empty = exports.Avatar = exports.Card = exports.Table = exports.Pagination = exports.Badge = exports.Divider = exports.Calendar = exports.Spin = exports.Skeleton = exports.Upload = exports.DropdownButton = exports.Dropdown = exports.Collapse = exports.Cascader = exports.CheckboxGroup = exports.Checkbox = exports.RadioGroup = exports.Radio = exports.DatePicker = exports.Drawer = exports.Result = exports.Popover = exports.Popconfirm = exports.Space = exports.Select = exports.Password = exports.TextArea = exports.Input = exports.InputNumber = exports.ButtonGroup = exports.Button = exports.Box = exports.When = exports.Each = void 0;
|
4
|
+
exports.BackTop = exports.Progress = void 0;
|
4
5
|
const tslib_1 = require("tslib");
|
5
6
|
tslib_1.__exportStar(require("antd"), exports);
|
6
7
|
//以下组件都从antd中导出,解决下述组件卡顿问题
|
@@ -32,8 +33,10 @@ var space_1 = require("./space");
|
|
32
33
|
Object.defineProperty(exports, "Space", { enumerable: true, get: function () { return space_1.Space; } });
|
33
34
|
//export { Typography, Title, Paragraph,Text } from './typography';
|
34
35
|
//export { Columns, Column } from './columns';
|
35
|
-
|
36
|
-
|
36
|
+
var popconfirm_1 = require("./popconfirm");
|
37
|
+
Object.defineProperty(exports, "Popconfirm", { enumerable: true, get: function () { return popconfirm_1.Popconfirm; } });
|
38
|
+
var popover_1 = require("./popover");
|
39
|
+
Object.defineProperty(exports, "Popover", { enumerable: true, get: function () { return popover_1.Popover; } });
|
37
40
|
//export {Tooltip} from './tooltip';
|
38
41
|
//export {Result} from './result';
|
39
42
|
//export {Result} from './result1';
|
@@ -127,6 +130,9 @@ var alert_1 = require("./alert");
|
|
127
130
|
Object.defineProperty(exports, "Alert", { enumerable: true, get: function () { return alert_1.Alert; } });
|
128
131
|
var progress_1 = require("./progress");
|
129
132
|
Object.defineProperty(exports, "Progress", { enumerable: true, get: function () { return progress_1.Progress; } });
|
133
|
+
var backTop_1 = require("./backTop");
|
134
|
+
Object.defineProperty(exports, "BackTop", { enumerable: true, get: function () { return backTop_1.BackTop; } });
|
135
|
+
//export { AntdIcon } from './icon'
|
130
136
|
//export {Affix} from './affix';
|
131
137
|
//import * as echarts from 'echarts';
|
132
138
|
//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:
|
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,41 +1,77 @@
|
|
1
1
|
"use strict";
|
2
|
+
// import { Popconfirm as AntPopconfirm, PopconfirmProps } from 'antd';
|
3
|
+
// //import { CloseOutlined } from '@ant-design/icons';
|
4
|
+
// import CloseOutlined from '@ant-design/icons/CloseOutlined';
|
5
|
+
// import { defineComponent } from '@music163/tango-boot';
|
6
|
+
// import { Button } from './button';
|
7
|
+
// import React, { useEffect, useRef } from 'react';
|
8
|
+
// import { ShadowContainer } from './shadow-container';
|
9
|
+
// import { SLOT } from '@music163/tango-helpers';
|
10
|
+
// function PopconfirmDesigner({
|
11
|
+
// children,
|
12
|
+
// title,
|
13
|
+
// [SLOT.dnd]:dataDnd,
|
14
|
+
// [SLOT.id]:dataId,
|
15
|
+
// style,
|
16
|
+
// ...rest
|
17
|
+
// }: PopconfirmProps& { [key: string]: any, // 添加索引签名
|
18
|
+
// dnd?: string, children?: React.ReactNode }) {
|
19
|
+
// const popconfirmRef = useRef<HTMLDivElement>(null);
|
2
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
21
|
exports.Popconfirm = void 0;
|
4
22
|
const tslib_1 = require("tslib");
|
23
|
+
// // 监听弹层显示事件
|
24
|
+
// const handleVisibleChange = (visible: boolean) => {
|
25
|
+
// console.log('handleVisibleChange', visible);
|
26
|
+
// if (visible) {
|
27
|
+
// // 使用微任务确保弹层已渲染
|
28
|
+
// Promise.resolve().then(() => {
|
29
|
+
// const popoverNode = document.querySelector(`#${dataId}`);
|
30
|
+
// console.log('popoverNode' ,popoverNode)
|
31
|
+
// if (popoverNode) {
|
32
|
+
// popoverNode.setAttribute('data-dnd', dataDnd);
|
33
|
+
// popoverNode.setAttribute('data-id', dataId);
|
34
|
+
// popoverNode.setAttribute('draggable', 'true');
|
35
|
+
// }
|
36
|
+
// });
|
37
|
+
// }
|
38
|
+
// };
|
39
|
+
// return (
|
40
|
+
// <div ref={popconfirmRef}>
|
41
|
+
// <AntPopconfirm
|
42
|
+
// id={dataId}
|
43
|
+
// className={dataId}
|
44
|
+
// title={title}
|
45
|
+
// onOpenChange={handleVisibleChange}
|
46
|
+
// {...rest}
|
47
|
+
// >
|
48
|
+
// {children}
|
49
|
+
// </AntPopconfirm>
|
50
|
+
// </div>
|
51
|
+
// );
|
52
|
+
// }
|
53
|
+
// export const Popconfirm = defineComponent(AntPopconfirm, {
|
54
|
+
// name: 'Popconfirm',
|
55
|
+
// designerConfig: {
|
56
|
+
// render({ designerProps, originalProps }) {
|
57
|
+
// console.log("Popconfirm: designerProps:",designerProps,"originalProps:",originalProps)
|
58
|
+
// return <PopconfirmDesigner title="Are you sure?" {...designerProps} {...originalProps} />;
|
59
|
+
// },
|
60
|
+
// },
|
61
|
+
// // designerConfig: {
|
62
|
+
// // },
|
63
|
+
// });
|
5
64
|
const antd_1 = require("antd");
|
6
|
-
const
|
7
|
-
const
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
//
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
console.log('popoverNode', popoverNode);
|
20
|
-
if (popoverNode) {
|
21
|
-
popoverNode.setAttribute('data-dnd', dataDnd);
|
22
|
-
popoverNode.setAttribute('data-id', dataId);
|
23
|
-
popoverNode.setAttribute('draggable', 'true');
|
24
|
-
}
|
25
|
-
});
|
26
|
-
}
|
27
|
-
};
|
28
|
-
return (react_1.default.createElement("div", { ref: popconfirmRef },
|
29
|
-
react_1.default.createElement(antd_1.Popconfirm, Object.assign({ id: dataId, className: dataId, title: title, onOpenChange: handleVisibleChange }, rest), children)));
|
30
|
-
}
|
31
|
-
exports.Popconfirm = (0, tango_boot_1.defineComponent)(antd_1.Popconfirm, {
|
32
|
-
name: 'Popconfirm',
|
33
|
-
designerConfig: {
|
34
|
-
render({ designerProps, originalProps }) {
|
35
|
-
console.log("Popconfirm: designerProps:", designerProps, "originalProps:", originalProps);
|
36
|
-
return react_1.default.createElement(PopconfirmDesigner, Object.assign({ title: "Are you sure?" }, designerProps, originalProps));
|
37
|
-
},
|
38
|
-
},
|
39
|
-
// designerConfig: {
|
40
|
-
// },
|
41
|
-
});
|
65
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
66
|
+
const slottype_1 = require("../helpers/slottype");
|
67
|
+
const Popconfirm = (_a) => {
|
68
|
+
var
|
69
|
+
//items,
|
70
|
+
_b = slottype_1.SLOT.id,
|
71
|
+
//items,
|
72
|
+
dataId = _a[_b], _c = slottype_1.SLOT.dnd, dataDnd = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
73
|
+
//console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
|
74
|
+
return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
|
75
|
+
react_1.default.createElement(antd_1.Popconfirm, Object.assign({ title: '确认吗' }, rest), rest.children)));
|
76
|
+
};
|
77
|
+
exports.Popconfirm = Popconfirm;
|
@@ -1,3 +1,6 @@
|
|
1
1
|
import { PopoverProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
export declare const Popover:
|
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;
|
@@ -3,39 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Popover = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const antd_1 = require("antd");
|
6
|
-
const
|
7
|
-
const
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
//
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
console.log('popoverNode', popoverNode);
|
20
|
-
if (popoverNode) {
|
21
|
-
popoverNode.setAttribute('data-dnd', dataDnd);
|
22
|
-
popoverNode.setAttribute('data-id', dataId);
|
23
|
-
popoverNode.setAttribute('draggable', 'true');
|
24
|
-
}
|
25
|
-
});
|
26
|
-
}
|
27
|
-
};
|
28
|
-
return (react_1.default.createElement("div", { ref: popoverRef },
|
29
|
-
react_1.default.createElement(antd_1.Popover, Object.assign({ id: dataId, title: title, onOpenChange: handleVisibleChange }, rest), children)));
|
30
|
-
}
|
31
|
-
exports.Popover = (0, tango_boot_1.defineComponent)(antd_1.Popover, {
|
32
|
-
name: 'Popover',
|
33
|
-
designerConfig: {
|
34
|
-
render({ designerProps, originalProps }) {
|
35
|
-
console.log("Popover: designerProps:", designerProps, "originalProps:", originalProps);
|
36
|
-
return react_1.default.createElement(PopoverDesigner, Object.assign({ title: "Are you sure?" }, designerProps, originalProps));
|
37
|
-
},
|
38
|
-
},
|
39
|
-
// designerConfig: {
|
40
|
-
// },
|
41
|
-
});
|
6
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
7
|
+
const slottype_1 = require("../helpers/slottype");
|
8
|
+
const Popover = (_a) => {
|
9
|
+
var
|
10
|
+
//items,
|
11
|
+
_b = slottype_1.SLOT.id,
|
12
|
+
//items,
|
13
|
+
dataId = _a[_b], _c = slottype_1.SLOT.dnd, dataDnd = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
14
|
+
//console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
|
15
|
+
return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
|
16
|
+
react_1.default.createElement(antd_1.Popover, Object.assign({ title: '标题' }, rest), rest.children)));
|
17
|
+
};
|
18
|
+
exports.Popover = Popover;
|
@@ -6,65 +6,11 @@ const tango_boot_1 = require("@music163/tango-boot");
|
|
6
6
|
const tango_helpers_1 = require("@music163/tango-helpers");
|
7
7
|
const antd_1 = require("antd");
|
8
8
|
const react_1 = tslib_1.__importDefault(require("react"));
|
9
|
-
// function RadioDesigner({
|
10
|
-
// children,
|
11
|
-
// style,
|
12
|
-
// [SLOT.dnd]: dataDnd,
|
13
|
-
// [SLOT.id]: dataId,
|
14
|
-
// ...rest
|
15
|
-
// }: RadioProps & {
|
16
|
-
// [key: string]: any, // 添加索引签名
|
17
|
-
// dnd?: string, children?: React.ReactNode
|
18
|
-
// }) {
|
19
|
-
// // const radioRef = useRef<HTMLDivElement>(null);
|
20
|
-
// useEffect(() => {
|
21
|
-
// Promise.resolve().then(() => {
|
22
|
-
// const popoverNode = document.querySelector(`.${dataId}`);
|
23
|
-
// console.log('popoverNode', popoverNode);
|
24
|
-
// if (popoverNode) {
|
25
|
-
// popoverNode.setAttribute('data-dnd', dataDnd);
|
26
|
-
// popoverNode.setAttribute('data-id', dataId);
|
27
|
-
// popoverNode.setAttribute('draggable', 'true');
|
28
|
-
// }
|
29
|
-
// });
|
30
|
-
// }, [dataDnd, dataId]);
|
31
|
-
// // const { optionType } = rest;
|
32
|
-
// // if (optionType === 'button') {
|
33
|
-
// // return (
|
34
|
-
// // <div ref={radioRef} className='.ant-radio'>
|
35
|
-
// // <AntRadio.Button {...rest} style={style} >{rest.label}</AntRadio.Button>
|
36
|
-
// // </div>
|
37
|
-
// // );
|
38
|
-
// // }
|
39
|
-
// return (
|
40
|
-
// <AntRadio
|
41
|
-
// {...rest}
|
42
|
-
// style={style}
|
43
|
-
// className={dataId}
|
44
|
-
// data-dnd={dataDnd}
|
45
|
-
// data-id={dataId}
|
46
|
-
// >
|
47
|
-
// {children}
|
48
|
-
// </AntRadio>
|
49
|
-
// );
|
50
|
-
// }
|
51
|
-
// export const Radio = defineComponent(AntRadio, {
|
52
|
-
// name: 'Radio',
|
53
|
-
// designerConfig: {
|
54
|
-
// render({ designerProps, originalProps, }) {
|
55
|
-
// console.log("designerProps:", designerProps, "originalProps:", originalProps)
|
56
|
-
// return <RadioDesigner {...designerProps} {...originalProps} />;
|
57
|
-
// },
|
58
|
-
// },
|
59
|
-
// });
|
60
|
-
// export const Radio = defineComponent(AntRadio, {
|
61
|
-
// name: 'Radio',
|
62
|
-
// });
|
63
9
|
const Radio = (_a) => {
|
64
|
-
|
65
|
-
console.log("新的单选组件", dataId, dataDnd, rest);
|
10
|
+
//console.log("新的单选组件",dataId,dataDnd,rest);
|
66
11
|
//const newProps = {...rest, ...{draggable:true}}
|
67
12
|
//console.log("新的表格组件01",newProps);
|
13
|
+
var _b = tango_helpers_1.SLOT.id, dataId = _a[_b], _c = tango_helpers_1.SLOT.dnd, dataDnd = _a[_c], rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + ""]);
|
68
14
|
return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": dataId, draggable: true },
|
69
15
|
react_1.default.createElement(antd_1.Radio, Object.assign({}, rest))));
|
70
16
|
};
|
@@ -1,2 +1,6 @@
|
|
1
|
+
import { TooltipProps } from 'antd';
|
1
2
|
import React from 'react';
|
2
|
-
export declare const Tooltip:
|
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;
|
@@ -3,39 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Tooltip = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const antd_1 = require("antd");
|
6
|
-
const
|
7
|
-
const
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
//
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
console.log('popoverNode', popoverNode);
|
20
|
-
if (popoverNode) {
|
21
|
-
popoverNode.setAttribute('data-dnd', dataDnd);
|
22
|
-
popoverNode.setAttribute('data-id', dataId);
|
23
|
-
popoverNode.setAttribute('draggable', 'true');
|
24
|
-
}
|
25
|
-
});
|
26
|
-
}
|
27
|
-
};
|
28
|
-
return (react_1.default.createElement("div", { ref: tooltipRef },
|
29
|
-
react_1.default.createElement(antd_1.Tooltip, Object.assign({ title: title, id: dataId, onOpenChange: handleVisibleChange }, rest), children)));
|
30
|
-
}
|
31
|
-
exports.Tooltip = (0, tango_boot_1.defineComponent)(antd_1.Tooltip, {
|
32
|
-
name: 'Tooltip',
|
33
|
-
designerConfig: {
|
34
|
-
render({ designerProps, originalProps }) {
|
35
|
-
console.log("Tooltip: designerProps:", designerProps, "originalProps:", originalProps);
|
36
|
-
return react_1.default.createElement(TooltipDesigner, Object.assign({ title: "Are you sure?" }, designerProps, originalProps));
|
37
|
-
},
|
38
|
-
},
|
39
|
-
// designerConfig: {
|
40
|
-
// },
|
41
|
-
});
|
6
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
7
|
+
const slottype_1 = require("../helpers/slottype");
|
8
|
+
const Tooltip = (_a) => {
|
9
|
+
var
|
10
|
+
//items,
|
11
|
+
_b = slottype_1.SLOT.id,
|
12
|
+
//items,
|
13
|
+
dataId = _a[_b], _c = slottype_1.SLOT.dnd, dataDnd = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
14
|
+
//console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
|
15
|
+
return (react_1.default.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
|
16
|
+
react_1.default.createElement(antd_1.Tooltip, Object.assign({ title: '文字提示' }, rest), rest.children)));
|
17
|
+
};
|
18
|
+
exports.Tooltip = Tooltip;
|
@@ -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
|
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
|
4
|
-
import
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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,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:
|
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;
|