@cuvp1225/antd 0.1.19-beta.47 → 0.1.19-beta.48
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 +10 -10
- package/dist/index.js +10 -10
- package/lib/cjs/components/comment.js +0 -1
- package/lib/cjs/components/unSteps/unisteps.js +17 -17
- package/lib/cjs/components/uniButton/unibutton.js +13 -16
- package/lib/cjs/components/uniCascader/unicascader.js +8 -8
- package/lib/cjs/components/uniModal/unimodal.js +4 -4
- package/lib/cjs/components/uniRadio/uniradio.js +22 -22
- package/lib/cjs/components/uniSelect/uniselect.js +7 -7
- package/lib/cjs/components/uniSwitch/uniswitch.js +4 -4
- package/lib/cjs/components/uniTabs/unitabs.js +13 -13
- package/lib/cjs/components/uniUpload/uniupload.js +5 -5
- package/lib/esm/components/comment.js +0 -1
- package/lib/esm/components/unSteps/unisteps.js +17 -17
- package/lib/esm/components/uniButton/unibutton.js +12 -15
- package/lib/esm/components/uniCascader/unicascader.js +8 -8
- package/lib/esm/components/uniModal/unimodal.js +4 -4
- package/lib/esm/components/uniRadio/uniradio.js +22 -22
- package/lib/esm/components/uniSelect/uniselect.js +7 -7
- package/lib/esm/components/uniSwitch/uniswitch.js +4 -4
- package/lib/esm/components/uniTabs/unitabs.js +13 -13
- package/lib/esm/components/uniUpload/uniupload.js +5 -5
- package/package.json +2 -2
@@ -5,70 +5,70 @@ import { SLOT } from '../../helpers/slottype';
|
|
5
5
|
export const UniSteps = (_a) => {
|
6
6
|
var _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style, theme } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style", "theme"]);
|
7
7
|
const redCss = `
|
8
|
-
.uni-${
|
8
|
+
.uni-${rest.tid} .ant-steps-item-process > .ant-steps-item-container > .ant-steps-item-icon {
|
9
9
|
background: #B30000;
|
10
10
|
}
|
11
|
-
.uni-${
|
11
|
+
.uni-${rest.tid} .ant-steps-item-process .ant-steps-item-icon {
|
12
12
|
background-color: #fff;
|
13
13
|
border-color: #B30000;
|
14
14
|
}
|
15
15
|
|
16
|
-
.uni-${
|
16
|
+
.uni-${rest.tid} .ant-steps-item-finish .ant-steps-item-icon {
|
17
17
|
background-color: #fff;
|
18
18
|
border-color: #B30000;
|
19
19
|
}
|
20
20
|
|
21
|
-
.uni-${
|
21
|
+
.uni-${rest.tid} .anticon svg {
|
22
22
|
color: #B30000;
|
23
23
|
}
|
24
24
|
|
25
25
|
|
26
|
-
.uni-${
|
26
|
+
.uni-${rest.tid} .ant-steps-item-finish > .ant-steps-item-container > .ant-steps-item-content > .ant-steps-item-title::after {
|
27
27
|
background-color: #f0f0f0;
|
28
28
|
}
|
29
29
|
`;
|
30
30
|
const blueCss = `
|
31
|
-
.uni-${
|
31
|
+
.uni-${rest.tid} .ant-steps-item-process > .ant-steps-item-container > .ant-steps-item-icon {
|
32
32
|
background: #1890ff;
|
33
33
|
}
|
34
|
-
.uni-${
|
34
|
+
.uni-${rest.tid} .ant-steps-item-process .ant-steps-item-icon {
|
35
35
|
background-color: #fff;
|
36
36
|
border-color: #1890ff;
|
37
37
|
}
|
38
38
|
|
39
|
-
.uni-${
|
39
|
+
.uni-${rest.tid} .ant-steps-item-finish .ant-steps-item-icon {
|
40
40
|
background-color: #fff;
|
41
41
|
border-color: #1890ff;
|
42
42
|
}
|
43
43
|
|
44
|
-
.uni-${
|
44
|
+
.uni-${rest.tid} .anticon svg {
|
45
45
|
color: #1890ff;
|
46
46
|
}
|
47
47
|
|
48
48
|
|
49
|
-
.uni-${
|
49
|
+
.uni-${rest.tid} .ant-steps-item-finish > .ant-steps-item-container > .ant-steps-item-content > .ant-steps-item-title::after {
|
50
50
|
background-color: #f0f0f0;
|
51
51
|
}
|
52
52
|
`;
|
53
53
|
const greenCss = `
|
54
|
-
.uni-${
|
54
|
+
.uni-${rest.tid} .ant-steps-item-process > .ant-steps-item-container > .ant-steps-item-icon {
|
55
55
|
background: #17c60e;
|
56
56
|
}
|
57
|
-
.uni-${
|
57
|
+
.uni-${rest.tid} .ant-steps-item-process .ant-steps-item-icon {
|
58
58
|
background-color: #fff;
|
59
59
|
border-color: #17c60e;
|
60
60
|
}
|
61
61
|
|
62
|
-
.uni-${
|
62
|
+
.uni-${rest.tid} .ant-steps-item-finish .ant-steps-item-icon {
|
63
63
|
background-color: #fff;
|
64
64
|
border-color: #17c60e;
|
65
65
|
}
|
66
66
|
|
67
|
-
.uni-${
|
67
|
+
.uni-${rest.tid} .anticon svg {
|
68
68
|
color: #17c60e;
|
69
69
|
}
|
70
70
|
|
71
|
-
.uni-${
|
71
|
+
.uni-${rest.tid} .ant-steps-item-finish > .ant-steps-item-container > .ant-steps-item-content > .ant-steps-item-title::after {
|
72
72
|
background-color: #f0f0f0;
|
73
73
|
}
|
74
74
|
`;
|
@@ -81,8 +81,8 @@ export const UniSteps = (_a) => {
|
|
81
81
|
document.head.appendChild(style);
|
82
82
|
}
|
83
83
|
}, [theme]);
|
84
|
-
return (React.createElement("div", { "data-dnd": dataDnd, "data-id":
|
85
|
-
React.createElement(AntdSteps, Object.assign({ className: `uni-${
|
84
|
+
return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
|
85
|
+
React.createElement(AntdSteps, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}` }, rest), rest.children)));
|
86
86
|
};
|
87
87
|
export const UniStepsStep = (props) => {
|
88
88
|
return (React.createElement(AntdSteps.Step, Object.assign({}, props)));
|
@@ -1,64 +1,61 @@
|
|
1
1
|
import { __rest } from "tslib";
|
2
2
|
import { Button as AntButton } from "antd";
|
3
|
-
import { SLOT } from
|
3
|
+
import { SLOT } from "../../helpers/slottype";
|
4
4
|
import React, { useEffect } from "react";
|
5
5
|
export const UniButton = (_a) => {
|
6
6
|
var _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style, theme } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style", "theme"]);
|
7
7
|
const redCss = `
|
8
|
-
.uni-${
|
8
|
+
.uni-${rest.tid} {
|
9
9
|
color: #fff;
|
10
10
|
border-color: #B30000 !important;
|
11
11
|
background: #B30000 !important;
|
12
12
|
|
13
13
|
}
|
14
14
|
|
15
|
-
.uni-${
|
16
|
-
.uni-${
|
15
|
+
.uni-${rest.tid}:hover,
|
16
|
+
.uni-${rest.tid}:focus {
|
17
17
|
color: #fff;
|
18
18
|
border-color: #B30000 !important;
|
19
19
|
background: #B30000 !important;
|
20
20
|
}
|
21
21
|
`;
|
22
22
|
const blueCss = `
|
23
|
-
.uni-${
|
23
|
+
.uni-${rest.tid} {
|
24
24
|
color: #fff;
|
25
25
|
border-color: #1890ff !important;
|
26
26
|
background: #1890ff !important;
|
27
27
|
|
28
28
|
}
|
29
29
|
|
30
|
-
.uni-${
|
31
|
-
.uni-${
|
30
|
+
.uni-${rest.tid}:hover,
|
31
|
+
.uni-${rest.tid}:focus {
|
32
32
|
color: #fff;
|
33
33
|
border-color: #1890ff !important;
|
34
34
|
background: #1890ff !important;
|
35
35
|
}`;
|
36
36
|
const greenCss = `
|
37
|
-
.uni-${
|
37
|
+
.uni-${rest.tid} {
|
38
38
|
color: #fff;
|
39
39
|
border-color: #17c60e !important;
|
40
40
|
background: #17c60e !important;
|
41
41
|
|
42
42
|
}
|
43
43
|
|
44
|
-
.uni-${
|
45
|
-
.uni-${
|
44
|
+
.uni-${rest.tid}:hover,
|
45
|
+
.uni-${rest.tid}:focus {
|
46
46
|
color: #fff;
|
47
47
|
border-color: #17c60e !important;
|
48
48
|
background: #17c60e !important;
|
49
49
|
}`;
|
50
|
-
console.log("wxy-uniButton-rest2: ", rest);
|
51
|
-
console.log("wxy-uniButton-dataDnd2: ", dataDnd);
|
52
|
-
console.log("wxy-uniButton-dataId2: ", dataId);
|
53
50
|
useEffect(() => {
|
54
51
|
const allow = ['blue', 'green', 'red'];
|
55
|
-
if (
|
52
|
+
if (rest.type === 'primary' && allow.includes(theme)) {
|
56
53
|
const css = theme === 'blue' ? blueCss : theme === 'green' ? greenCss : redCss;
|
57
54
|
const style = document.createElement('style');
|
58
55
|
style.innerHTML = css;
|
59
56
|
document.head.appendChild(style);
|
60
57
|
}
|
61
58
|
}, [theme]);
|
62
|
-
return (React.createElement(AntButton, Object.assign({ className: `uni-${
|
59
|
+
return (React.createElement(AntButton, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}`, "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style }, rest)));
|
63
60
|
};
|
64
61
|
export const UniButtonGroup = AntButton.Group;
|
@@ -5,33 +5,33 @@ import { SLOT } from "../../helpers/slottype";
|
|
5
5
|
export const UniCascader = (_a) => {
|
6
6
|
var _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style, theme } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style", "theme"]);
|
7
7
|
const redCss = `
|
8
|
-
.uni-${
|
8
|
+
.uni-${rest.tid} .ant-cascader-menu-item-active {
|
9
9
|
color: #c20000;
|
10
10
|
background: #fff3f3
|
11
11
|
}
|
12
12
|
|
13
|
-
.uni-${
|
13
|
+
.uni-${rest.tid} .ant-cascader-menu-item-active:hover {
|
14
14
|
color: #c20000;
|
15
15
|
background: #fff3f3
|
16
16
|
}
|
17
17
|
`;
|
18
18
|
const blueCss = `
|
19
|
-
.uni-${
|
19
|
+
.uni-${rest.tid} .ant-cascader-menu-item-active {
|
20
20
|
color: #1890ff;
|
21
21
|
background: #e6f7ff
|
22
22
|
}
|
23
23
|
|
24
|
-
.uni-${
|
24
|
+
.uni-${rest.tid} .ant-cascader-menu-item-active:hover {
|
25
25
|
color: #1890ff;
|
26
26
|
background: #e6f7ff
|
27
27
|
}`;
|
28
28
|
const greenCss = `
|
29
|
-
.uni-${
|
29
|
+
.uni-${rest.tid} .ant-cascader-menu-item-active {
|
30
30
|
color: #17c60e;
|
31
31
|
background: #f6ffed
|
32
32
|
}
|
33
33
|
|
34
|
-
.uni-${
|
34
|
+
.uni-${rest.tid} .ant-cascader-menu-item-active:hover {
|
35
35
|
color: #17c60e;
|
36
36
|
background: #f6ffed
|
37
37
|
}
|
@@ -45,6 +45,6 @@ export const UniCascader = (_a) => {
|
|
45
45
|
document.head.appendChild(style);
|
46
46
|
}
|
47
47
|
}, [theme]);
|
48
|
-
return (React.createElement("div", { "data-dnd": dataDnd, "data-id":
|
49
|
-
React.createElement(AntdCascader, Object.assign({ className: `uni-${
|
48
|
+
return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
|
49
|
+
React.createElement(AntdCascader, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}`, dropdownClassName: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}`, style: style }, rest))));
|
50
50
|
};
|
@@ -6,19 +6,19 @@ export const UniModal = (_a) => {
|
|
6
6
|
var _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { children, style, theme } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "children", "style", "theme"]);
|
7
7
|
// 主题样式定义
|
8
8
|
const redCss = `
|
9
|
-
.uni-${
|
9
|
+
.uni-${rest.tid} .ant-modal-footer .ant-btn-primary {
|
10
10
|
background: #B20000;
|
11
11
|
border-color: #B20000;
|
12
12
|
}
|
13
13
|
`;
|
14
14
|
const blueCss = `
|
15
|
-
.uni-${
|
15
|
+
.uni-${rest.tid} .ant-modal-footer .ant-btn-primary {
|
16
16
|
background: #1890ff;
|
17
17
|
border-color: #1890ff;
|
18
18
|
}
|
19
19
|
`;
|
20
20
|
const greenCss = `
|
21
|
-
.uni-${
|
21
|
+
.uni-${rest.tid} .ant-modal-footer .ant-btn-primary {
|
22
22
|
background: #17c60e;
|
23
23
|
border-color: #17c60e;
|
24
24
|
}
|
@@ -32,7 +32,7 @@ export const UniModal = (_a) => {
|
|
32
32
|
document.head.appendChild(style);
|
33
33
|
}
|
34
34
|
}, [theme]);
|
35
|
-
return (React.createElement(AntModal, Object.assign({ className: `uni-${
|
35
|
+
return (React.createElement(AntModal, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}`, "data-dnd": dataDnd, "data-id": rest.tid, style: style }, rest), children));
|
36
36
|
};
|
37
37
|
// 导出静态方法以支持 Modal.info() 等调用方式
|
38
38
|
UniModal.info = AntModal.info;
|
@@ -6,49 +6,49 @@ export const UniRadio = (_a) => {
|
|
6
6
|
var _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style, theme } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style", "theme"]);
|
7
7
|
const redCss = `
|
8
8
|
/* 悬停时圆圈变红 */
|
9
|
-
.uni-${
|
9
|
+
.uni-${rest.tid}:hover .ant-radio-inner {
|
10
10
|
border-color: #B30000 !important;
|
11
11
|
}
|
12
12
|
|
13
13
|
/* 选中状态 - 边框变红 */
|
14
|
-
.uni-${
|
14
|
+
.uni-${rest.tid} .ant-radio-input:checked + .ant-radio-inner {
|
15
15
|
border-color: #B30000 !important;
|
16
16
|
}
|
17
17
|
|
18
18
|
/* 选中状态 - 中心点变红(覆盖整个内圆) */
|
19
|
-
.uni-${
|
19
|
+
.uni-${rest.tid} .ant-radio-input:checked + .ant-radio-inner::after {
|
20
20
|
background-color: #B30000 !important;
|
21
21
|
}
|
22
22
|
`;
|
23
23
|
const blueCss = `
|
24
24
|
/* 悬停时圆圈变蓝 */
|
25
|
-
.uni-${
|
25
|
+
.uni-${rest.tid}:hover .ant-radio-inner {
|
26
26
|
border-color: #1890ff !important;
|
27
27
|
}
|
28
28
|
|
29
29
|
/* 选中状态 - 边框变蓝 */
|
30
|
-
.uni-${
|
30
|
+
.uni-${rest.tid} .ant-radio-input:checked + .ant-radio-inner {
|
31
31
|
border-color: #1890ff !important;
|
32
32
|
}
|
33
33
|
|
34
34
|
/* 选中状态 - 中心点变蓝(覆盖整个内圆) */
|
35
|
-
.uni-${
|
35
|
+
.uni-${rest.tid} .ant-radio-input:checked + .ant-radio-inner::after {
|
36
36
|
background-color: #1890ff !important;
|
37
37
|
}
|
38
38
|
`;
|
39
39
|
const greenCss = `
|
40
40
|
/* 悬停时圆圈变绿 */
|
41
|
-
.uni-${
|
41
|
+
.uni-${rest.tid}:hover .ant-radio-inner {
|
42
42
|
border-color: #17c60e !important;
|
43
43
|
}
|
44
44
|
|
45
45
|
/* 选中状态 - 边框变绿 */
|
46
|
-
.uni-${
|
46
|
+
.uni-${rest.tid} .ant-radio-input:checked + .ant-radio-inner {
|
47
47
|
border-color: #17c60e !important;
|
48
48
|
}
|
49
49
|
|
50
50
|
/* 选中状态 - 中心点变绿(覆盖整个内圆) */
|
51
|
-
.uni-${
|
51
|
+
.uni-${rest.tid} .ant-radio-input:checked + .ant-radio-inner::after {
|
52
52
|
background-color: #17c60e !important;
|
53
53
|
}
|
54
54
|
`;
|
@@ -61,56 +61,56 @@ export const UniRadio = (_a) => {
|
|
61
61
|
document.head.appendChild(style);
|
62
62
|
}
|
63
63
|
}, [theme]);
|
64
|
-
return (React.createElement("div", { "data-dnd": dataDnd, "data-id":
|
65
|
-
React.createElement(AntdRadio, Object.assign({ className: `uni-${
|
64
|
+
return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
|
65
|
+
React.createElement(AntdRadio, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}` }, rest))));
|
66
66
|
};
|
67
67
|
export const UniRadioGroup = (_a) => {
|
68
68
|
var _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style, theme } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style", "theme"]);
|
69
69
|
const redCss = `
|
70
70
|
/* 悬停时圆圈变红 */
|
71
|
-
.uni-${
|
71
|
+
.uni-${rest.tid}:hover .ant-radio-inner {
|
72
72
|
border-color: #B30000 !important;
|
73
73
|
}
|
74
74
|
|
75
75
|
/* 选中状态 - 边框变红 */
|
76
|
-
.uni-${
|
76
|
+
.uni-${rest.tid} .ant-radio-input:checked + .ant-radio-inner {
|
77
77
|
border-color: #B30000 !important;
|
78
78
|
}
|
79
79
|
|
80
80
|
/* 选中状态 - 中心点变红(覆盖整个内圆) */
|
81
|
-
.uni-${
|
81
|
+
.uni-${rest.tid} .ant-radio-input:checked + .ant-radio-inner::after {
|
82
82
|
background-color: #B30000 !important;
|
83
83
|
}
|
84
84
|
`;
|
85
85
|
const blueCss = `
|
86
86
|
/* 悬停时圆圈变蓝 */
|
87
|
-
.uni-${
|
87
|
+
.uni-${rest.tid}:hover .ant-radio-inner {
|
88
88
|
border-color: #1890ff !important;
|
89
89
|
}
|
90
90
|
|
91
91
|
/* 选中状态 - 边框变蓝 */
|
92
|
-
.uni-${
|
92
|
+
.uni-${rest.tid} .ant-radio-input:checked + .ant-radio-inner {
|
93
93
|
border-color: #1890ff !important;
|
94
94
|
}
|
95
95
|
|
96
96
|
/* 选中状态 - 中心点变蓝(覆盖整个内圆) */
|
97
|
-
.uni-${
|
97
|
+
.uni-${rest.tid} .ant-radio-input:checked + .ant-radio-inner::after {
|
98
98
|
background-color: #1890ff !important;
|
99
99
|
}
|
100
100
|
`;
|
101
101
|
const greenCss = `
|
102
102
|
/* 悬停时圆圈变绿 */
|
103
|
-
.uni-${
|
103
|
+
.uni-${rest.tid}:hover .ant-radio-inner {
|
104
104
|
border-color: #17c60e !important;
|
105
105
|
}
|
106
106
|
|
107
107
|
/* 选中状态 - 边框变绿 */
|
108
|
-
.uni-${
|
108
|
+
.uni-${rest.tid} .ant-radio-input:checked + .ant-radio-inner {
|
109
109
|
border-color: #17c60e !important;
|
110
110
|
}
|
111
111
|
|
112
112
|
/* 选中状态 - 中心点变绿(覆盖整个内圆) */
|
113
|
-
.uni-${
|
113
|
+
.uni-${rest.tid} .ant-radio-input:checked + .ant-radio-inner::after {
|
114
114
|
background-color: #17c60e !important;
|
115
115
|
}
|
116
116
|
`;
|
@@ -123,6 +123,6 @@ export const UniRadioGroup = (_a) => {
|
|
123
123
|
document.head.appendChild(style);
|
124
124
|
}
|
125
125
|
}, [theme]);
|
126
|
-
return (React.createElement("div", { "data-dnd": dataDnd, "data-id":
|
127
|
-
React.createElement(AntdRadio.Group, Object.assign({ className: `uni-${
|
126
|
+
return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
|
127
|
+
React.createElement(AntdRadio.Group, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}` }, rest), rest.children)));
|
128
128
|
};
|
@@ -5,19 +5,19 @@ import { SLOT } from '../../helpers/slottype';
|
|
5
5
|
export const UniSelect = (_a) => {
|
6
6
|
var _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style, theme } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style", "theme"]);
|
7
7
|
const redCss = `
|
8
|
-
.uni-${
|
8
|
+
.uni-${rest.tid} .ant-select-item-option-selected {
|
9
9
|
color: #B30000;
|
10
10
|
background: #fff3f3
|
11
11
|
}
|
12
12
|
`;
|
13
13
|
const blueCss = `
|
14
|
-
.uni-${
|
14
|
+
.uni-${rest.tid} .ant-select-item-option-selected {
|
15
15
|
color: #1890ff;
|
16
16
|
background: #e6f7ff
|
17
17
|
}
|
18
18
|
`;
|
19
19
|
const greenCss = `
|
20
|
-
.uni-${
|
20
|
+
.uni-${rest.tid} .ant-select-item-option-selected {
|
21
21
|
color: #17c60e;
|
22
22
|
background: #f6ffed
|
23
23
|
}
|
@@ -31,10 +31,10 @@ export const UniSelect = (_a) => {
|
|
31
31
|
document.head.appendChild(style);
|
32
32
|
}
|
33
33
|
}, [theme]);
|
34
|
-
return (React.createElement("div", { "data-dnd": dataDnd, "data-id":
|
34
|
+
return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true },
|
35
35
|
React.createElement(AntSelect
|
36
|
-
// className={`uni-${
|
36
|
+
// className={`uni-${rest.tid}`}
|
37
37
|
, Object.assign({
|
38
|
-
// className={`uni-${
|
39
|
-
className: `uni-${
|
38
|
+
// className={`uni-${rest.tid}`}
|
39
|
+
className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}`, dropdownClassName: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}`, style: style }, rest))));
|
40
40
|
};
|
@@ -6,19 +6,19 @@ export const UniSwitch = (_a) => {
|
|
6
6
|
var _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style, theme } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style", "theme"]);
|
7
7
|
const redCss = `
|
8
8
|
/* 根据tid定制Switch组件样式 */
|
9
|
-
.uni-${
|
9
|
+
.uni-${rest.tid}[tid="${rest.tid}"].ant-switch-checked {
|
10
10
|
background-color: #B30000;
|
11
11
|
}
|
12
12
|
`;
|
13
13
|
const blueCss = `
|
14
14
|
/* 根据tid定制Switch组件样式 */
|
15
|
-
.uni-${
|
15
|
+
.uni-${rest.tid}[tid="${rest.tid}"].ant-switch-checked {
|
16
16
|
background-color: #1890ff;
|
17
17
|
}
|
18
18
|
`;
|
19
19
|
const greenCss = `
|
20
20
|
/* 根据tid定制Switch组件样式 */
|
21
|
-
.uni-${
|
21
|
+
.uni-${rest.tid}[tid="${rest.tid}"].ant-switch-checked {
|
22
22
|
background-color: #17c60e;
|
23
23
|
}
|
24
24
|
`;
|
@@ -32,5 +32,5 @@ export const UniSwitch = (_a) => {
|
|
32
32
|
}
|
33
33
|
}, [theme]);
|
34
34
|
return (React.createElement("div", { "data-dnd": dataDnd, "data-id": dataId, draggable: true },
|
35
|
-
React.createElement(AntdSwitch, Object.assign({ className: `uni-${
|
35
|
+
React.createElement(AntdSwitch, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}` }, rest))));
|
36
36
|
};
|
@@ -4,11 +4,11 @@ import React, { useEffect } from 'react';
|
|
4
4
|
import { SLOT } from '../../helpers/slottype';
|
5
5
|
export const UniTabs = (_a) => {
|
6
6
|
var { children } = _a, _b = SLOT.dnd, dataDnd = _a[_b], _c = SLOT.id, dataId = _a[_c], { style, theme } = _a, rest = __rest(_a, ["children", typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style", "theme"]);
|
7
|
-
const redCss = `.uni-${
|
7
|
+
const redCss = `.uni-${rest.tid} .ant-tabs-ink-bar{
|
8
8
|
background: #C20000;
|
9
9
|
}
|
10
10
|
|
11
|
-
.uni-${
|
11
|
+
.uni-${rest.tid} .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
|
12
12
|
color: #C20000;
|
13
13
|
font-size: "16px";
|
14
14
|
font-weight: 600;
|
@@ -17,19 +17,19 @@ export const UniTabs = (_a) => {
|
|
17
17
|
text-align: left;
|
18
18
|
}
|
19
19
|
|
20
|
-
.uni-${
|
20
|
+
.uni-${rest.tid} .ant-tabs-tab .ant-tabs-tab-btn:hover {
|
21
21
|
color: #C20000;
|
22
22
|
}
|
23
23
|
|
24
|
-
.uni-${
|
24
|
+
.uni-${rest.tid} .ant-tabs-tab:hover {
|
25
25
|
color: #C20000;
|
26
26
|
}
|
27
27
|
`;
|
28
|
-
const blueCss = `.uni-${
|
28
|
+
const blueCss = `.uni-${rest.tid} .ant-tabs-ink-bar{
|
29
29
|
background: #1890ff;
|
30
30
|
}
|
31
31
|
|
32
|
-
.uni-${
|
32
|
+
.uni-${rest.tid} .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
|
33
33
|
color: #1890ff;
|
34
34
|
font-size: "16px";
|
35
35
|
font-weight: 600;
|
@@ -38,18 +38,18 @@ export const UniTabs = (_a) => {
|
|
38
38
|
text-align: left;
|
39
39
|
}
|
40
40
|
|
41
|
-
.uni-${
|
41
|
+
.uni-${rest.tid} .ant-tabs-tab .ant-tabs-tab-btn:hover {
|
42
42
|
color: #1890ff;
|
43
43
|
}
|
44
44
|
|
45
|
-
.uni-${
|
45
|
+
.uni-${rest.tid} .ant-tabs-tab:hover {
|
46
46
|
color: #1890ff;
|
47
47
|
}`;
|
48
|
-
const greenCss = `.uni-${
|
48
|
+
const greenCss = `.uni-${rest.tid} .ant-tabs-ink-bar{
|
49
49
|
background: #17c60e;
|
50
50
|
}
|
51
51
|
|
52
|
-
.uni-${
|
52
|
+
.uni-${rest.tid} .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
|
53
53
|
color: #17c60e;
|
54
54
|
font-size: "16px";
|
55
55
|
font-weight: 600;
|
@@ -58,11 +58,11 @@ export const UniTabs = (_a) => {
|
|
58
58
|
text-align: left;
|
59
59
|
}
|
60
60
|
|
61
|
-
.uni-${
|
61
|
+
.uni-${rest.tid} .ant-tabs-tab .ant-tabs-tab-btn:hover {
|
62
62
|
color: #17c60e;
|
63
63
|
}
|
64
64
|
|
65
|
-
.uni-${
|
65
|
+
.uni-${rest.tid} .ant-tabs-tab:hover {
|
66
66
|
color: #17c60e;
|
67
67
|
}`;
|
68
68
|
useEffect(() => {
|
@@ -74,7 +74,7 @@ export const UniTabs = (_a) => {
|
|
74
74
|
document.head.appendChild(style);
|
75
75
|
}
|
76
76
|
}, [theme]);
|
77
|
-
return (React.createElement(AntTabs, Object.assign({ className: `uni-${
|
77
|
+
return (React.createElement(AntTabs, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}`, "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style }, rest), children));
|
78
78
|
};
|
79
79
|
export const UniTabsPane = (props) => {
|
80
80
|
return (React.createElement(AntTabs.TabPane, Object.assign({}, props), props.children));
|
@@ -10,21 +10,21 @@ export const UniUpload = (_a) => {
|
|
10
10
|
dataId = _a[_b], _c = SLOT.dnd, dataDnd = _a[_c], { style, theme } = _a, rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + "", typeof _c === "symbol" ? _c : _c + "", "style", "theme"]);
|
11
11
|
//console.log("新的descriptions组件0507001", dataId, dataDnd, rest);
|
12
12
|
const redCss = `
|
13
|
-
.uni-${
|
13
|
+
.uni-${rest.tid} .ant-btn, .uni-${rest.tid} .ant-btn:hover, .uni-${rest.tid} .ant-btn:focus {
|
14
14
|
color: #fff;
|
15
15
|
border-color: #B20000;
|
16
16
|
background: #B20000;
|
17
17
|
}
|
18
18
|
`;
|
19
19
|
const blueCss = `
|
20
|
-
.uni-${
|
20
|
+
.uni-${rest.tid} .ant-btn, .uni-${rest.tid} .ant-btn:hover, .uni-${rest.tid} .ant-btn:focus {
|
21
21
|
color: #fff;
|
22
22
|
border-color: #1890ff;
|
23
23
|
background: #1890ff;
|
24
24
|
}
|
25
25
|
`;
|
26
26
|
const greenCss = `
|
27
|
-
.uni-${
|
27
|
+
.uni-${rest.tid} .ant-btn, .uni-${rest.tid} .ant-btn:hover, .uni-${rest.tid} .ant-btn:focus {
|
28
28
|
color: #fff;
|
29
29
|
border-color: #17c60e;
|
30
30
|
background: #17c60e;
|
@@ -39,6 +39,6 @@ export const UniUpload = (_a) => {
|
|
39
39
|
document.head.appendChild(style);
|
40
40
|
}
|
41
41
|
}, [theme]);
|
42
|
-
return (React.createElement("div", { "data-dnd": dataDnd, "data-id":
|
43
|
-
React.createElement(AntUpload, Object.assign({ className: `uni-${
|
42
|
+
return (React.createElement("div", { "data-dnd": dataDnd, "data-id": rest.tid, draggable: true, style: style },
|
43
|
+
React.createElement(AntUpload, Object.assign({ className: `uni-${rest.tid} ${theme ? `theme-${theme}` : ''}` }, rest), rest.children)));
|
44
44
|
};
|
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.48",
|
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": "c2fedbc24211a437f52446fccf7bd0693b2e6488"
|
59
59
|
}
|