yootd 0.0.7 → 0.0.8
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/LICENSE +21 -21
- package/README.md +43 -43
- package/dist/Preview/components/preview/phone.scss +8 -8
- package/dist/Preview/index.scss +35 -35
- package/dist/Preview/types/type.d.ts +21 -21
- package/dist/anchor/index.scss +23 -23
- package/dist/approval-process/index.scss +95 -95
- package/dist/areas/index.scss +21 -21
- package/dist/areas/types/types.d.ts +39 -39
- package/dist/aside/components/SortableItem.scss +93 -93
- package/dist/aside/index.scss +25 -25
- package/dist/aside/types/types.d.ts +44 -44
- package/dist/badge/index.scss +5 -5
- package/dist/buildings/types/types.d.ts +21 -21
- package/dist/button/index.scss +30 -30
- package/dist/cascader/index.scss +5 -5
- package/dist/courses/types/types.d.ts +18 -18
- package/dist/dictionary/types/types.d.ts +14 -14
- package/dist/drawer-modal/index.scss +39 -39
- package/dist/drawer-modal/types/types.d.ts +3 -3
- package/dist/dropdown/assets/arrow-down.svg +5 -5
- package/dist/empty/index.scss +15 -15
- package/dist/group-title/index.scss +31 -31
- package/dist/image/index.scss +26 -26
- package/dist/input/index.scss +5 -5
- package/dist/modal/index.scss +65 -65
- package/dist/pagination/index.scss +47 -47
- package/dist/school/index.scss +21 -21
- package/dist/school/types/types.d.ts +84 -84
- package/dist/state/index.scss +89 -89
- package/dist/steps/index.scss +32 -32
- package/dist/student-dropdown/types/types.d.ts +44 -44
- package/dist/table/components/primary-header-row/index.scss +58 -58
- package/dist/table/components/primary-tbody-row/index.scss +5 -5
- package/dist/table/index.module.scss +9 -9
- package/dist/table/index.scss +33 -33
- package/dist/tabs/index.scss +81 -61
- package/dist/tag/index.d.ts +5 -2
- package/dist/tag/index.js +12 -1
- package/dist/tag/index.scss +5 -0
- package/dist/teacher/types/types.d.ts +31 -31
- package/dist/tree/index.scss +25 -25
- package/dist/upload/components/fileUpload.js +17 -27
- package/dist/upload/components/imageUpload.js +16 -26
- package/dist/upload/index.scss +115 -115
- package/dist/user-dropdown/types/types.d.ts +45 -45
- package/dist/year-term/index.scss +21 -21
- package/dist/year-term/types/types.d.ts +28 -28
- package/dist/zones/index.module.scss +23 -23
- package/dist/zones/types/types.d.ts +26 -26
- package/package.json +1 -1
package/dist/tabs/index.scss
CHANGED
@@ -1,61 +1,81 @@
|
|
1
|
-
.yot-tabs {
|
2
|
-
&-large {
|
3
|
-
.ant-tabs-tab.ant-tabs-tab-active {
|
4
|
-
color: var(--ant-color-primary);
|
5
|
-
}
|
6
|
-
.ant-tabs-tab-btn {
|
7
|
-
font-size: var(--ant-font-size-lg);
|
8
|
-
}
|
9
|
-
.ant-tabs-nav-wrap {
|
10
|
-
background-color: white;
|
11
|
-
padding-left:
|
12
|
-
padding-right:
|
13
|
-
}
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
background-color: white;
|
34
|
-
padding-left:
|
35
|
-
padding-right:
|
36
|
-
}
|
37
|
-
.ant-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
color:
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
.ant-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
1
|
+
.yot-tabs {
|
2
|
+
&-large {
|
3
|
+
.ant-tabs-tab.ant-tabs-tab-active {
|
4
|
+
color: var(--ant-color-primary);
|
5
|
+
}
|
6
|
+
.ant-tabs-tab-btn {
|
7
|
+
font-size: var(--ant-font-size-lg);
|
8
|
+
}
|
9
|
+
.ant-tabs-nav-wrap {
|
10
|
+
background-color: white;
|
11
|
+
padding-left: 1.5rem;
|
12
|
+
padding-right: 1.5rem;
|
13
|
+
}
|
14
|
+
.ant-tabs-nav::before{
|
15
|
+
content: '';
|
16
|
+
position: absolute;
|
17
|
+
right: 1.5rem;
|
18
|
+
left: 1.5rem;
|
19
|
+
z-index: 10;
|
20
|
+
border-bottom-width: var(--ant-line-width);
|
21
|
+
border-bottom-style: solid;
|
22
|
+
border-bottom-color: #E5E5E5;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
&-small {
|
26
|
+
.ant-tabs-tab.ant-tabs-tab-active {
|
27
|
+
color: var(--ant-color-primary);
|
28
|
+
}
|
29
|
+
.ant-tabs-tab-btn {
|
30
|
+
font-size: var(--ant-font-size);
|
31
|
+
}
|
32
|
+
.ant-tabs-nav-wrap {
|
33
|
+
background-color: white;
|
34
|
+
padding-left: 1.5rem;
|
35
|
+
padding-right: 1.5rem;
|
36
|
+
}
|
37
|
+
.ant-tabs-nav::before{
|
38
|
+
content: '';
|
39
|
+
position: absolute;
|
40
|
+
right: 1.5rem;
|
41
|
+
left: 1.5rem;
|
42
|
+
z-index: 10;
|
43
|
+
border-bottom-width: var(--ant-line-width);
|
44
|
+
border-bottom-style: solid;
|
45
|
+
border-bottom-color: #E5E5E5;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
&-capsule {
|
49
|
+
&__content {
|
50
|
+
padding-top: var(--ant-margin);
|
51
|
+
padding-bottom: var(--ant-margin);
|
52
|
+
box-sizing: border-box;
|
53
|
+
background-color: white;
|
54
|
+
padding-left: var(--ant-padding-lg);
|
55
|
+
padding-right: var(--ant-padding-lg);
|
56
|
+
}
|
57
|
+
.ant-radio-button-wrapper.ant-radio-button-wrapper-checked.css-var-r4.ant-radio-css-var {
|
58
|
+
padding-left: var(--ant-padding);
|
59
|
+
padding-right: var(--ant-padding);
|
60
|
+
box-sizing: border-box;
|
61
|
+
font-size: var(--ant-font-size);
|
62
|
+
color: var(--ant-color-primary);
|
63
|
+
}
|
64
|
+
.ant-radio-button.ant-radio-button-checked {
|
65
|
+
font-size: var(--ant-font-size);
|
66
|
+
color: var(--ant-color-primary);
|
67
|
+
}
|
68
|
+
&__value {
|
69
|
+
font-size: 14px;
|
70
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
71
|
+
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
|
72
|
+
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
73
|
+
color: #000000e0;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
&-istabmargin {
|
77
|
+
.ant-tabs-nav {
|
78
|
+
margin-bottom: 0;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
package/dist/tag/index.d.ts
CHANGED
@@ -1,2 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import type { TagProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
import './index.scss';
|
4
|
+
export type { TagProps };
|
5
|
+
export declare const Tag: React.FC<TagProps>;
|
package/dist/tag/index.js
CHANGED
@@ -1,2 +1,13 @@
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
2
|
+
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
|
1
3
|
import { Tag as AntTag } from 'antd';
|
2
|
-
|
4
|
+
import React from 'react';
|
5
|
+
import { useBem } from "../hooks/useBem";
|
6
|
+
import "./index.scss";
|
7
|
+
export var Tag = function Tag(_ref) {
|
8
|
+
var props = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
|
9
|
+
var mb = useBem('tag');
|
10
|
+
return /*#__PURE__*/React.createElement(AntTag, _extends({
|
11
|
+
className: "".concat(mb.e('text'))
|
12
|
+
}, props));
|
13
|
+
};
|
@@ -1,31 +1,31 @@
|
|
1
|
-
import { SelectProps } from 'yootd';
|
2
|
-
|
3
|
-
export interface PageData<T> {
|
4
|
-
content: T[];
|
5
|
-
page: {
|
6
|
-
number: number;
|
7
|
-
size: number;
|
8
|
-
totalElements: number;
|
9
|
-
totalPages: number;
|
10
|
-
};
|
11
|
-
}
|
12
|
-
// 查询老师返回的数据类型
|
13
|
-
export interface IteacherItem {
|
14
|
-
[key: string]: string | number;
|
15
|
-
userId: number; // 老师ID
|
16
|
-
personalName: string; // 老师姓名
|
17
|
-
personalMobile?: string; // 手机号
|
18
|
-
uniqueNumber?: string; // 工号
|
19
|
-
nationName?: string; // 民族
|
20
|
-
gender?: number; // 性别
|
21
|
-
}
|
22
|
-
type LabelOptions =
|
23
|
-
| 'personalName'
|
24
|
-
| 'uniqueNumber'
|
25
|
-
| 'personalMobile'
|
26
|
-
| 'nationName'
|
27
|
-
| 'genderName';
|
28
|
-
export type TeacherProps = SelectProps & {
|
29
|
-
label?: LabelOptions[];
|
30
|
-
connectors?: string;
|
31
|
-
};
|
1
|
+
import { SelectProps } from 'yootd';
|
2
|
+
|
3
|
+
export interface PageData<T> {
|
4
|
+
content: T[];
|
5
|
+
page: {
|
6
|
+
number: number;
|
7
|
+
size: number;
|
8
|
+
totalElements: number;
|
9
|
+
totalPages: number;
|
10
|
+
};
|
11
|
+
}
|
12
|
+
// 查询老师返回的数据类型
|
13
|
+
export interface IteacherItem {
|
14
|
+
[key: string]: string | number;
|
15
|
+
userId: number; // 老师ID
|
16
|
+
personalName: string; // 老师姓名
|
17
|
+
personalMobile?: string; // 手机号
|
18
|
+
uniqueNumber?: string; // 工号
|
19
|
+
nationName?: string; // 民族
|
20
|
+
gender?: number; // 性别
|
21
|
+
}
|
22
|
+
type LabelOptions =
|
23
|
+
| 'personalName'
|
24
|
+
| 'uniqueNumber'
|
25
|
+
| 'personalMobile'
|
26
|
+
| 'nationName'
|
27
|
+
| 'genderName';
|
28
|
+
export type TeacherProps = SelectProps & {
|
29
|
+
label?: LabelOptions[];
|
30
|
+
connectors?: string;
|
31
|
+
};
|
package/dist/tree/index.scss
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
.yot-tree {
|
2
|
-
.ant-tree-node-content-wrapper.ant-tree-node-selected {
|
3
|
-
background-color: var(--ant-color-primary-bg);
|
4
|
-
.ant-tree-title {
|
5
|
-
color: var(--ant-color-primary);
|
6
|
-
}
|
7
|
-
}
|
8
|
-
.ant-tree-node-content-wrapper {
|
9
|
-
.ant-tree-title {
|
10
|
-
color: var(--ant-color-text-secondary);
|
11
|
-
}
|
12
|
-
}
|
13
|
-
&__icon {
|
14
|
-
margin-top: 2px;
|
15
|
-
&.yot-is-selected {
|
16
|
-
.path-1 {
|
17
|
-
stroke: var(--ant-color-primary);
|
18
|
-
}
|
19
|
-
.path-2,
|
20
|
-
.rect-1 {
|
21
|
-
fill: var(--ant-color-primary);
|
22
|
-
}
|
23
|
-
}
|
24
|
-
}
|
25
|
-
}
|
1
|
+
.yot-tree {
|
2
|
+
.ant-tree-node-content-wrapper.ant-tree-node-selected {
|
3
|
+
background-color: var(--ant-color-primary-bg);
|
4
|
+
.ant-tree-title {
|
5
|
+
color: var(--ant-color-primary);
|
6
|
+
}
|
7
|
+
}
|
8
|
+
.ant-tree-node-content-wrapper {
|
9
|
+
.ant-tree-title {
|
10
|
+
color: var(--ant-color-text-secondary);
|
11
|
+
}
|
12
|
+
}
|
13
|
+
&__icon {
|
14
|
+
margin-top: 2px;
|
15
|
+
&.yot-is-selected {
|
16
|
+
.path-1 {
|
17
|
+
stroke: var(--ant-color-primary);
|
18
|
+
}
|
19
|
+
.path-2,
|
20
|
+
.rect-1 {
|
21
|
+
fill: var(--ant-color-primary);
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
@@ -119,9 +119,7 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
119
119
|
var filteredList = _fileList.filter(function (item) {
|
120
120
|
return !(item.uid === file.uid && item.status === 'error');
|
121
121
|
});
|
122
|
-
|
123
|
-
return item.status === 'done';
|
124
|
-
});
|
122
|
+
// const filterError = _fileList.filter((item) => item.status === 'done');
|
125
123
|
var _list = Array.from([]);
|
126
124
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
127
125
|
// @ts-expect-error
|
@@ -134,16 +132,9 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
134
132
|
status: 'done'
|
135
133
|
});
|
136
134
|
});
|
137
|
-
|
138
|
-
//
|
139
|
-
// @ts-expect-error
|
140
|
-
fileList === null || fileList === void 0 || fileList.map(function (item) {
|
141
|
-
return _url.push(item.preview);
|
142
|
-
});
|
143
|
-
onChange === null || onChange === void 0 || onChange([].concat(_toConsumableArray(filterError), _list));
|
144
|
-
setFileList([].concat(_toConsumableArray(filteredList), _list));
|
135
|
+
onChange === null || onChange === void 0 || onChange([].concat(_toConsumableArray(filteredList), _list));
|
136
|
+
// setFileList([...filteredList, ..._list]);
|
145
137
|
}).catch(function () {
|
146
|
-
// const msg = e?.response?.data?.[0]?.message;
|
147
138
|
var _fileList = Array.from([]);
|
148
139
|
_fileList.push({
|
149
140
|
name: file.name,
|
@@ -155,7 +146,8 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
155
146
|
type: file.type,
|
156
147
|
originFileObj: file
|
157
148
|
});
|
158
|
-
|
149
|
+
onChange === null || onChange === void 0 || onChange([].concat(_toConsumableArray(fileList), _fileList));
|
150
|
+
// setFileList([...fileList, ..._fileList]);
|
159
151
|
var msg = '上传失败!';
|
160
152
|
void messageApi.error(msg);
|
161
153
|
});
|
@@ -166,7 +158,7 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
166
158
|
return item.uid !== file.uid;
|
167
159
|
});
|
168
160
|
onChange === null || onChange === void 0 || onChange(newFileList);
|
169
|
-
setFileList(newFileList);
|
161
|
+
// setFileList(newFileList);
|
170
162
|
};
|
171
163
|
var ReUpload = function ReUpload(file) {
|
172
164
|
if (file.originFileObj) {
|
@@ -186,28 +178,24 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
186
178
|
}
|
187
179
|
}
|
188
180
|
var newFileList = useMemo(function () {
|
189
|
-
return fileList != null
|
190
|
-
return item.url;
|
191
|
-
}) ? fileList === null || fileList === void 0 ? void 0 : fileList.map(function (item) {
|
181
|
+
return fileList != null ? fileList === null || fileList === void 0 ? void 0 : fileList.map(function (item) {
|
192
182
|
return _objectSpread(_objectSpread({}, item), {}, {
|
193
183
|
url: "".concat(assetsURL, "/").concat(item.url)
|
194
184
|
});
|
195
185
|
}) : [];
|
196
186
|
}, [fileList]);
|
197
187
|
useEffect(function () {
|
198
|
-
if (value != null
|
199
|
-
var _value$filter;
|
188
|
+
if (value != null) {
|
200
189
|
var _fileList = Array.from([]);
|
201
|
-
value === null || value === void 0 ||
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
uid: "".concat(Date.now(), ".fileUid"),
|
190
|
+
value === null || value === void 0 || value.map(function (item, index) {
|
191
|
+
var _item$uid, _item$status;
|
192
|
+
return _fileList.push(_objectSpread(_objectSpread({}, item), {}, {
|
193
|
+
uid: (_item$uid = item.uid) !== null && _item$uid !== void 0 ? _item$uid : "".concat(Date.now(), "-").concat(index),
|
206
194
|
name: item.name,
|
207
|
-
status: 'done',
|
195
|
+
status: (_item$status = item.status) !== null && _item$status !== void 0 ? _item$status : 'done',
|
208
196
|
url: item.url,
|
209
197
|
preview: item.url
|
210
|
-
});
|
198
|
+
}));
|
211
199
|
});
|
212
200
|
setFileList(_fileList);
|
213
201
|
}
|
@@ -250,7 +238,9 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
250
238
|
},
|
251
239
|
showRemoveIcon: false
|
252
240
|
}
|
253
|
-
}, props
|
241
|
+
}, props, {
|
242
|
+
onChange: undefined
|
243
|
+
}), (fileList === null || fileList === void 0 || (_fileList$filter = fileList.filter(function (item) {
|
254
244
|
return item.url != null;
|
255
245
|
})) === null || _fileList$filter === void 0 ? void 0 : _fileList$filter.length) >= (maxCount != null ? maxCount : 1) ? null : uploadButton));
|
256
246
|
};
|
@@ -127,28 +127,20 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
127
127
|
status: 'done'
|
128
128
|
});
|
129
129
|
});
|
130
|
-
var _url = Array.from([]);
|
131
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
132
|
-
// @ts-expect-error
|
133
|
-
fileList === null || fileList === void 0 || fileList.map(function (item) {
|
134
|
-
return _url.push(item.preview);
|
135
|
-
});
|
136
130
|
onChange === null || onChange === void 0 || onChange([].concat(_toConsumableArray(fileList), _fileList));
|
137
|
-
setFileList([
|
131
|
+
// setFileList([...fileList, ..._fileList]);
|
138
132
|
}).catch(function () {
|
139
|
-
// const msg = e?.response?.data?.[0]?.message;
|
140
133
|
var msg = '上传失败!';
|
141
134
|
void messageApi.error(msg);
|
142
135
|
});
|
143
136
|
return false;
|
144
137
|
}
|
145
138
|
var onRemove = function onRemove(file) {
|
146
|
-
var
|
139
|
+
var newFileList = fileList === null || fileList === void 0 ? void 0 : fileList.filter(function (item) {
|
147
140
|
return item.uid !== file.uid;
|
148
141
|
});
|
149
|
-
|
150
|
-
|
151
|
-
setFileList(_newFileList);
|
142
|
+
onChange === null || onChange === void 0 || onChange(newFileList);
|
143
|
+
// setFileList(newFileList);
|
152
144
|
};
|
153
145
|
function handlePreview(file) {
|
154
146
|
if (file.url != null) {
|
@@ -161,9 +153,7 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
161
153
|
}
|
162
154
|
}
|
163
155
|
var newFileList = useMemo(function () {
|
164
|
-
return fileList != null
|
165
|
-
return item.url;
|
166
|
-
}) ? fileList === null || fileList === void 0 ? void 0 : fileList.map(function (item) {
|
156
|
+
return fileList != null ? fileList === null || fileList === void 0 ? void 0 : fileList.map(function (item) {
|
167
157
|
return _objectSpread(_objectSpread({}, item), {}, {
|
168
158
|
url: "".concat(assetsURL, "/").concat(item.url)
|
169
159
|
});
|
@@ -189,18 +179,16 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
189
179
|
}
|
190
180
|
};
|
191
181
|
useEffect(function () {
|
192
|
-
if (value != null
|
193
|
-
var _value$filter;
|
182
|
+
if (value != null) {
|
194
183
|
var _fileList = Array.from([]);
|
195
|
-
value === null || value === void 0 ||
|
196
|
-
|
197
|
-
})) === null || _value$filter === void 0 || _value$filter.map(function (item) {
|
184
|
+
value === null || value === void 0 || value.map(function (items, index) {
|
185
|
+
var _items$uid, _items$status;
|
198
186
|
return _fileList.push({
|
199
|
-
uid: "".concat(Date.now(), "
|
200
|
-
name:
|
201
|
-
status: 'done',
|
202
|
-
url:
|
203
|
-
preview:
|
187
|
+
uid: (_items$uid = items.uid) !== null && _items$uid !== void 0 ? _items$uid : "".concat(Date.now(), "-").concat(index),
|
188
|
+
name: items.name,
|
189
|
+
status: (_items$status = items.status) !== null && _items$status !== void 0 ? _items$status : 'done',
|
190
|
+
url: items.url,
|
191
|
+
preview: items.url
|
204
192
|
});
|
205
193
|
});
|
206
194
|
setFileList(_fileList);
|
@@ -222,7 +210,9 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
222
210
|
accept: accept,
|
223
211
|
maxCount: maxCount,
|
224
212
|
itemRender: itemRender
|
225
|
-
}, props
|
213
|
+
}, props, {
|
214
|
+
onChange: undefined
|
215
|
+
}), (fileList === null || fileList === void 0 || (_fileList$filter = fileList.filter(function (item) {
|
226
216
|
return item.url != null;
|
227
217
|
})) === null || _fileList$filter === void 0 ? void 0 : _fileList$filter.length) >= (maxCount != null ? maxCount : 1) ? null : uploadButton), (previewFile === null || previewFile === void 0 ? void 0 : previewFile.url) != null ? /*#__PURE__*/React.createElement(Image, {
|
228
218
|
wrapperStyle: {
|