@cuvp1225/antd 0.2.61 → 0.2.63
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 +34 -23
- package/dist/index.js +33 -22
- package/lib/cjs/components/breadcrumb.d.ts +1 -1
- package/lib/cjs/components/breadcrumb.js +1 -1
- package/lib/cjs/components/collapse.d.ts +1 -1
- package/lib/cjs/components/collapse.js +1 -1
- package/lib/cjs/components/date-picker.js +48 -2
- package/lib/cjs/components/index.d.ts +2 -1
- package/lib/cjs/components/index.js +10 -5
- package/lib/cjs/components/input-number.d.ts +3 -2
- package/lib/cjs/components/input-number.js +28 -18
- package/lib/cjs/components/input.d.ts +3 -2
- package/lib/cjs/components/input.js +24 -43
- package/lib/cjs/components/list.d.ts +1 -1
- package/lib/cjs/components/list.js +1 -1
- package/lib/cjs/components/menu.d.ts +1 -1
- package/lib/cjs/components/menu.js +1 -1
- package/lib/cjs/components/popconfirm.js +2 -1
- package/lib/cjs/components/row.js +1 -2
- package/lib/cjs/components/timeline.d.ts +1 -1
- package/lib/cjs/components/timeline.js +1 -1
- package/lib/cjs/prototypes/form.js +2 -2
- package/lib/esm/components/breadcrumb.d.ts +1 -1
- package/lib/esm/components/breadcrumb.js +1 -1
- package/lib/esm/components/collapse.d.ts +1 -1
- package/lib/esm/components/collapse.js +1 -1
- package/lib/esm/components/date-picker.js +49 -3
- package/lib/esm/components/index.d.ts +2 -1
- package/lib/esm/components/index.js +4 -3
- package/lib/esm/components/input-number.d.ts +3 -2
- package/lib/esm/components/input-number.js +28 -18
- package/lib/esm/components/input.d.ts +3 -2
- package/lib/esm/components/input.js +24 -43
- package/lib/esm/components/list.d.ts +1 -1
- package/lib/esm/components/list.js +1 -1
- package/lib/esm/components/menu.d.ts +1 -1
- package/lib/esm/components/menu.js +1 -1
- package/lib/esm/components/popconfirm.js +2 -1
- package/lib/esm/components/row.js +1 -2
- package/lib/esm/components/timeline.d.ts +1 -1
- package/lib/esm/components/timeline.js +1 -1
- package/lib/esm/prototypes/form.js +2 -2
- package/package.json +2 -2
@@ -1,54 +1,35 @@
|
|
1
|
+
import { __rest } from "tslib";
|
1
2
|
import { Input as AntInput } from 'antd';
|
2
3
|
import { defineComponent } from '@music163/tango-boot';
|
4
|
+
import React from 'react';
|
5
|
+
function InputDesigner(_a) {
|
6
|
+
var { style, value } = _a, rest = __rest(_a, ["style", "value"]);
|
7
|
+
console.log("AntInput:", value, rest);
|
8
|
+
if (value && value !== '') {
|
9
|
+
return React.createElement(AntInput, Object.assign({ value: value }, rest, { style: style }));
|
10
|
+
}
|
11
|
+
return (React.createElement(AntInput, Object.assign({}, rest, { style: style })));
|
12
|
+
}
|
3
13
|
export const Input = defineComponent(AntInput, {
|
4
14
|
name: 'Input',
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
return {
|
9
|
-
value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : '',
|
10
|
-
clear() {
|
11
|
-
setPageState({ value: '' });
|
12
|
-
},
|
13
|
-
setValue(nextValue) {
|
14
|
-
setPageState({ value: nextValue });
|
15
|
-
},
|
16
|
-
};
|
17
|
-
},
|
18
|
-
getTriggerProps({ setPageState, getPageState }) {
|
19
|
-
var _a;
|
20
|
-
return {
|
21
|
-
value: (_a = getPageState()) === null || _a === void 0 ? void 0 : _a.value,
|
22
|
-
onChange(e) {
|
23
|
-
setPageState({ value: e.target.value });
|
24
|
-
},
|
25
|
-
};
|
15
|
+
designerConfig: {
|
16
|
+
render({ designerProps, originalProps, }) {
|
17
|
+
return React.createElement(InputDesigner, Object.assign({}, designerProps, originalProps));
|
26
18
|
},
|
27
19
|
},
|
28
20
|
});
|
21
|
+
function TextAreaDesigner(_a) {
|
22
|
+
var { style, value } = _a, rest = __rest(_a, ["style", "value"]);
|
23
|
+
if (value && value !== '') {
|
24
|
+
return React.createElement(AntInput.TextArea, Object.assign({ value: value }, rest, { style: style }));
|
25
|
+
}
|
26
|
+
return (React.createElement(AntInput.TextArea, Object.assign({}, rest, { style: style })));
|
27
|
+
}
|
29
28
|
export const TextArea = defineComponent(AntInput.TextArea, {
|
30
29
|
name: 'TextArea',
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
return {
|
35
|
-
value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : '',
|
36
|
-
clear() {
|
37
|
-
setPageState({ value: '' });
|
38
|
-
},
|
39
|
-
setValue(nextValue) {
|
40
|
-
setPageState({ value: nextValue });
|
41
|
-
},
|
42
|
-
};
|
43
|
-
},
|
44
|
-
getTriggerProps({ setPageState, getPageState }) {
|
45
|
-
var _a;
|
46
|
-
return {
|
47
|
-
value: (_a = getPageState()) === null || _a === void 0 ? void 0 : _a.value,
|
48
|
-
onChange(e) {
|
49
|
-
setPageState({ value: e.target.value });
|
50
|
-
},
|
51
|
-
};
|
30
|
+
designerConfig: {
|
31
|
+
render({ designerProps, originalProps, }) {
|
32
|
+
return React.createElement(TextAreaDesigner, Object.assign({}, designerProps, originalProps));
|
52
33
|
},
|
53
|
-
}
|
34
|
+
}
|
54
35
|
});
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export declare const List: import("react").ForwardRefExoticComponent<import("antd").ListProps<unknown> & import("@music163/tango-boot").TangoComponentProps & import("react").RefAttributes<unknown>>;
|
2
|
-
export declare const ListItem: import("react").ForwardRefExoticComponent<import("antd").
|
2
|
+
export declare const ListItem: import("react").ForwardRefExoticComponent<Omit<import("antd/lib/list").ListItemProps & import("react").RefAttributes<HTMLElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & import("react").RefAttributes<unknown>>;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export declare const Menu: import("react").ForwardRefExoticComponent<import("antd").MenuProps & import("@music163/tango-boot").TangoComponentProps & import("react").RefAttributes<unknown>>;
|
2
|
-
export declare const MenuItem: import("react").ForwardRefExoticComponent<import("antd").
|
2
|
+
export declare const MenuItem: import("react").ForwardRefExoticComponent<import("antd").MenuItemProps & import("@music163/tango-boot").TangoComponentProps & import("react").RefAttributes<unknown>>;
|
@@ -2,8 +2,9 @@ import { __rest } from "tslib";
|
|
2
2
|
import { Popconfirm as AntPopconfirm } from 'antd';
|
3
3
|
import { defineComponent } from '@music163/tango-boot';
|
4
4
|
import React, { useEffect } from 'react';
|
5
|
+
import { SLOT } from '@music163/tango-helpers';
|
5
6
|
function PopconfirmDesigner(_a) {
|
6
|
-
var { children, title, dataDnd, dataId, style } = _a, rest = __rest(_a, ["children", "title", "
|
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"]);
|
7
8
|
useEffect(() => {
|
8
9
|
console.log('PopconfirmDesigner', dataDnd, dataId, rest);
|
9
10
|
}, []);
|
@@ -5,7 +5,6 @@ import { coral } from 'coral-system';
|
|
5
5
|
import { Row as AntRow } from 'antd';
|
6
6
|
import { defineComponent } from '@music163/tango-boot';
|
7
7
|
import { Placeholder } from './placeholder';
|
8
|
-
import { ShadowContainer } from './shadow-container';
|
9
8
|
const BaseRowWrapper = coral('div', css `
|
10
9
|
position: relative;
|
11
10
|
background-color: #fff;
|
@@ -20,7 +19,7 @@ const BaseRowWrapper = coral('div', css `
|
|
20
19
|
function RowDesigner(_a) {
|
21
20
|
var { gutter, align, justify, prefixCls, wrap, style, children } = _a, rest = __rest(_a, ["gutter", "align", "justify", "prefixCls", "wrap", "style", "children"]);
|
22
21
|
console.log("zcq栅格行的入参", gutter, align, justify, prefixCls, wrap, style, children);
|
23
|
-
return (React.createElement(
|
22
|
+
return (React.createElement("div", null,
|
24
23
|
React.createElement(BaseRowWrapper, { style: style },
|
25
24
|
React.createElement("div", { className: "RowNewPanelBody" }, children || React.createElement(Placeholder, null)))));
|
26
25
|
}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export declare const Timeline: import("react").ForwardRefExoticComponent<import("antd").TimelineProps & import("@music163/tango-boot").TangoComponentProps & import("react").RefAttributes<unknown>>;
|
2
|
-
export declare const TimelineItem: import("react").ForwardRefExoticComponent<import("antd").
|
2
|
+
export declare const TimelineItem: import("react").ForwardRefExoticComponent<import("antd").TimelineItemProps & import("@music163/tango-boot").TangoComponentProps & import("react").RefAttributes<unknown>>;
|
@@ -3,6 +3,6 @@ import { Timeline as AntTimeline } from 'antd';
|
|
3
3
|
export const Timeline = defineComponent(AntTimeline, {
|
4
4
|
name: 'Timeline'
|
5
5
|
});
|
6
|
-
export const TimelineItem = defineComponent(AntTimeline, {
|
6
|
+
export const TimelineItem = defineComponent(AntTimeline.Item, {
|
7
7
|
name: 'TimelineItem',
|
8
8
|
});
|
@@ -56,7 +56,7 @@ export const Form = {
|
|
56
56
|
// Submit
|
57
57
|
// </Button>
|
58
58
|
// </Form.Item>`,
|
59
|
-
initChildren: '<FormItem component="Input" label="表单项"
|
59
|
+
initChildren: '<FormItem component="Input" label="表单项" ><div><Placeholder></Placeholder></div></FormItem><FormItem component="Input" label="表单项" ><div><Placeholder></Placeholder></div></FormItem><FormItem component="Input" label="表单项" ><div><Placeholder></Placeholder></div></FormItem><FormItem wrapperCol={{offset: 8,span: 16,}}><Button type="primary" htmlType="submit">提交</Button></FormItem>',
|
60
60
|
relatedImports: ['FormItem', 'FormFooter', 'Button', 'Input'],
|
61
61
|
childrenName: ['FormItem', 'Fieldset', 'FormFooter'],
|
62
62
|
props: [
|
@@ -183,7 +183,7 @@ export const FormItem = {
|
|
183
183
|
package: '@cuvp1225/antd',
|
184
184
|
help: '一个基本的表单项',
|
185
185
|
hasChildren: true,
|
186
|
-
initChildren: '
|
186
|
+
initChildren: '<div><Placeholder></Placeholder></div>',
|
187
187
|
props: [
|
188
188
|
...StylePrototypes,
|
189
189
|
{
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cuvp1225/antd",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.63",
|
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": "
|
57
|
+
"gitHead": "b604ace27e04ff52b795ac7ba88fbe731c2c9f0f"
|
58
58
|
}
|