yootd 0.0.6 → 0.0.7

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.
@@ -1,33 +1,33 @@
1
- .yot-table {
2
- // .yot-table {
3
- // &--primary {
4
- // .ant-table-container {
5
- // .ant-table-content {
6
- // thead {
7
- // tr {
8
- // th {
9
- // background-color: var(--ant-color-primary);
10
- // color: var(--ant-color-bg-base);
11
- // }
12
- // }
13
- // }
14
- // }
15
- // }
16
- // }
17
-
18
- &-header {
19
- &:hover {
20
- &__icon {
21
- position: absolute;
22
- right: 16px;
23
- top: 50%;
24
- transform: translateY(-50%);
25
- cursor: pointer;
26
-
27
- path {
28
- fill: var(--ant-color-primary-bg);
29
- }
30
- }
31
- }
32
- }
33
- }
1
+ .yot-table {
2
+ // .yot-table {
3
+ // &--primary {
4
+ // .ant-table-container {
5
+ // .ant-table-content {
6
+ // thead {
7
+ // tr {
8
+ // th {
9
+ // background-color: var(--ant-color-primary);
10
+ // color: var(--ant-color-bg-base);
11
+ // }
12
+ // }
13
+ // }
14
+ // }
15
+ // }
16
+ // }
17
+
18
+ &-header {
19
+ &:hover {
20
+ &__icon {
21
+ position: absolute;
22
+ right: 16px;
23
+ top: 50%;
24
+ transform: translateY(-50%);
25
+ cursor: pointer;
26
+
27
+ path {
28
+ fill: var(--ant-color-primary-bg);
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
@@ -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
+ }
@@ -143,11 +143,12 @@ var InternalUpload = function InternalUpload(props, ref) {
143
143
  return false;
144
144
  }
145
145
  var onRemove = function onRemove(file) {
146
- var newFileList = fileList === null || fileList === void 0 ? void 0 : fileList.filter(function (item) {
146
+ var _newFileList = fileList === null || fileList === void 0 ? void 0 : fileList.filter(function (item) {
147
147
  return item.uid !== file.uid;
148
148
  });
149
- onChange === null || onChange === void 0 || onChange(newFileList);
150
- setFileList(newFileList);
149
+ console.log('onRemove', _newFileList);
150
+ onChange === null || onChange === void 0 || onChange(_newFileList);
151
+ setFileList(_newFileList);
151
152
  };
152
153
  function handlePreview(file) {
153
154
  if (file.url != null) {
@@ -1,115 +1,115 @@
1
- .yot-upload {
2
- .ant-upload-list-item {
3
- padding: 0;
4
- }
5
- .ant-upload-list-item.ant-upload-list-item-done {
6
- .ant-upload-icon {
7
- .anticon.anticon-paper-clip {
8
- color: var(--ant-color-primary);
9
- }
10
- }
11
- }
12
- .ant-upload-list-item-name {
13
- display: flex;
14
- align-items: center;
15
- }
16
-
17
- &-file {
18
- &-btn {
19
- &__icon {
20
- width: 16px;
21
- height: 16px;
22
- }
23
- &:hover &{
24
- &__icon {
25
- .path-1 {
26
- fill: var(--ant-color-primary);
27
- width: 20px;
28
- }
29
- }
30
- }
31
- }
32
- }
33
- &__icon {
34
- &--success {
35
- width: 16px;
36
- height: 16px;
37
- position: absolute;
38
- top: 0px;
39
- right: 24px;
40
- }
41
- &--again {
42
- width: 16px;
43
- height: 16px;
44
- position: absolute;
45
- top: 0px;
46
- right: 24px;
47
- }
48
- &--delete {
49
- width: 16px;
50
- height: 16px;
51
- position: absolute;
52
- top: 0px;
53
- right: 2px;
54
- }
55
- }
56
-
57
- &-image {
58
- &-btn {
59
- width: 100px;
60
- height: 100px;
61
- border-radius: 8px;
62
- background-color: var(--ant-color-border-secondary);
63
- display: flex;
64
- align-items: center;
65
- justify-content: center;
66
- flex-direction: column;
67
- &__text {
68
- font-size: 12px;
69
- color: var(--ant-color-text-quaternary);
70
- margin-top: 8px;
71
- }
72
- }
73
- }
74
- &-video {
75
- &-content {
76
- position: relative;
77
- width: 102px;
78
- height: 102px;
79
- border-radius: 4px;
80
- cursor: pointer;
81
- padding: 8px;
82
- box-sizing: border-box;
83
- border: 1px solid var(--ant-color-border-secondary);
84
- &__video {
85
- width: 100%;
86
- height: 100%;
87
- }
88
- &:hover &{
89
- &-icon {
90
- z-index: 10;
91
- transition: all;
92
- box-sizing: border-box;
93
- position: absolute;
94
- top: 8px;
95
- left: 8px;
96
- height: 86px;
97
- width: 86px;
98
- /* 这里的背景色根据需求设置 */
99
- background: rgba(0, 0, 0, 0.6) !important;
100
- background-color: #000;
101
- filter: Alpha(Opacity=60);
102
- opacity: 0.6;
103
- &--delete {
104
- width: 16px;
105
- height: 16px;
106
- position: absolute;
107
- top: 36px;
108
- left: 40%;
109
- cursor: pointer;
110
- }
111
- }
112
- }
113
- }
114
- }
115
- }
1
+ .yot-upload {
2
+ .ant-upload-list-item {
3
+ padding: 0;
4
+ }
5
+ .ant-upload-list-item.ant-upload-list-item-done {
6
+ .ant-upload-icon {
7
+ .anticon.anticon-paper-clip {
8
+ color: var(--ant-color-primary);
9
+ }
10
+ }
11
+ }
12
+ .ant-upload-list-item-name {
13
+ display: flex;
14
+ align-items: center;
15
+ }
16
+
17
+ &-file {
18
+ &-btn {
19
+ &__icon {
20
+ width: 16px;
21
+ height: 16px;
22
+ }
23
+ &:hover &{
24
+ &__icon {
25
+ .path-1 {
26
+ fill: var(--ant-color-primary);
27
+ width: 20px;
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
33
+ &__icon {
34
+ &--success {
35
+ width: 16px;
36
+ height: 16px;
37
+ position: absolute;
38
+ top: 0px;
39
+ right: 24px;
40
+ }
41
+ &--again {
42
+ width: 16px;
43
+ height: 16px;
44
+ position: absolute;
45
+ top: 0px;
46
+ right: 24px;
47
+ }
48
+ &--delete {
49
+ width: 16px;
50
+ height: 16px;
51
+ position: absolute;
52
+ top: 0px;
53
+ right: 2px;
54
+ }
55
+ }
56
+
57
+ &-image {
58
+ &-btn {
59
+ width: 100px;
60
+ height: 100px;
61
+ border-radius: 8px;
62
+ background-color: var(--ant-color-border-secondary);
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: center;
66
+ flex-direction: column;
67
+ &__text {
68
+ font-size: 12px;
69
+ color: var(--ant-color-text-quaternary);
70
+ margin-top: 8px;
71
+ }
72
+ }
73
+ }
74
+ &-video {
75
+ &-content {
76
+ position: relative;
77
+ width: 102px;
78
+ height: 102px;
79
+ border-radius: 4px;
80
+ cursor: pointer;
81
+ padding: 8px;
82
+ box-sizing: border-box;
83
+ border: 1px solid var(--ant-color-border-secondary);
84
+ &__video {
85
+ width: 100%;
86
+ height: 100%;
87
+ }
88
+ &:hover &{
89
+ &-icon {
90
+ z-index: 10;
91
+ transition: all;
92
+ box-sizing: border-box;
93
+ position: absolute;
94
+ top: 8px;
95
+ left: 8px;
96
+ height: 86px;
97
+ width: 86px;
98
+ /* 这里的背景色根据需求设置 */
99
+ background: rgba(0, 0, 0, 0.6) !important;
100
+ background-color: #000;
101
+ filter: Alpha(Opacity=60);
102
+ opacity: 0.6;
103
+ &--delete {
104
+ width: 16px;
105
+ height: 16px;
106
+ position: absolute;
107
+ top: 36px;
108
+ left: 40%;
109
+ cursor: pointer;
110
+ }
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
@@ -1,21 +1,21 @@
1
- .yot-YearTerm {
2
- border: var(--ant-line-width) var(--ant-line-type) var(--ant-color-border);
3
- border-radius: var(--ant-border-radius);
4
- &-school-select::after {
5
- content: '';
6
- position: absolute;
7
- right: 0;
8
- top: 50%; /* 从中间开始 */
9
- width: 1px; /* 边框宽度 */
10
- height: 50%; /* 设为盒子高度的百分之五十 */
11
- background-color: var(--ant-color-border); /* 边框颜色 */
12
- transform: translateY(-50%);
13
- }
14
- .ant-select.ant-select-outlined.css-var-yootd.ant-select-css-var.ant-select-single.ant-select-allow-clear.ant-select-show-arrow {
15
- .ant-select-selector {
16
- padding-left: var(--ant-padding);
17
- padding-right: var(--ant-padding);
18
- border: 0;
19
- }
20
- }
21
- }
1
+ .yot-YearTerm {
2
+ border: var(--ant-line-width) var(--ant-line-type) var(--ant-color-border);
3
+ border-radius: var(--ant-border-radius);
4
+ &-school-select::after {
5
+ content: '';
6
+ position: absolute;
7
+ right: 0;
8
+ top: 50%; /* 从中间开始 */
9
+ width: 1px; /* 边框宽度 */
10
+ height: 50%; /* 设为盒子高度的百分之五十 */
11
+ background-color: var(--ant-color-border); /* 边框颜色 */
12
+ transform: translateY(-50%);
13
+ }
14
+ .ant-select.ant-select-outlined.css-var-yootd.ant-select-css-var.ant-select-single.ant-select-allow-clear.ant-select-show-arrow {
15
+ .ant-select-selector {
16
+ padding-left: var(--ant-padding);
17
+ padding-right: var(--ant-padding);
18
+ border: 0;
19
+ }
20
+ }
21
+ }
@@ -1,28 +1,28 @@
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 IYearItem {
12
- id: number; // ID
13
- yearName: string; // 学年名称
14
- }
15
- // 查询学期返回的数据类型
16
- export interface ITermItem {
17
- termId: number; // ID
18
- termName: string; // 学期名称
19
- }
20
- type YearTermProps = {
21
- type?: 'yearTerm' | 'year' | 'term';
22
- style?: React.CSSProperties;
23
- showSearch?: boolean;
24
- value?: Record<string, number>;
25
- onChange?: (record: Record<string, number | undefined>) => void;
26
- allowClear?: boolean;
27
- placeholder?: string[];
28
- };
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 IYearItem {
12
+ id: number; // ID
13
+ yearName: string; // 学年名称
14
+ }
15
+ // 查询学期返回的数据类型
16
+ export interface ITermItem {
17
+ termId: number; // ID
18
+ termName: string; // 学期名称
19
+ }
20
+ type YearTermProps = {
21
+ type?: 'yearTerm' | 'year' | 'term';
22
+ style?: React.CSSProperties;
23
+ showSearch?: boolean;
24
+ value?: Record<string, number>;
25
+ onChange?: (record: Record<string, number | undefined>) => void;
26
+ allowClear?: boolean;
27
+ placeholder?: string[];
28
+ };
@@ -1,23 +1,23 @@
1
- .content {
2
- border: var(--ant-line-width) var(--ant-line-type) var(--ant-color-border);
3
- border-radius: var(--ant-border-radius);
4
- :global {
5
- .zone-select::after {
6
- content: '';
7
- position: absolute;
8
- right: 0;
9
- top: 50%; /* 从中间开始 */
10
- width: 1px; /* 边框宽度 */
11
- height: 50%; /* 设为盒子高度的百分之五十 */
12
- background-color: var(--ant-color-border); /* 边框颜色 */
13
- transform: translateY(-50%);
14
- }
15
- .ant-select.ant-select-outlined.css-var-yootd.ant-select-css-var.ant-select-single.ant-select-show-arrow {
16
- .ant-select-selector {
17
- padding-left: var(--ant-padding);
18
- padding-right: var(--ant-padding);
19
- border: 0;
20
- }
21
- }
22
- }
23
- }
1
+ .content {
2
+ border: var(--ant-line-width) var(--ant-line-type) var(--ant-color-border);
3
+ border-radius: var(--ant-border-radius);
4
+ :global {
5
+ .zone-select::after {
6
+ content: '';
7
+ position: absolute;
8
+ right: 0;
9
+ top: 50%; /* 从中间开始 */
10
+ width: 1px; /* 边框宽度 */
11
+ height: 50%; /* 设为盒子高度的百分之五十 */
12
+ background-color: var(--ant-color-border); /* 边框颜色 */
13
+ transform: translateY(-50%);
14
+ }
15
+ .ant-select.ant-select-outlined.css-var-yootd.ant-select-css-var.ant-select-single.ant-select-show-arrow {
16
+ .ant-select-selector {
17
+ padding-left: var(--ant-padding);
18
+ padding-right: var(--ant-padding);
19
+ border: 0;
20
+ }
21
+ }
22
+ }
23
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yootd",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",