yootd 0.0.10 → 0.0.11

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.
Files changed (59) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +43 -43
  3. package/dist/Preview/components/preview/phone.scss +8 -8
  4. package/dist/Preview/index.scss +35 -35
  5. package/dist/Preview/types/type.d.ts +21 -21
  6. package/dist/anchor/index.scss +23 -23
  7. package/dist/approval-process/index.scss +95 -95
  8. package/dist/areas/index.scss +21 -21
  9. package/dist/areas/types/types.d.ts +39 -39
  10. package/dist/aside/components/SortableItem.scss +93 -93
  11. package/dist/aside/index.scss +25 -25
  12. package/dist/aside/types/types.d.ts +44 -44
  13. package/dist/badge/index.scss +5 -5
  14. package/dist/buildings/types/types.d.ts +21 -21
  15. package/dist/button/index.scss +30 -30
  16. package/dist/cascader/index.scss +5 -5
  17. package/dist/config-provider/context.d.ts +0 -1
  18. package/dist/config-provider/index.d.ts +0 -1
  19. package/dist/config-provider/index.js +1 -3
  20. package/dist/courses/types/types.d.ts +18 -18
  21. package/dist/dictionary/index.js +1 -2
  22. package/dist/dictionary/types/types.d.ts +14 -14
  23. package/dist/drawer-modal/index.scss +39 -39
  24. package/dist/drawer-modal/types/types.d.ts +3 -3
  25. package/dist/dropdown/assets/arrow-down.svg +5 -5
  26. package/dist/empty/index.scss +15 -15
  27. package/dist/group-title/index.scss +31 -31
  28. package/dist/image/index.scss +26 -26
  29. package/dist/index.d.ts +0 -2
  30. package/dist/index.js +1 -2
  31. package/dist/input/index.scss +5 -5
  32. package/dist/modal/index.scss +65 -65
  33. package/dist/pagination/index.scss +47 -47
  34. package/dist/school/index.scss +21 -21
  35. package/dist/state/index.scss +89 -89
  36. package/dist/steps/index.scss +32 -32
  37. package/dist/student-dropdown/types/types.d.ts +44 -44
  38. package/dist/table/components/primary-header-row/index.scss +58 -58
  39. package/dist/table/components/primary-tbody-row/index.scss +5 -5
  40. package/dist/table/index.module.scss +9 -9
  41. package/dist/table/index.scss +33 -33
  42. package/dist/tabs/index.scss +81 -81
  43. package/dist/tag/index.scss +4 -4
  44. package/dist/teacher/types/types.d.ts +31 -31
  45. package/dist/tree/index.scss +25 -25
  46. package/dist/upload/index.scss +115 -115
  47. package/dist/user-dropdown/types/types.d.ts +45 -45
  48. package/dist/year-term/index.scss +21 -21
  49. package/dist/year-term/types/types.d.ts +28 -28
  50. package/dist/zones/index.module.scss +23 -23
  51. package/dist/zones/types/types.d.ts +26 -26
  52. package/package.json +3 -8
  53. package/dist/hooks/useOSS.d.ts +0 -1
  54. package/dist/hooks/useOSS.js +0 -11
  55. package/dist/video-player/assets/control-background.png +0 -0
  56. package/dist/video-player/assets/player-icon.svg +0 -1
  57. package/dist/video-player/index.d.ts +0 -70
  58. package/dist/video-player/index.js +0 -875
  59. package/dist/video-player/index.scss +0 -310
@@ -1,93 +1,93 @@
1
- .yot-SortableItem {
2
- &-content {
3
- position: relative;
4
- padding: 12px 16px;
5
- box-sizing: border-box;
6
- cursor: pointer;
7
- &-top {
8
- display: flex;
9
- justify-content: space-between;
10
- align-items: start;
11
- &-top-left {
12
- display: flex;
13
- align-items: start;
14
- &-top-drag-btn-icon {
15
- cursor: move;
16
- &__drag-btn-icon-svg {
17
- display: inline-block;
18
- vertical-align: middle;
19
- }
20
- }
21
- &-top-title-wrap {
22
- display: flex;
23
- align-items: center;
24
- justify-content: center;
25
- &__top-title {
26
- font-size: 16px;
27
- font-weight: 400;
28
- line-height: 1.5em;
29
- overflow: hidden;
30
- display: -webkit-box; //将元素设为盒子伸缩模型显示
31
- -webkit-box-orient: vertical; //伸缩方向设为垂直方向
32
- -webkit-line-clamp: 2; //超出2行隐藏,并显示省略号
33
- line-clamp: 2;
34
- }
35
- }
36
- }
37
- &-top-middle {
38
- display: flex;
39
- align-items: center;
40
- &-top-edit-btn-icon {
41
- cursor: pointer;
42
- &__edit-btn-icon-svg {
43
- display: inline-block;
44
- vertical-align: middle;
45
- }
46
- }
47
- &-top-del-btn-icon {
48
- cursor: pointer;
49
- margin-left: 12px;
50
- &__del-btn-icon-svg {
51
- display: inline-block;
52
- vertical-align: middle;
53
- }
54
- }
55
- }
56
- }
57
- &-bottom {
58
- text-overflow: ellipsis;
59
- overflow: hidden;
60
- white-space: nowrap;
61
- &__extra {
62
- font-size: 12px;
63
- font-weight: 400;
64
- color: rgba(0, 0, 0, 0.45);
65
- }
66
- }
67
- }
68
- &-content:hover {
69
- background-color: #d1eaff;
70
- transition: all 0.05s ease;
71
- }
72
- &-content::before {
73
- content: '';
74
- position: absolute;
75
- bottom: -0.5px;
76
- left: 16px;
77
- right: 16px;
78
- height: 1px;
79
- background-color: #e5e5e5;
80
- }
81
- &__content-active {
82
- background-color: #d1eaff;
83
- }
84
- &__content-active::after {
85
- content: '';
86
- position: absolute;
87
- bottom: 0;
88
- left: 0;
89
- width: 4px;
90
- height: 100%;
91
- background-color: #4d8de2;
92
- }
93
- }
1
+ .yot-SortableItem {
2
+ &-content {
3
+ position: relative;
4
+ padding: 12px 16px;
5
+ box-sizing: border-box;
6
+ cursor: pointer;
7
+ &-top {
8
+ display: flex;
9
+ justify-content: space-between;
10
+ align-items: start;
11
+ &-top-left {
12
+ display: flex;
13
+ align-items: start;
14
+ &-top-drag-btn-icon {
15
+ cursor: move;
16
+ &__drag-btn-icon-svg {
17
+ display: inline-block;
18
+ vertical-align: middle;
19
+ }
20
+ }
21
+ &-top-title-wrap {
22
+ display: flex;
23
+ align-items: center;
24
+ justify-content: center;
25
+ &__top-title {
26
+ font-size: 16px;
27
+ font-weight: 400;
28
+ line-height: 1.5em;
29
+ overflow: hidden;
30
+ display: -webkit-box; //将元素设为盒子伸缩模型显示
31
+ -webkit-box-orient: vertical; //伸缩方向设为垂直方向
32
+ -webkit-line-clamp: 2; //超出2行隐藏,并显示省略号
33
+ line-clamp: 2;
34
+ }
35
+ }
36
+ }
37
+ &-top-middle {
38
+ display: flex;
39
+ align-items: center;
40
+ &-top-edit-btn-icon {
41
+ cursor: pointer;
42
+ &__edit-btn-icon-svg {
43
+ display: inline-block;
44
+ vertical-align: middle;
45
+ }
46
+ }
47
+ &-top-del-btn-icon {
48
+ cursor: pointer;
49
+ margin-left: 12px;
50
+ &__del-btn-icon-svg {
51
+ display: inline-block;
52
+ vertical-align: middle;
53
+ }
54
+ }
55
+ }
56
+ }
57
+ &-bottom {
58
+ text-overflow: ellipsis;
59
+ overflow: hidden;
60
+ white-space: nowrap;
61
+ &__extra {
62
+ font-size: 12px;
63
+ font-weight: 400;
64
+ color: rgba(0, 0, 0, 0.45);
65
+ }
66
+ }
67
+ }
68
+ &-content:hover {
69
+ background-color: #d1eaff;
70
+ transition: all 0.05s ease;
71
+ }
72
+ &-content::before {
73
+ content: '';
74
+ position: absolute;
75
+ bottom: -0.5px;
76
+ left: 16px;
77
+ right: 16px;
78
+ height: 1px;
79
+ background-color: #e5e5e5;
80
+ }
81
+ &__content-active {
82
+ background-color: #d1eaff;
83
+ }
84
+ &__content-active::after {
85
+ content: '';
86
+ position: absolute;
87
+ bottom: 0;
88
+ left: 0;
89
+ width: 4px;
90
+ height: 100%;
91
+ background-color: #4d8de2;
92
+ }
93
+ }
@@ -1,25 +1,25 @@
1
- .yot-aside {
2
- background-color: #ffffff;
3
- border-radius: 8px;
4
- box-sizing: border-box;
5
- &-title {
6
- border-bottom: 1px solid #e5e5e5;
7
- padding: 16px 0px;
8
- margin: 0px 16px;
9
- box-sizing: border-box;
10
- display: flex;
11
- align-items: start;
12
- justify-content: space-between;
13
- &__title-text {
14
- font-size: 18px;
15
- font-weight: bold;
16
- overflow: hidden;
17
- text-overflow: ellipsis;
18
- white-space: nowrap;
19
- }
20
- &__add-btn-icon {
21
- cursor: pointer;
22
- margin-top: 8px;
23
- }
24
- }
25
- }
1
+ .yot-aside {
2
+ background-color: #ffffff;
3
+ border-radius: 8px;
4
+ box-sizing: border-box;
5
+ &-title {
6
+ border-bottom: 1px solid #e5e5e5;
7
+ padding: 16px 0px;
8
+ margin: 0px 16px;
9
+ box-sizing: border-box;
10
+ display: flex;
11
+ align-items: start;
12
+ justify-content: space-between;
13
+ &__title-text {
14
+ font-size: 18px;
15
+ font-weight: bold;
16
+ overflow: hidden;
17
+ text-overflow: ellipsis;
18
+ white-space: nowrap;
19
+ }
20
+ &__add-btn-icon {
21
+ cursor: pointer;
22
+ margin-top: 8px;
23
+ }
24
+ }
25
+ }
@@ -1,44 +1,44 @@
1
- type IdataItem = {
2
- key: string;
3
- title: string;
4
- extra?: string;
5
- checked?: boolean;
6
- };
7
- export type AsideProps = {
8
- width?: number;
9
- height?: number | string;
10
- style?: React.CSSProperties;
11
- activeKey?: string;
12
- title?: string;
13
- data: IdataItem[];
14
- titleShow?: boolean;
15
- addBtnIcon?: boolean;
16
- editBtnIcon?: boolean;
17
- delBtnIcon?: boolean;
18
- switchBtnIcon?: boolean;
19
- dragBtnIcon?: boolean;
20
- onClick?: (key: string) => void;
21
- onAdd?: () => void;
22
- onEdit?: (key: string) => void;
23
- onDel?: (key: string) => void;
24
- onSwitch?: (
25
- changeValue: { key: string; checked: boolean },
26
- data: IdataItem[],
27
- ) => void;
28
- onDragEnd?: (data: IdataItem[]) => void;
29
- };
30
- export type AsideItemProps = {
31
- activeKey: string;
32
- id: string;
33
- title: string;
34
- editBtnIcon?: boolean;
35
- delBtnIcon?: boolean;
36
- switchBtnIcon?: boolean;
37
- dragBtnIcon?: boolean;
38
- checked?: boolean;
39
- extra?: string;
40
- onClick?: (key: string) => void;
41
- onEdit?: (key: string) => void;
42
- onDel?: (key: string) => void;
43
- onSwitch?: (key: string, e: boolean) => void;
44
- };
1
+ type IdataItem = {
2
+ key: string;
3
+ title: string;
4
+ extra?: string;
5
+ checked?: boolean;
6
+ };
7
+ export type AsideProps = {
8
+ width?: number;
9
+ height?: number | string;
10
+ style?: React.CSSProperties;
11
+ activeKey?: string;
12
+ title?: string;
13
+ data: IdataItem[];
14
+ titleShow?: boolean;
15
+ addBtnIcon?: boolean;
16
+ editBtnIcon?: boolean;
17
+ delBtnIcon?: boolean;
18
+ switchBtnIcon?: boolean;
19
+ dragBtnIcon?: boolean;
20
+ onClick?: (key: string) => void;
21
+ onAdd?: () => void;
22
+ onEdit?: (key: string) => void;
23
+ onDel?: (key: string) => void;
24
+ onSwitch?: (
25
+ changeValue: { key: string; checked: boolean },
26
+ data: IdataItem[],
27
+ ) => void;
28
+ onDragEnd?: (data: IdataItem[]) => void;
29
+ };
30
+ export type AsideItemProps = {
31
+ activeKey: string;
32
+ id: string;
33
+ title: string;
34
+ editBtnIcon?: boolean;
35
+ delBtnIcon?: boolean;
36
+ switchBtnIcon?: boolean;
37
+ dragBtnIcon?: boolean;
38
+ checked?: boolean;
39
+ extra?: string;
40
+ onClick?: (key: string) => void;
41
+ onEdit?: (key: string) => void;
42
+ onDel?: (key: string) => void;
43
+ onSwitch?: (key: string, e: boolean) => void;
44
+ };
@@ -1,5 +1,5 @@
1
- .yot-badge {
2
- .ant-scroll-number.ant-badge-count {
3
- background-color: var(--ant-color-error);
4
- }
5
- }
1
+ .yot-badge {
2
+ .ant-scroll-number.ant-badge-count {
3
+ background-color: var(--ant-color-error);
4
+ }
5
+ }
@@ -1,21 +1,21 @@
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 IareaItem {
12
- areaId: number;
13
- areaLevel: number;
14
- areaName: string;
15
- areaType: number;
16
- }
17
- export interface IBuildingsProps {
18
- showSearch?: boolean;
19
- areaType?: number;
20
- areaSubType?: number;
21
- }
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 IareaItem {
12
+ areaId: number;
13
+ areaLevel: number;
14
+ areaName: string;
15
+ areaType: number;
16
+ }
17
+ export interface IBuildingsProps {
18
+ showSearch?: boolean;
19
+ areaType?: number;
20
+ areaSubType?: number;
21
+ }
@@ -1,31 +1,31 @@
1
- .yot-button {
2
- &--small {
3
- height: 26px;
4
- padding-left: 16px;
5
- padding-right: 16px;
6
- border-radius: 4px;
7
- font-size: 14px;
8
- }
9
-
10
- &--middle {
11
- height: 32px;
12
- padding-left: 16px;
13
- padding-right: 16px;
14
- border-radius: 4px;
15
- font-size: 14px;
16
- }
17
-
18
- &--large {
19
- height: 40px;
20
- padding-left: 32px;
21
- padding-right: 32px;
22
- border-radius: 8px;
23
- font-size: 16px;
24
- }
25
-
26
- &__link{
27
- padding: 0 !important;
28
- border: 0 !important;
29
- }
30
-
1
+ .yot-button {
2
+ &--small {
3
+ height: 26px;
4
+ padding-left: 16px;
5
+ padding-right: 16px;
6
+ border-radius: 4px;
7
+ font-size: 14px;
8
+ }
9
+
10
+ &--middle {
11
+ height: 32px;
12
+ padding-left: 16px;
13
+ padding-right: 16px;
14
+ border-radius: 4px;
15
+ font-size: 14px;
16
+ }
17
+
18
+ &--large {
19
+ height: 40px;
20
+ padding-left: 32px;
21
+ padding-right: 32px;
22
+ border-radius: 8px;
23
+ font-size: 16px;
24
+ }
25
+
26
+ &__link{
27
+ padding: 0 !important;
28
+ border: 0 !important;
29
+ }
30
+
31
31
  }
@@ -1,5 +1,5 @@
1
- .yot-cascader {
2
- .ant-cascader-menu-item[aria-checked='true'] {
3
- background-color: var(--ant-color-primary-bg);
4
- }
5
- }
1
+ .yot-cascader {
2
+ .ant-cascader-menu-item[aria-checked='true'] {
3
+ background-color: var(--ant-color-primary-bg);
4
+ }
5
+ }
@@ -4,6 +4,5 @@ export interface IGlobalConfig {
4
4
  request?: AxiosInstance;
5
5
  baseURL?: string;
6
6
  assetsURL?: string;
7
- ossURL?: string;
8
7
  }
9
8
  export declare const ConfigContext: import("react").Context<IGlobalConfig>;
@@ -7,7 +7,6 @@ export type ConfigProviderProps = AntConfigProviderProps & {
7
7
  request?: AxiosInstance;
8
8
  baseURL?: string;
9
9
  assetsURL?: string;
10
- ossURL?: string;
11
10
  theme?: AntConfigProviderProps['theme'] & {
12
11
  yotToken: {
13
12
  colorModalPrimary: string;
@@ -1,4 +1,4 @@
1
- var _excluded = ["request", "baseURL", "assetsURL", "ossURL"];
1
+ var _excluded = ["request", "baseURL", "assetsURL"];
2
2
  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); }
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -12,7 +12,6 @@ export var ConfigProvider = function ConfigProvider(_ref) {
12
12
  var request = _ref.request,
13
13
  baseURL = _ref.baseURL,
14
14
  assetsURL = _ref.assetsURL,
15
- ossURL = _ref.ossURL,
16
15
  props = _objectWithoutProperties(_ref, _excluded);
17
16
  if (((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.yotToken) != null) {
18
17
  // 生成 css 变量
@@ -23,7 +22,6 @@ export var ConfigProvider = function ConfigProvider(_ref) {
23
22
  value: {
24
23
  request: request,
25
24
  baseURL: baseURL,
26
- ossURL: ossURL,
27
25
  assetsURL: assetsURL
28
26
  }
29
27
  }, /*#__PURE__*/React.createElement(AntConfigProvider, _extends({}, props, {
@@ -1,18 +1,18 @@
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 ICourseItem {
12
- courseDefId: number;
13
- courseName: string;
14
- courseNo: string;
15
- }
16
- export interface ICourseProps {
17
- showSearch?: boolean;
18
- }
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 ICourseItem {
12
+ courseDefId: number;
13
+ courseName: string;
14
+ courseNo: string;
15
+ }
16
+ export interface ICourseProps {
17
+ showSearch?: boolean;
18
+ }
@@ -19,13 +19,12 @@ export var Dictionary = function Dictionary(_ref) {
19
19
  var request = useRequest();
20
20
  // 查询字典数据
21
21
  var _useQuery = useQuery({
22
- queryKey: ['dictionaryData'],
22
+ queryKey: ['dictionaryData', dictType],
23
23
  queryFn: function queryFn() {
24
24
  return request("/v1/dicts/".concat(dictType));
25
25
  }
26
26
  }),
27
27
  dictionaryData = _useQuery.data;
28
- console.log('dictionaryData', dictionaryData);
29
28
  // 将字典数据处理成下拉框数据
30
29
  var dictionaryOptions = useMemo(function () {
31
30
  var _dictionaryData$conte;
@@ -1,14 +1,14 @@
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
- export interface dictionaryItem {
11
- dictValue: string; // 字典项编码
12
- dictTitle: string; // 字典项名称
13
- dictTitle2?: string; // 字典项描述
14
- }
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
+ export interface dictionaryItem {
11
+ dictValue: string; // 字典项编码
12
+ dictTitle: string; // 字典项名称
13
+ dictTitle2?: string; // 字典项描述
14
+ }
@@ -1,39 +1,39 @@
1
- .yot-drawer {
2
- .ant-drawer-content-wrapper {
3
- max-width: 66.67vw;
4
- width: 100%;
5
- }
6
- .ant-drawer-header {
7
- background-color: var(--ant-color-bg-layout);
8
- .ant-drawer-header-title {
9
- font-size: 18px;
10
- font-weight: bold;
11
- .ant-drawer-close {
12
- display: none;
13
- }
14
- }
15
- }
16
- .ant-drawer-footer {
17
- padding: 0;
18
- }
19
- .ant-drawer-footer & {
20
- padding-left: 24px;
21
- padding-right: 24px;
22
- &-footer {
23
- padding: 8px 16px;
24
- }
25
- &__foot-confirm {
26
- width: 64px;
27
- height: 32px;
28
- }
29
- &__foot-close {
30
- width: 64px;
31
- height: 32px;
32
- background-color: var(--ant-color-bg-layout);
33
- margin-right: 8px;
34
- }
35
- }
36
- &__close {
37
- cursor: pointer;
38
- }
39
- }
1
+ .yot-drawer {
2
+ .ant-drawer-content-wrapper {
3
+ max-width: 66.67vw;
4
+ width: 100%;
5
+ }
6
+ .ant-drawer-header {
7
+ background-color: var(--ant-color-bg-layout);
8
+ .ant-drawer-header-title {
9
+ font-size: 18px;
10
+ font-weight: bold;
11
+ .ant-drawer-close {
12
+ display: none;
13
+ }
14
+ }
15
+ }
16
+ .ant-drawer-footer {
17
+ padding: 0;
18
+ }
19
+ .ant-drawer-footer & {
20
+ padding-left: 24px;
21
+ padding-right: 24px;
22
+ &-footer {
23
+ padding: 8px 16px;
24
+ }
25
+ &__foot-confirm {
26
+ width: 64px;
27
+ height: 32px;
28
+ }
29
+ &__foot-close {
30
+ width: 64px;
31
+ height: 32px;
32
+ background-color: var(--ant-color-bg-layout);
33
+ margin-right: 8px;
34
+ }
35
+ }
36
+ &__close {
37
+ cursor: pointer;
38
+ }
39
+ }
@@ -1,3 +1,3 @@
1
- export interface DrawerModalProps {
2
- onConfirm?: () => void;
3
- }
1
+ export interface DrawerModalProps {
2
+ onConfirm?: () => void;
3
+ }