yootd 0.0.6 → 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/README.md +43 -43
- package/dist/Preview/components/preview/phone.scss +8 -8
- package/dist/Preview/types/type.d.ts +21 -21
- package/dist/anchor/index.scss +23 -23
- 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/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/input/index.scss +5 -5
- package/dist/school/types/types.d.ts +84 -84
- package/dist/student-dropdown/types/types.d.ts +44 -44
- 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/upload/components/fileUpload.js +17 -27
- package/dist/upload/components/imageUpload.js +14 -23
- package/dist/user-dropdown/types/types.d.ts +45 -45
- package/dist/zones/types/types.d.ts +26 -26
- package/package.json +1 -1
@@ -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,16 +127,9 @@ 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
|
});
|
@@ -147,7 +140,7 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
147
140
|
return item.uid !== file.uid;
|
148
141
|
});
|
149
142
|
onChange === null || onChange === void 0 || onChange(newFileList);
|
150
|
-
setFileList(newFileList);
|
143
|
+
// setFileList(newFileList);
|
151
144
|
};
|
152
145
|
function handlePreview(file) {
|
153
146
|
if (file.url != null) {
|
@@ -160,9 +153,7 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
160
153
|
}
|
161
154
|
}
|
162
155
|
var newFileList = useMemo(function () {
|
163
|
-
return fileList != null
|
164
|
-
return item.url;
|
165
|
-
}) ? 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) {
|
166
157
|
return _objectSpread(_objectSpread({}, item), {}, {
|
167
158
|
url: "".concat(assetsURL, "/").concat(item.url)
|
168
159
|
});
|
@@ -188,18 +179,16 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
188
179
|
}
|
189
180
|
};
|
190
181
|
useEffect(function () {
|
191
|
-
if (value != null
|
192
|
-
var _value$filter;
|
182
|
+
if (value != null) {
|
193
183
|
var _fileList = Array.from([]);
|
194
|
-
value === null || value === void 0 ||
|
195
|
-
|
196
|
-
})) === 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;
|
197
186
|
return _fileList.push({
|
198
|
-
uid: "".concat(Date.now(), "
|
199
|
-
name:
|
200
|
-
status: 'done',
|
201
|
-
url:
|
202
|
-
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
|
203
192
|
});
|
204
193
|
});
|
205
194
|
setFileList(_fileList);
|
@@ -221,7 +210,9 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
221
210
|
accept: accept,
|
222
211
|
maxCount: maxCount,
|
223
212
|
itemRender: itemRender
|
224
|
-
}, props
|
213
|
+
}, props, {
|
214
|
+
onChange: undefined
|
215
|
+
}), (fileList === null || fileList === void 0 || (_fileList$filter = fileList.filter(function (item) {
|
225
216
|
return item.url != null;
|
226
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, {
|
227
218
|
wrapperStyle: {
|
@@ -1,45 +1,45 @@
|
|
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
|
-
type LabelOptions =
|
13
|
-
| 'uniqueNumber'
|
14
|
-
| 'personalName'
|
15
|
-
| 'majorName'
|
16
|
-
| 'collegeMajorName'
|
17
|
-
| 'className'
|
18
|
-
| 'gradeName'
|
19
|
-
| 'genderName'
|
20
|
-
| 'deptName'
|
21
|
-
| 'credentialsNo'
|
22
|
-
| 'personalMobile';
|
23
|
-
export type UserDropdownProps = SelectProps & {
|
24
|
-
type?: number; // 1:学生2:教师3:职工
|
25
|
-
label?: LabelOptions[];
|
26
|
-
connectors?: string;
|
27
|
-
teacher_id?: number;
|
28
|
-
};
|
29
|
-
export interface IuserItem {
|
30
|
-
userId: string; // ID
|
31
|
-
uniqueNumber?: string; // 学号/工号
|
32
|
-
personalName: string; // 姓名
|
33
|
-
personalPhoto?: string; // 照片
|
34
|
-
userFaceType?: number; // 人脸类型(1白名单2黑名单3红名单)
|
35
|
-
majorName?: string; // 专业名称
|
36
|
-
collegeMajorName?: string; // 院系名称
|
37
|
-
className?: string; // 班级名称
|
38
|
-
gradeName?: string; // 年级名称
|
39
|
-
genderName?: string; // 性别
|
40
|
-
deptId?: number; // 部门ID
|
41
|
-
deptName?: string; // 部门名称
|
42
|
-
gender?: number; // 性别
|
43
|
-
credentialsNo?: string; // 证件号
|
44
|
-
personalMobile?: string; // 手机号
|
45
|
-
}
|
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
|
+
type LabelOptions =
|
13
|
+
| 'uniqueNumber'
|
14
|
+
| 'personalName'
|
15
|
+
| 'majorName'
|
16
|
+
| 'collegeMajorName'
|
17
|
+
| 'className'
|
18
|
+
| 'gradeName'
|
19
|
+
| 'genderName'
|
20
|
+
| 'deptName'
|
21
|
+
| 'credentialsNo'
|
22
|
+
| 'personalMobile';
|
23
|
+
export type UserDropdownProps = SelectProps & {
|
24
|
+
type?: number; // 1:学生2:教师3:职工
|
25
|
+
label?: LabelOptions[];
|
26
|
+
connectors?: string;
|
27
|
+
teacher_id?: number;
|
28
|
+
};
|
29
|
+
export interface IuserItem {
|
30
|
+
userId: string; // ID
|
31
|
+
uniqueNumber?: string; // 学号/工号
|
32
|
+
personalName: string; // 姓名
|
33
|
+
personalPhoto?: string; // 照片
|
34
|
+
userFaceType?: number; // 人脸类型(1白名单2黑名单3红名单)
|
35
|
+
majorName?: string; // 专业名称
|
36
|
+
collegeMajorName?: string; // 院系名称
|
37
|
+
className?: string; // 班级名称
|
38
|
+
gradeName?: string; // 年级名称
|
39
|
+
genderName?: string; // 性别
|
40
|
+
deptId?: number; // 部门ID
|
41
|
+
deptName?: string; // 部门名称
|
42
|
+
gender?: number; // 性别
|
43
|
+
credentialsNo?: string; // 证件号
|
44
|
+
personalMobile?: string; // 手机号
|
45
|
+
}
|
@@ -1,26 +1,26 @@
|
|
1
|
-
export interface PageData<T> {
|
2
|
-
content: T[];
|
3
|
-
page: {
|
4
|
-
number: number;
|
5
|
-
size: number;
|
6
|
-
totalElements: number;
|
7
|
-
totalPages: number;
|
8
|
-
};
|
9
|
-
}
|
10
|
-
|
11
|
-
export interface ZoneItem {
|
12
|
-
zoneId: string; // 区域ID
|
13
|
-
zoneName: string; // 区域名称
|
14
|
-
zoneLevel: number; // 区域等级(1全国2省级3市级4区级)
|
15
|
-
zoneLevel1Id: string;
|
16
|
-
zoneLevel2Id: string;
|
17
|
-
}
|
18
|
-
export interface ZoneProps {
|
19
|
-
zoneLevel?: 'province' | 'city' | 'district';
|
20
|
-
value?: string[];
|
21
|
-
onChange?: (zoneIds: string[]) => void;
|
22
|
-
style?: React.CSSProperties;
|
23
|
-
placeholder?: string[];
|
24
|
-
allowClear?: boolean;
|
25
|
-
showSearch?: boolean;
|
26
|
-
}
|
1
|
+
export interface PageData<T> {
|
2
|
+
content: T[];
|
3
|
+
page: {
|
4
|
+
number: number;
|
5
|
+
size: number;
|
6
|
+
totalElements: number;
|
7
|
+
totalPages: number;
|
8
|
+
};
|
9
|
+
}
|
10
|
+
|
11
|
+
export interface ZoneItem {
|
12
|
+
zoneId: string; // 区域ID
|
13
|
+
zoneName: string; // 区域名称
|
14
|
+
zoneLevel: number; // 区域等级(1全国2省级3市级4区级)
|
15
|
+
zoneLevel1Id: string;
|
16
|
+
zoneLevel2Id: string;
|
17
|
+
}
|
18
|
+
export interface ZoneProps {
|
19
|
+
zoneLevel?: 'province' | 'city' | 'district';
|
20
|
+
value?: string[];
|
21
|
+
onChange?: (zoneIds: string[]) => void;
|
22
|
+
style?: React.CSSProperties;
|
23
|
+
placeholder?: string[];
|
24
|
+
allowClear?: boolean;
|
25
|
+
showSearch?: boolean;
|
26
|
+
}
|