@cuvp1225/antd 0.1.19-beta.12 → 0.1.19-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/designer.js +311 -5
- package/dist/index.js +311 -5
- 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 +4 -0
- package/lib/cjs/components/index.js +10 -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 +4 -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,38 +1,14 @@
|
|
1
1
|
import { __rest } from "tslib";
|
2
2
|
import { Tooltip as AntTooltip } from 'antd';
|
3
|
-
import
|
4
|
-
import
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
//
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
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
|
-
});
|
3
|
+
import React from 'react';
|
4
|
+
import { SLOT } from '../helpers/slottype';
|
5
|
+
export const Tooltip = (_a) => {
|
6
|
+
var
|
7
|
+
//items,
|
8
|
+
_b = SLOT.id,
|
9
|
+
//items,
|
10
|
+
dataId = _a[_b], _c = SLOT.dnd, dataDnd = _a[_c], { style } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
|
11
|
+
//console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
|
12
|
+
return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
|
13
|
+
React.createElement(AntTooltip, Object.assign({ title: '文字提示' }, rest), rest.children)));
|
14
|
+
};
|
@@ -1,67 +1,4 @@
|
|
1
|
-
// import { Upload as AntUpload, UploadProps } from 'antd';
|
2
|
-
// import { defineComponent } from '@music163/tango-boot';
|
3
|
-
// import React, { useEffect, useRef } from 'react';
|
4
|
-
// import { SLOT } from '@music163/tango-helpers';
|
5
|
-
// function UploadDesigner({
|
6
|
-
// children,
|
7
|
-
// title,
|
8
|
-
// [SLOT.dnd]:dataDnd,
|
9
|
-
// [SLOT.id]:dataId,
|
10
|
-
// style,
|
11
|
-
// ...rest
|
12
|
-
// }: UploadProps& { [key: string]: any, // 添加索引签名
|
13
|
-
// dnd?: string, children?: React.ReactNode }) {
|
14
|
-
// const uploadRef = useRef<HTMLDivElement>(null);
|
15
1
|
import { __rest } from "tslib";
|
16
|
-
// useEffect(() => {
|
17
|
-
// Promise.resolve().then(() => {
|
18
|
-
// const popoverNode = document.querySelector(`.${dataId}`);
|
19
|
-
// console.log('uploadNode' ,popoverNode)
|
20
|
-
// if (popoverNode) {
|
21
|
-
// popoverNode.setAttribute('data-dnd', dataDnd);
|
22
|
-
// popoverNode.setAttribute('data-id', dataId);
|
23
|
-
// }
|
24
|
-
// });
|
25
|
-
// },[dataDnd,dataId])
|
26
|
-
// // 监听弹层显示事件
|
27
|
-
// // const handleVisibleChange = (visible: boolean) => {
|
28
|
-
// // console.log('handleVisibleChange', visible);
|
29
|
-
// // if (visible) {
|
30
|
-
// // // 使用微任务确保弹层已渲染
|
31
|
-
// // Promise.resolve().then(() => {
|
32
|
-
// // const popoverNode = document.querySelector('.ant-popover-placement-top');
|
33
|
-
// // console.log('popoverNode' ,popoverNode)
|
34
|
-
// // if (popoverNode) {
|
35
|
-
// // popoverNode.setAttribute('data-dnd', dataDnd);
|
36
|
-
// // popoverNode.setAttribute('data-id', dataId);
|
37
|
-
// // }
|
38
|
-
// // });
|
39
|
-
// // }
|
40
|
-
// // };
|
41
|
-
// return (
|
42
|
-
// <div ref={uploadRef}>
|
43
|
-
// <AntUpload
|
44
|
-
// className={dataId}
|
45
|
-
// data-dnd={dataDnd}
|
46
|
-
// data-id={dataId}
|
47
|
-
// {...rest}
|
48
|
-
// >
|
49
|
-
// {children}
|
50
|
-
// </AntUpload>
|
51
|
-
// </div>
|
52
|
-
// );
|
53
|
-
// }
|
54
|
-
// export const Upload = defineComponent(AntUpload, {
|
55
|
-
// name: 'Upload',
|
56
|
-
// designerConfig: {
|
57
|
-
// render({ designerProps, originalProps }) {
|
58
|
-
// console.log("Upload: designerProps:",designerProps,"originalProps:",originalProps)
|
59
|
-
// return <UploadDesigner title="Are you sure?" {...designerProps} {...originalProps} />;
|
60
|
-
// },
|
61
|
-
// },
|
62
|
-
// // designerConfig: {
|
63
|
-
// // },
|
64
|
-
// });
|
65
2
|
import { Upload as AntUpload } from 'antd';
|
66
3
|
import React from 'react';
|
67
4
|
import { SLOT } from '../helpers/slottype';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cuvp1225/antd",
|
3
|
-
"version": "0.1.19-beta.
|
3
|
+
"version": "0.1.19-beta.13",
|
4
4
|
"description": "antd components for tango app",
|
5
5
|
"author": "wwsun <ww.sww@outlook.com>",
|
6
6
|
"homepage": "https://github.com/netease/tango-components#readme",
|
@@ -55,5 +55,5 @@
|
|
55
55
|
"classnames": "^2.3.2",
|
56
56
|
"coral-system": "^1.0.6"
|
57
57
|
},
|
58
|
-
"gitHead": "
|
58
|
+
"gitHead": "938b7c20a6230fc59d668f086b191e0f849382f8"
|
59
59
|
}
|