yootd 0.0.65 → 0.0.67
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.
@@ -14,6 +14,12 @@ import { useBem } from "../../hooks/useBem";
|
|
14
14
|
import { DelBtnIcon } from "./DelBtnIcon";
|
15
15
|
import { DragBtnIcon } from "./DragBtnIcon";
|
16
16
|
import { EditBtnIcon } from "./EditBtnIcon";
|
17
|
+
var statusColor = {
|
18
|
+
primary: 'primary',
|
19
|
+
success: 'success',
|
20
|
+
warning: 'warning',
|
21
|
+
error: 'error'
|
22
|
+
};
|
17
23
|
var SortableItem = function SortableItem(_ref) {
|
18
24
|
var activeKey = _ref.activeKey,
|
19
25
|
id = _ref.id,
|
@@ -24,6 +30,7 @@ var SortableItem = function SortableItem(_ref) {
|
|
24
30
|
title = _ref.title,
|
25
31
|
checked = _ref.checked,
|
26
32
|
extra = _ref.extra,
|
33
|
+
status = _ref.status,
|
27
34
|
data = _ref.data,
|
28
35
|
_onClick = _ref.onClick,
|
29
36
|
onEdit = _ref.onEdit,
|
@@ -38,6 +45,7 @@ var SortableItem = function SortableItem(_ref) {
|
|
38
45
|
transform = _useSortable.transform,
|
39
46
|
transition = _useSortable.transition,
|
40
47
|
isDragging = _useSortable.isDragging;
|
48
|
+
console.log(statusColor[status !== null && status !== void 0 ? status : '']);
|
41
49
|
var style = _objectSpread({
|
42
50
|
transform: CSS.Transform.toString(transform),
|
43
51
|
transition: transition
|
@@ -51,7 +59,7 @@ var SortableItem = function SortableItem(_ref) {
|
|
51
59
|
style: style,
|
52
60
|
className: "".concat(mb)
|
53
61
|
}, /*#__PURE__*/React.createElement("div", {
|
54
|
-
className: "".concat(mb.b('content'), " ").concat(id === activeKey ? "".concat(mb.e('content-active')) : ''),
|
62
|
+
className: "".concat(mb.b('content'), " ").concat(id === activeKey ? "".concat(mb.e('content-active')) : '', " ").concat(mb.b(statusColor[status !== null && status !== void 0 ? status : ''])),
|
55
63
|
key: id,
|
56
64
|
onClick: function onClick() {
|
57
65
|
_onClick === null || _onClick === void 0 || _onClick(id, {
|
@@ -67,7 +67,7 @@
|
|
67
67
|
}
|
68
68
|
}
|
69
69
|
&-content:hover {
|
70
|
-
background-color:
|
70
|
+
background-color: var(--ant-color-primary-border);
|
71
71
|
transition: all 0.05s ease;
|
72
72
|
}
|
73
73
|
&-content::before {
|
@@ -81,7 +81,7 @@
|
|
81
81
|
z-index: 100;
|
82
82
|
}
|
83
83
|
&__content-active {
|
84
|
-
background-color:
|
84
|
+
background-color: var(--ant-color-primary-border);
|
85
85
|
}
|
86
86
|
&__content-active::after {
|
87
87
|
content: '';
|
@@ -90,7 +90,22 @@
|
|
90
90
|
left: 0;
|
91
91
|
width: 4px;
|
92
92
|
height: 100%;
|
93
|
-
background-color:
|
94
|
-
|
93
|
+
background-color: var(--ant-color-primary);
|
94
|
+
}
|
95
|
+
&-primary {
|
96
|
+
border: 4px solid var(--ant-color-primary);
|
97
|
+
z-index: 999;
|
98
|
+
}
|
99
|
+
&-success {
|
100
|
+
border: 4px solid var(--ant-color-success);
|
101
|
+
z-index: 999;
|
102
|
+
}
|
103
|
+
&-warning {
|
104
|
+
border: 4px solid var(--ant-color-warning);
|
105
|
+
z-index: 999;
|
106
|
+
}
|
107
|
+
&-error {
|
108
|
+
border: 4px solid var(--ant-color-error);
|
109
|
+
z-index: 999;
|
95
110
|
}
|
96
111
|
}
|
package/dist/aside/index.js
CHANGED
@@ -162,6 +162,8 @@ export var Aside = function Aside(_ref) {
|
|
162
162
|
useEffect(function () {
|
163
163
|
if (data != null && (data === null || data === void 0 ? void 0 : data.length) > 0) {
|
164
164
|
setDataValue(data);
|
165
|
+
} else {
|
166
|
+
setDataValue([]);
|
165
167
|
}
|
166
168
|
}, [data]);
|
167
169
|
return /*#__PURE__*/React.createElement("div", {
|
@@ -212,7 +214,8 @@ export var Aside = function Aside(_ref) {
|
|
212
214
|
onEdit: handleEdit,
|
213
215
|
onDel: handleDel,
|
214
216
|
onSwitch: handleSwitch,
|
215
|
-
data: item.data
|
217
|
+
data: item.data,
|
218
|
+
status: item.status
|
216
219
|
});
|
217
220
|
})))));
|
218
221
|
};
|
@@ -3,6 +3,7 @@ type IdataItem = {
|
|
3
3
|
title: string;
|
4
4
|
extra?: string;
|
5
5
|
checked?: boolean;
|
6
|
+
status?: string;
|
6
7
|
data?: any;
|
7
8
|
};
|
8
9
|
export type AsideProps = {
|
@@ -41,6 +42,7 @@ export type AsideItemProps = {
|
|
41
42
|
dragBtnIcon?: boolean;
|
42
43
|
checked?: boolean;
|
43
44
|
extra?: string;
|
45
|
+
status?: string;
|
44
46
|
data?: any;
|
45
47
|
onClick?: (key: string, e: IdataItem) => void;
|
46
48
|
onEdit?: (key: string, e: IdataItem) => void;
|