@cuvp1225/antd 0.3.66 → 0.3.68

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.
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Row1 = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ const coral_system_1 = require("coral-system");
7
+ const tango_boot_1 = require("@music163/tango-boot");
8
+ const placeholder_1 = require("./placeholder");
9
+ const tango_helpers_1 = require("@music163/tango-helpers");
10
+ //import { ShadowContainer } from './shadow-container';
11
+ // const BaseRowWrapper = coral(
12
+ // 'div',
13
+ // css`
14
+ // position: relative;
15
+ // background-color: #fff;
16
+ // min-width: 600px;
17
+ // .RowNewPanelBody {
18
+ // padding: 12px;
19
+ // }
20
+ // `,
21
+ // );
22
+ const rowStyle = {
23
+ position: 'relative',
24
+ backgroundColor: '#fff',
25
+ minWidth: '600px',
26
+ };
27
+ // interface RowDesignerProps extends React.HTMLAttributes<HTMLDivElement> {
28
+ // style?: React.CSSProperties;
29
+ // children?: React.ReactNode;
30
+ // }
31
+ function RowDesigner(_a) {
32
+ var { gutter, align, justify, prefixCls, wrap, style, children } = _a, _b = tango_helpers_1.SLOT.dnd, dataDnd = _a[_b], _c = tango_helpers_1.SLOT.id, dataId = _a[_c], rest = tslib_1.__rest(_a, ["gutter", "align", "justify", "prefixCls", "wrap", "style", "children", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + ""]);
33
+ console.log("zcq栅格行的入参", dataDnd, dataId);
34
+ const mergedStyle = react_1.default.useMemo(() => (Object.assign(Object.assign({}, rowStyle), style)), [style]);
35
+ // 缓存 dataDnd 和 dataId
36
+ const memoizedDataDnd = react_1.default.useMemo(() => dataDnd, [dataDnd]);
37
+ const memoizedDataId = react_1.default.useMemo(() => dataId, [dataId]);
38
+ return (react_1.default.createElement("div", { style: Object.assign({}, mergedStyle), "data-dnd": memoizedDataDnd, "data-id": memoizedDataId },
39
+ react_1.default.createElement("div", null, children || react_1.default.createElement(placeholder_1.Placeholder, null))));
40
+ }
41
+ const Div = (0, coral_system_1.coral)('div', undefined, {
42
+ prefix: '--music',
43
+ });
44
+ // 使用 React.memo 包裹 RowDesigner,避免不必要的重新渲染
45
+ const MemoizedRowDesigner = react_1.default.memo(RowDesigner, (prevProps, nextProps) => {
46
+ // 自定义比较函数,避免不必要的重新渲染
47
+ return (prevProps[tango_helpers_1.SLOT.dnd] === nextProps[tango_helpers_1.SLOT.dnd] &&
48
+ prevProps[tango_helpers_1.SLOT.id] === nextProps[tango_helpers_1.SLOT.id] &&
49
+ prevProps.style === nextProps.style &&
50
+ prevProps.children === nextProps.children);
51
+ });
52
+ //const MemoizedRowDesigner = React.memo(RowDesigner, areEqual);
53
+ exports.Row1 = (0, tango_boot_1.defineComponent)(Div, {
54
+ name: 'Row1',
55
+ designerConfig: {
56
+ render({ designerProps, originalProps }) {
57
+ //return <RowDesigner {...designerProps} {...originalProps} />;
58
+ console.log("zcq栅格行的入参001", designerProps, originalProps);
59
+ const memoizedDesignerProps = react_1.default.useMemo(() => designerProps, [designerProps]);
60
+ const memoizedOriginalProps = react_1.default.useMemo(() => originalProps, [originalProps]);
61
+ return react_1.default.createElement(MemoizedRowDesigner, Object.assign({}, memoizedDesignerProps, memoizedOriginalProps));
62
+ },
63
+ },
64
+ });
@@ -1,3 +1,4 @@
1
1
  import React from 'react';
2
- import { RowProps } from 'antd';
3
- export declare const Row1: React.ForwardRefExoticComponent<Omit<RowProps & React.RefAttributes<HTMLDivElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
2
+ export declare const Row1: React.ForwardRefExoticComponent<Omit<import("coral-system/dist/esm/types").OmitCommonProps<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("coral-system").CoralProps> & import("coral-system").CoralProps & import("coral-system/dist/esm/types").OmitCommonProps<any, keyof import("coral-system").CoralProps> & {
3
+ as?: import("coral-system/dist/esm/types").As<any>;
4
+ } & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
@@ -3,8 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Row1 = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
- const antd_1 = require("antd");
6
+ const coral_system_1 = require("coral-system");
7
7
  const tango_boot_1 = require("@music163/tango-boot");
8
+ //import { ShadowContainer } from './shadow-container';
8
9
  // const BaseRowWrapper = coral(
9
10
  // 'div',
10
11
  // css`
@@ -26,16 +27,31 @@ const rowStyle = {
26
27
  // children?: React.ReactNode;
27
28
  // }
28
29
  function RowDesigner(_a) {
30
+ // useEffect(() => {
31
+ // Promise.resolve().then(() => {
32
+ // const popoverNode = document.querySelector('.ant-raw');
33
+ // // console.log('spinNode', popoverNode);
34
+ // if (popoverNode) {
35
+ // popoverNode.setAttribute('draggable', 'true');
29
36
  var { gutter, align, justify, prefixCls, wrap, style, children } = _a, rest = tslib_1.__rest(_a, ["gutter", "align", "justify", "prefixCls", "wrap", "style", "children"]);
37
+ // }
38
+ // });
39
+ // }, []);
30
40
  console.log("zcq栅格行的入参", gutter, align, justify, prefixCls, wrap, style, children);
31
41
  return (react_1.default.createElement("div", { style: Object.assign(Object.assign({}, rowStyle), style) },
32
42
  react_1.default.createElement("div", null, children || react_1.default.createElement("div", null, "\u62D6\u5165\u7EC4\u4EF6"))));
33
43
  }
34
- exports.Row1 = (0, tango_boot_1.defineComponent)(antd_1.Row, {
44
+ const Div = (0, coral_system_1.coral)('div', undefined, {
45
+ prefix: '--music',
46
+ });
47
+ const MemoizedRowDesigner = react_1.default.memo(RowDesigner);
48
+ exports.Row1 = (0, tango_boot_1.defineComponent)(Div, {
35
49
  name: 'Row1',
36
50
  designerConfig: {
37
51
  render({ designerProps, originalProps }) {
38
- return react_1.default.createElement(RowDesigner, Object.assign({}, designerProps, originalProps));
52
+ //return <RowDesigner {...designerProps} {...originalProps} />;
53
+ console.log("zcq栅格行的入参001", designerProps, originalProps);
54
+ return react_1.default.createElement(MemoizedRowDesigner, Object.assign({}, designerProps, originalProps));
39
55
  },
40
56
  },
41
57
  });
@@ -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,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TreeSelect = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const antd_1 = require("antd");
6
+ const tango_boot_1 = require("@music163/tango-boot");
7
+ const react_1 = tslib_1.__importStar(require("react"));
8
+ const tango_helpers_1 = require("@music163/tango-helpers");
9
+ function TreeSelectDesigner(_a) {
10
+ var _b = tango_helpers_1.SLOT.dnd, dataDnd = _a[_b], _c = tango_helpers_1.SLOT.id, dataId = _a[_c], { style } = _a, rest = tslib_1.__rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style"]);
11
+ const treeselectRef = (0, react_1.useRef)(null);
12
+ (0, react_1.useEffect)(() => {
13
+ Promise.resolve().then(() => {
14
+ const popoverNode = document.querySelector('.ant-tree-select');
15
+ // console.log('spinNode', popoverNode);
16
+ if (popoverNode) {
17
+ popoverNode.setAttribute('data-dnd', dataDnd);
18
+ popoverNode.setAttribute('data-id', dataId);
19
+ popoverNode.setAttribute('draggable', 'true');
20
+ }
21
+ });
22
+ }, [dataDnd, dataId]);
23
+ return (react_1.default.createElement("div", { ref: treeselectRef },
24
+ react_1.default.createElement(antd_1.TreeSelect, Object.assign({ className: 'ant-tree-select', "data-dnd": dataDnd, "data-id": dataId, style: style }, rest))));
25
+ }
26
+ exports.TreeSelect = (0, tango_boot_1.defineComponent)(antd_1.TreeSelect, {
27
+ name: 'TreeSelect',
28
+ designerConfig: {
29
+ render({ designerProps, originalProps }) {
30
+ // console.log("TreeSelect: designerProps:", designerProps, "originalProps:", originalProps);
31
+ return react_1.default.createElement(TreeSelectDesigner, Object.assign({}, designerProps, originalProps));
32
+ }
33
+ }
34
+ });
@@ -0,0 +1,3 @@
1
+ import { ImageProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Image: React.ForwardRefExoticComponent<ImageProps & import("@music163/tango-boot").TangoComponentProps & React.RefAttributes<unknown>>;
@@ -0,0 +1,31 @@
1
+ import { __rest } from "tslib";
2
+ import { Image as AntImage } 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 ImageDesigner(_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 imageRef = useRef(null);
9
+ useEffect(() => {
10
+ Promise.resolve().then(() => {
11
+ const popoverNode = document.querySelector('.ant-image');
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: imageRef },
21
+ React.createElement(AntImage, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest))));
22
+ }
23
+ export const Image = defineComponent(AntImage, {
24
+ name: 'Image',
25
+ designerConfig: {
26
+ render({ designerProps, originalProps }) {
27
+ // console.log("Image: designerProps:", designerProps, "originalProps:", originalProps);
28
+ return React.createElement(ImageDesigner, Object.assign({}, designerProps, originalProps));
29
+ }
30
+ }
31
+ });
@@ -50,5 +50,9 @@ export { Comment } from './comment';
50
50
  export { TimePicker } from './time-picker';
51
51
  export { Transfer } from './transfer';
52
52
  export { Statistic } from './statistic';
53
+ export { PageHeader } from './pageheader';
53
54
  export { Switch } from './switch';
54
55
  export { AutoComplete } from './auto-complete';
56
+ export { Mentions } from './mentions';
57
+ export { TreeSelect } from './tree-select';
58
+ export { Image } from './image';
@@ -55,5 +55,9 @@ export { Comment } from './comment';
55
55
  export { TimePicker } from './time-picker';
56
56
  export { Transfer } from './transfer';
57
57
  export { Statistic } from './statistic';
58
+ export { PageHeader } from './pageheader';
58
59
  export { Switch } from './switch';
59
60
  export { AutoComplete } from './auto-complete';
61
+ export { Mentions } from './mentions';
62
+ export { TreeSelect } from './tree-select';
63
+ export { Image } from './image';
@@ -0,0 +1,3 @@
1
+ import { MentionProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Mentions: React.ForwardRefExoticComponent<Omit<MentionProps & React.RefAttributes<import("antd/lib/mentions").MentionsRef> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
@@ -0,0 +1,31 @@
1
+ import { __rest } from "tslib";
2
+ import { Mentions as AntMentions } 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 MentionsDesigner(_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 mentionsRef = useRef(null);
9
+ useEffect(() => {
10
+ Promise.resolve().then(() => {
11
+ const popoverNode = document.querySelector('.ant-mentions');
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: mentionsRef },
21
+ React.createElement(AntMentions, Object.assign({ "data-dnd": dataDnd, "data-id": dataId, style: style }, rest))));
22
+ }
23
+ export const Mentions = defineComponent(AntMentions, {
24
+ name: 'Mentions',
25
+ designerConfig: {
26
+ render({ designerProps, originalProps }) {
27
+ // console.log("Mentions: designerProps:", designerProps, "originalProps:", originalProps);
28
+ return React.createElement(MentionsDesigner, Object.assign({}, designerProps, originalProps));
29
+ }
30
+ }
31
+ });
@@ -31,6 +31,7 @@ function PlaceholderView(_a) {
31
31
  //placeholder = '点击或拖拽组件/区块到这里',
32
32
  placeholder = '点击或拖拽组件/区块到这里' } = _a, rest = __rest(_a, ["size", "placeholder"]);
33
33
  const height = sizeMap[size];
34
+ console.log('zcq-PlaceholderView', rest);
34
35
  return (React.createElement(Box, Object.assign({ className: "tango-placeholder", height: height, css: placeholderStyle }, rest), placeholder));
35
36
  }
36
37
  export const Placeholder = defineComponent(PlaceholderView);
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const Row1: React.ForwardRefExoticComponent<Omit<import("coral-system/dist/esm/types").OmitCommonProps<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("coral-system").CoralProps> & import("coral-system").CoralProps & import("coral-system/dist/esm/types").OmitCommonProps<any, keyof import("coral-system").CoralProps> & {
3
+ as?: import("coral-system/dist/esm/types").As<any>;
4
+ } & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
@@ -0,0 +1,61 @@
1
+ import { __rest } from "tslib";
2
+ import React from 'react';
3
+ import { coral } from 'coral-system';
4
+ import { defineComponent } from '@music163/tango-boot';
5
+ import { Placeholder } from './placeholder';
6
+ import { SLOT } from '@music163/tango-helpers';
7
+ //import { ShadowContainer } from './shadow-container';
8
+ // const BaseRowWrapper = coral(
9
+ // 'div',
10
+ // css`
11
+ // position: relative;
12
+ // background-color: #fff;
13
+ // min-width: 600px;
14
+ // .RowNewPanelBody {
15
+ // padding: 12px;
16
+ // }
17
+ // `,
18
+ // );
19
+ const rowStyle = {
20
+ position: 'relative',
21
+ backgroundColor: '#fff',
22
+ minWidth: '600px',
23
+ };
24
+ // interface RowDesignerProps extends React.HTMLAttributes<HTMLDivElement> {
25
+ // style?: React.CSSProperties;
26
+ // children?: React.ReactNode;
27
+ // }
28
+ function RowDesigner(_a) {
29
+ var { gutter, align, justify, prefixCls, wrap, style, children } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], rest = __rest(_a, ["gutter", "align", "justify", "prefixCls", "wrap", "style", "children", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + ""]);
30
+ console.log("zcq栅格行的入参", dataDnd, dataId);
31
+ const mergedStyle = React.useMemo(() => (Object.assign(Object.assign({}, rowStyle), style)), [style]);
32
+ // 缓存 dataDnd 和 dataId
33
+ const memoizedDataDnd = React.useMemo(() => dataDnd, [dataDnd]);
34
+ const memoizedDataId = React.useMemo(() => dataId, [dataId]);
35
+ return (React.createElement("div", { style: Object.assign({}, mergedStyle), "data-dnd": memoizedDataDnd, "data-id": memoizedDataId },
36
+ React.createElement("div", null, children || React.createElement(Placeholder, null))));
37
+ }
38
+ const Div = coral('div', undefined, {
39
+ prefix: '--music',
40
+ });
41
+ // 使用 React.memo 包裹 RowDesigner,避免不必要的重新渲染
42
+ const MemoizedRowDesigner = React.memo(RowDesigner, (prevProps, nextProps) => {
43
+ // 自定义比较函数,避免不必要的重新渲染
44
+ return (prevProps[SLOT.dnd] === nextProps[SLOT.dnd] &&
45
+ prevProps[SLOT.id] === nextProps[SLOT.id] &&
46
+ prevProps.style === nextProps.style &&
47
+ prevProps.children === nextProps.children);
48
+ });
49
+ //const MemoizedRowDesigner = React.memo(RowDesigner, areEqual);
50
+ export const Row1 = defineComponent(Div, {
51
+ name: 'Row1',
52
+ designerConfig: {
53
+ render({ designerProps, originalProps }) {
54
+ //return <RowDesigner {...designerProps} {...originalProps} />;
55
+ console.log("zcq栅格行的入参001", designerProps, originalProps);
56
+ const memoizedDesignerProps = React.useMemo(() => designerProps, [designerProps]);
57
+ const memoizedOriginalProps = React.useMemo(() => originalProps, [originalProps]);
58
+ return React.createElement(MemoizedRowDesigner, Object.assign({}, memoizedDesignerProps, memoizedOriginalProps));
59
+ },
60
+ },
61
+ });
@@ -1,3 +1,4 @@
1
1
  import React from 'react';
2
- import { RowProps } from 'antd';
3
- export declare const Row1: React.ForwardRefExoticComponent<Omit<RowProps & React.RefAttributes<HTMLDivElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
2
+ export declare const Row1: React.ForwardRefExoticComponent<Omit<import("coral-system/dist/esm/types").OmitCommonProps<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("coral-system").CoralProps> & import("coral-system").CoralProps & import("coral-system/dist/esm/types").OmitCommonProps<any, keyof import("coral-system").CoralProps> & {
3
+ as?: import("coral-system/dist/esm/types").As<any>;
4
+ } & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
@@ -1,7 +1,8 @@
1
1
  import { __rest } from "tslib";
2
2
  import React from 'react';
3
- import { Row as AntRow } from 'antd';
3
+ import { coral } from 'coral-system';
4
4
  import { defineComponent } from '@music163/tango-boot';
5
+ //import { ShadowContainer } from './shadow-container';
5
6
  // const BaseRowWrapper = coral(
6
7
  // 'div',
7
8
  // css`
@@ -23,16 +24,31 @@ const rowStyle = {
23
24
  // children?: React.ReactNode;
24
25
  // }
25
26
  function RowDesigner(_a) {
27
+ // useEffect(() => {
28
+ // Promise.resolve().then(() => {
29
+ // const popoverNode = document.querySelector('.ant-raw');
30
+ // // console.log('spinNode', popoverNode);
31
+ // if (popoverNode) {
32
+ // popoverNode.setAttribute('draggable', 'true');
26
33
  var { gutter, align, justify, prefixCls, wrap, style, children } = _a, rest = __rest(_a, ["gutter", "align", "justify", "prefixCls", "wrap", "style", "children"]);
34
+ // }
35
+ // });
36
+ // }, []);
27
37
  console.log("zcq栅格行的入参", gutter, align, justify, prefixCls, wrap, style, children);
28
38
  return (React.createElement("div", { style: Object.assign(Object.assign({}, rowStyle), style) },
29
39
  React.createElement("div", null, children || React.createElement("div", null, "\u62D6\u5165\u7EC4\u4EF6"))));
30
40
  }
31
- export const Row1 = defineComponent(AntRow, {
41
+ const Div = coral('div', undefined, {
42
+ prefix: '--music',
43
+ });
44
+ const MemoizedRowDesigner = React.memo(RowDesigner);
45
+ export const Row1 = defineComponent(Div, {
32
46
  name: 'Row1',
33
47
  designerConfig: {
34
48
  render({ designerProps, originalProps }) {
35
- return React.createElement(RowDesigner, Object.assign({}, designerProps, originalProps));
49
+ //return <RowDesigner {...designerProps} {...originalProps} />;
50
+ console.log("zcq栅格行的入参001", designerProps, originalProps);
51
+ return React.createElement(MemoizedRowDesigner, Object.assign({}, designerProps, originalProps));
36
52
  },
37
53
  },
38
54
  });
@@ -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('.ant-tree-select');
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: 'ant-tree-select', "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
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuvp1225/antd",
3
- "version": "0.3.66",
3
+ "version": "0.3.68",
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",
@@ -54,5 +54,5 @@
54
54
  "classnames": "^2.3.2",
55
55
  "coral-system": "^1.0.6"
56
56
  },
57
- "gitHead": "5464b3c587452347e70fdee8218b680503bd588b"
57
+ "gitHead": "5b59d8b724fe56f7b4a7890a1ae7d9fbc0ced1a9"
58
58
  }