yootd 0.2.0 → 0.2.2
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 +22 -22
- package/dist/anchor/index.scss +23 -23
- package/dist/approval-process/index.scss +95 -95
- package/dist/areas/index.js +22 -8
- package/dist/areas/index.scss +21 -21
- package/dist/areas/types/types.d.ts +41 -40
- package/dist/areas-treeSelect/index.scss +6 -6
- package/dist/areas-treeSelect/types/type.d.ts +39 -39
- package/dist/aside/components/SortableItem.scss +111 -111
- package/dist/aside/index.scss +46 -46
- package/dist/aside/types/types.d.ts +51 -51
- 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/department/index.scss +6 -6
- package/dist/department/types/types.d.ts +23 -23
- package/dist/description/index.scss +10 -10
- package/dist/dictionary/types/types.d.ts +14 -14
- package/dist/drawer-modal/index.scss +42 -42
- package/dist/drawer-modal/types/types.d.ts +3 -3
- package/dist/dropdown/assets/arrow-down.svg +5 -5
- package/dist/dropdown-select/index.scss +6 -6
- package/dist/dropdown-select/types/type.d.ts +18 -18
- package/dist/empty/index.scss +15 -15
- package/dist/export/index.scss +6 -6
- package/dist/go-back/components/index.scss +5 -5
- package/dist/go-back/index.scss +24 -24
- package/dist/group-title/index.scss +31 -31
- package/dist/holiday/types/types.d.ts +22 -22
- package/dist/hooks/useBem.js +10 -10
- package/dist/image/index.scss +26 -26
- package/dist/input/index.scss +5 -5
- package/dist/job-title/types/types.d.ts +17 -17
- package/dist/modal/index.d.ts +8 -4
- package/dist/modal/index.js +2 -1
- package/dist/modal/index.scss +76 -76
- package/dist/pagination/index.scss +47 -47
- package/dist/role/types/types.d.ts +22 -22
- package/dist/school/index.scss +21 -21
- package/dist/school/types/types.d.ts +85 -85
- 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 +67 -67
- package/dist/table/components/primary-tbody-row/index.scss +5 -5
- package/dist/table/index.scss +33 -33
- package/dist/tabs/index.scss +86 -86
- package/dist/tag/index.scss +4 -4
- package/dist/teacher/types/types.d.ts +33 -33
- package/dist/tree/index.scss +34 -34
- package/dist/upload/index.scss +115 -115
- package/dist/user-dropdown/types/types.d.ts +45 -45
- package/dist/video-player/index.scss +309 -309
- package/dist/year-term/index.scss +21 -21
- package/dist/year-term/types/types.d.ts +39 -39
- package/dist/zones/index.module.scss +23 -23
- package/dist/zones/types/types.d.ts +26 -26
- package/package.json +1 -1
package/LICENSE
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
MIT License
|
2
|
-
|
3
|
-
Copyright (c)
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c)
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
@@ -1,43 +1,43 @@
|
|
1
|
-
# yootd
|
2
|
-
|
3
|
-
[](https://npmjs.org/package/yootd)
|
4
|
-
[](https://npmjs.org/package/yootd)
|
5
|
-
|
6
|
-
A react library developed with dumi
|
7
|
-
|
8
|
-
## Usage
|
9
|
-
|
10
|
-
TODO
|
11
|
-
|
12
|
-
## Options
|
13
|
-
|
14
|
-
TODO
|
15
|
-
|
16
|
-
## Development
|
17
|
-
|
18
|
-
```bash
|
19
|
-
# install dependencies
|
20
|
-
$ pnpm install
|
21
|
-
|
22
|
-
# develop library by docs demo
|
23
|
-
$ pnpm start
|
24
|
-
|
25
|
-
# build library source code
|
26
|
-
$ pnpm run build
|
27
|
-
|
28
|
-
# build library source code in watch mode
|
29
|
-
$ pnpm run build:watch
|
30
|
-
|
31
|
-
# build docs
|
32
|
-
$ pnpm run docs:build
|
33
|
-
|
34
|
-
# Locally preview the production build.
|
35
|
-
$ pnpm run docs:preview
|
36
|
-
|
37
|
-
# check your project for potential problems
|
38
|
-
$ pnpm run doctor
|
39
|
-
```
|
40
|
-
|
41
|
-
## LICENSE
|
42
|
-
|
43
|
-
MIT
|
1
|
+
# yootd
|
2
|
+
|
3
|
+
[](https://npmjs.org/package/yootd)
|
4
|
+
[](https://npmjs.org/package/yootd)
|
5
|
+
|
6
|
+
A react library developed with dumi
|
7
|
+
|
8
|
+
## Usage
|
9
|
+
|
10
|
+
TODO
|
11
|
+
|
12
|
+
## Options
|
13
|
+
|
14
|
+
TODO
|
15
|
+
|
16
|
+
## Development
|
17
|
+
|
18
|
+
```bash
|
19
|
+
# install dependencies
|
20
|
+
$ pnpm install
|
21
|
+
|
22
|
+
# develop library by docs demo
|
23
|
+
$ pnpm start
|
24
|
+
|
25
|
+
# build library source code
|
26
|
+
$ pnpm run build
|
27
|
+
|
28
|
+
# build library source code in watch mode
|
29
|
+
$ pnpm run build:watch
|
30
|
+
|
31
|
+
# build docs
|
32
|
+
$ pnpm run docs:build
|
33
|
+
|
34
|
+
# Locally preview the production build.
|
35
|
+
$ pnpm run docs:preview
|
36
|
+
|
37
|
+
# check your project for potential problems
|
38
|
+
$ pnpm run doctor
|
39
|
+
```
|
40
|
+
|
41
|
+
## LICENSE
|
42
|
+
|
43
|
+
MIT
|
@@ -1,8 +1,8 @@
|
|
1
|
-
.yot-preview-phone {
|
2
|
-
width: 398px;
|
3
|
-
height: 829px;
|
4
|
-
background-image: url('../../assets/phonebg.png');
|
5
|
-
background-size: 100% 100%;
|
6
|
-
padding: 96px 36px 20px 36px;
|
7
|
-
box-sizing: border-box;
|
8
|
-
}
|
1
|
+
.yot-preview-phone {
|
2
|
+
width: 398px;
|
3
|
+
height: 829px;
|
4
|
+
background-image: url('../../assets/phonebg.png');
|
5
|
+
background-size: 100% 100%;
|
6
|
+
padding: 96px 36px 20px 36px;
|
7
|
+
box-sizing: border-box;
|
8
|
+
}
|
package/dist/Preview/index.scss
CHANGED
@@ -1,35 +1,35 @@
|
|
1
|
-
.yot-preview {
|
2
|
-
&-controls {
|
3
|
-
display: flex;
|
4
|
-
justify-content: center;
|
5
|
-
align-items: center;
|
6
|
-
z-index: 100;
|
7
|
-
position: absolute;
|
8
|
-
bottom: 10px;
|
9
|
-
right: 10px;
|
10
|
-
background-color: #ffffff;
|
11
|
-
border-radius: 8px;
|
12
|
-
box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.16);
|
13
|
-
.ant-btn.css-var-yootd.ant-btn-default.ant-btn-color-default.ant-btn-variant-outlined {
|
14
|
-
background-color: transparent;
|
15
|
-
border: none;
|
16
|
-
&:hover .ant-btn-icon svg path {
|
17
|
-
fill: var(--ant-color-primary);
|
18
|
-
}
|
19
|
-
&:hover .ant-btn-icon svg #rect-stroke {
|
20
|
-
stroke: var(--ant-color-primary);
|
21
|
-
}
|
22
|
-
&:hover .ant-btn-icon svg #reset-icon-rect {
|
23
|
-
fill: var(--ant-color-primary);
|
24
|
-
}
|
25
|
-
}
|
26
|
-
&--zoom {
|
27
|
-
width: 64px;
|
28
|
-
background-color: transparent;
|
29
|
-
border: none;
|
30
|
-
}
|
31
|
-
}
|
32
|
-
.react-flow__panel.center {
|
33
|
-
transform: translateX(-63%);
|
34
|
-
}
|
35
|
-
}
|
1
|
+
.yot-preview {
|
2
|
+
&-controls {
|
3
|
+
display: flex;
|
4
|
+
justify-content: center;
|
5
|
+
align-items: center;
|
6
|
+
z-index: 100;
|
7
|
+
position: absolute;
|
8
|
+
bottom: 10px;
|
9
|
+
right: 10px;
|
10
|
+
background-color: #ffffff;
|
11
|
+
border-radius: 8px;
|
12
|
+
box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.16);
|
13
|
+
.ant-btn.css-var-yootd.ant-btn-default.ant-btn-color-default.ant-btn-variant-outlined {
|
14
|
+
background-color: transparent;
|
15
|
+
border: none;
|
16
|
+
&:hover .ant-btn-icon svg path {
|
17
|
+
fill: var(--ant-color-primary);
|
18
|
+
}
|
19
|
+
&:hover .ant-btn-icon svg #rect-stroke {
|
20
|
+
stroke: var(--ant-color-primary);
|
21
|
+
}
|
22
|
+
&:hover .ant-btn-icon svg #reset-icon-rect {
|
23
|
+
fill: var(--ant-color-primary);
|
24
|
+
}
|
25
|
+
}
|
26
|
+
&--zoom {
|
27
|
+
width: 64px;
|
28
|
+
background-color: transparent;
|
29
|
+
border: none;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
.react-flow__panel.center {
|
33
|
+
transform: translateX(-63%);
|
34
|
+
}
|
35
|
+
}
|
@@ -1,22 +1,22 @@
|
|
1
|
-
export interface PrevewProps {
|
2
|
-
controls?: boolean; // 是否显示右下角的放大缩小组件
|
3
|
-
defaultZoom?: number; // 初始化放大倍数
|
4
|
-
maxZoom?: number; // 最大放大倍数
|
5
|
-
minZoom?: number; // 最小放大倍数
|
6
|
-
panOnDrag?: boolean; // 是否可以拖拽
|
7
|
-
zoomOnScroll?: boolean; // 是否可以滚动
|
8
|
-
modes?: ['phone', 'web'] | ['phone'] | ['web']; // 预览模式
|
9
|
-
fitView?: boolean; // 是否自动适应视图
|
10
|
-
content?: ReactNode; // 数据
|
11
|
-
width?: number | string; // 宽度
|
12
|
-
height?: number | string; // 高度
|
13
|
-
style?: React.CSSProperties; // 样式
|
14
|
-
}
|
15
|
-
|
16
|
-
export interface TopPreviewProps {
|
17
|
-
mode: string;
|
18
|
-
onChange: (value: string) => void;
|
19
|
-
}
|
20
|
-
export interface ControlsProps {
|
21
|
-
defaultZoom?: number; // 初始化放大倍数
|
22
|
-
}
|
1
|
+
export interface PrevewProps {
|
2
|
+
controls?: boolean; // 是否显示右下角的放大缩小组件
|
3
|
+
defaultZoom?: number; // 初始化放大倍数
|
4
|
+
maxZoom?: number; // 最大放大倍数
|
5
|
+
minZoom?: number; // 最小放大倍数
|
6
|
+
panOnDrag?: boolean; // 是否可以拖拽
|
7
|
+
zoomOnScroll?: boolean; // 是否可以滚动
|
8
|
+
modes?: ['phone', 'web'] | ['phone'] | ['web']; // 预览模式
|
9
|
+
fitView?: boolean; // 是否自动适应视图
|
10
|
+
content?: ReactNode; // 数据
|
11
|
+
width?: number | string; // 宽度
|
12
|
+
height?: number | string; // 高度
|
13
|
+
style?: React.CSSProperties; // 样式
|
14
|
+
}
|
15
|
+
|
16
|
+
export interface TopPreviewProps {
|
17
|
+
mode: string;
|
18
|
+
onChange: (value: string) => void;
|
19
|
+
}
|
20
|
+
export interface ControlsProps {
|
21
|
+
defaultZoom?: number; // 初始化放大倍数
|
22
|
+
}
|
package/dist/anchor/index.scss
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
.yot-anchor {
|
2
|
-
.ant-anchor .ant-anchor-link {
|
3
|
-
padding-top: var(--ant-padding);
|
4
|
-
padding-bottom: var(--ant-padding);
|
5
|
-
box-sizing: border-box;
|
6
|
-
font-size: var(--ant-font-size);
|
7
|
-
}
|
8
|
-
.ant-anchor .ant-anchor-link:nth-of-type(1) {
|
9
|
-
padding-top: 5px;
|
10
|
-
padding-bottom: var(--ant-padding);
|
11
|
-
box-sizing: border-box;
|
12
|
-
font-size: var(--ant-font-size);
|
13
|
-
}
|
14
|
-
.ant-anchor .ant-anchor-link:last-child {
|
15
|
-
padding-top: var(--ant-padding);
|
16
|
-
padding-bottom: 5px;
|
17
|
-
box-sizing: border-box;
|
18
|
-
font-size: var(--ant-font-size);
|
19
|
-
}
|
20
|
-
.ant-anchor .ant-anchor-link.ant-anchor-link-active {
|
21
|
-
color: var(--ant-color-primary);
|
22
|
-
}
|
23
|
-
}
|
1
|
+
.yot-anchor {
|
2
|
+
.ant-anchor .ant-anchor-link {
|
3
|
+
padding-top: var(--ant-padding);
|
4
|
+
padding-bottom: var(--ant-padding);
|
5
|
+
box-sizing: border-box;
|
6
|
+
font-size: var(--ant-font-size);
|
7
|
+
}
|
8
|
+
.ant-anchor .ant-anchor-link:nth-of-type(1) {
|
9
|
+
padding-top: 5px;
|
10
|
+
padding-bottom: var(--ant-padding);
|
11
|
+
box-sizing: border-box;
|
12
|
+
font-size: var(--ant-font-size);
|
13
|
+
}
|
14
|
+
.ant-anchor .ant-anchor-link:last-child {
|
15
|
+
padding-top: var(--ant-padding);
|
16
|
+
padding-bottom: 5px;
|
17
|
+
box-sizing: border-box;
|
18
|
+
font-size: var(--ant-font-size);
|
19
|
+
}
|
20
|
+
.ant-anchor .ant-anchor-link.ant-anchor-link-active {
|
21
|
+
color: var(--ant-color-primary);
|
22
|
+
}
|
23
|
+
}
|
@@ -1,95 +1,95 @@
|
|
1
|
-
.yot-approval-process {
|
2
|
-
&-steps {
|
3
|
-
padding: 0px 40px;
|
4
|
-
&-info {
|
5
|
-
display: flex;
|
6
|
-
&-avatar {
|
7
|
-
position: relative;
|
8
|
-
width: fit-content;
|
9
|
-
height: fit-content;
|
10
|
-
&-img {
|
11
|
-
width: 40px;
|
12
|
-
height: 40px;
|
13
|
-
border-radius: 50%;
|
14
|
-
background-size: 100% 100%;
|
15
|
-
}
|
16
|
-
&-status {
|
17
|
-
&-icon {
|
18
|
-
position: absolute;
|
19
|
-
bottom: 3.5px;
|
20
|
-
right: -0.5px;
|
21
|
-
width: 18px;
|
22
|
-
height: 18px;
|
23
|
-
display: block;
|
24
|
-
}
|
25
|
-
}
|
26
|
-
}
|
27
|
-
&-person {
|
28
|
-
margin-left: 16px;
|
29
|
-
display: flex;
|
30
|
-
flex-direction: column;
|
31
|
-
justify-content: space-between;
|
32
|
-
padding: 2px 0;
|
33
|
-
&-name {
|
34
|
-
font-size: 16px;
|
35
|
-
font-weight: 500;
|
36
|
-
color: var(--ant-color-text);
|
37
|
-
}
|
38
|
-
&-time {
|
39
|
-
font-size: 12px;
|
40
|
-
font-weight: 500;
|
41
|
-
color: var(--ant-color-text-tertiary);
|
42
|
-
}
|
43
|
-
}
|
44
|
-
}
|
45
|
-
|
46
|
-
&-content {
|
47
|
-
display: flex;
|
48
|
-
padding-left: 20px;
|
49
|
-
padding-top: 8px;
|
50
|
-
padding-bottom: 8px;
|
51
|
-
&-line {
|
52
|
-
width: 1px;
|
53
|
-
border-left: 1px dashed var(--ant-color-border);
|
54
|
-
&--block {
|
55
|
-
display: block;
|
56
|
-
border-color: var(--ant-color-border);
|
57
|
-
min-height: 106px;
|
58
|
-
}
|
59
|
-
&--none {
|
60
|
-
display: none;
|
61
|
-
border-color: var(--ant-color-border);
|
62
|
-
min-height: 106px;
|
63
|
-
}
|
64
|
-
}
|
65
|
-
&-item {
|
66
|
-
margin-left: 40px;
|
67
|
-
&-status {
|
68
|
-
display: flex;
|
69
|
-
align-items: center;
|
70
|
-
width: fit-content;
|
71
|
-
height: 22px;
|
72
|
-
padding: 0 8px;
|
73
|
-
border-radius: 4px;
|
74
|
-
font-size: 12px;
|
75
|
-
&--visible {
|
76
|
-
visibility: visible;
|
77
|
-
}
|
78
|
-
&--invisible {
|
79
|
-
visibility: hidden;
|
80
|
-
}
|
81
|
-
}
|
82
|
-
&-comment {
|
83
|
-
margin-top: 4px;
|
84
|
-
padding: 0 8px;
|
85
|
-
font-size: 14px;
|
86
|
-
background-color: var(--ant-color-bg-layout);
|
87
|
-
height: 32px;
|
88
|
-
display: flex;
|
89
|
-
align-items: center;
|
90
|
-
border-radius: 4px;
|
91
|
-
}
|
92
|
-
}
|
93
|
-
}
|
94
|
-
}
|
95
|
-
}
|
1
|
+
.yot-approval-process {
|
2
|
+
&-steps {
|
3
|
+
padding: 0px 40px;
|
4
|
+
&-info {
|
5
|
+
display: flex;
|
6
|
+
&-avatar {
|
7
|
+
position: relative;
|
8
|
+
width: fit-content;
|
9
|
+
height: fit-content;
|
10
|
+
&-img {
|
11
|
+
width: 40px;
|
12
|
+
height: 40px;
|
13
|
+
border-radius: 50%;
|
14
|
+
background-size: 100% 100%;
|
15
|
+
}
|
16
|
+
&-status {
|
17
|
+
&-icon {
|
18
|
+
position: absolute;
|
19
|
+
bottom: 3.5px;
|
20
|
+
right: -0.5px;
|
21
|
+
width: 18px;
|
22
|
+
height: 18px;
|
23
|
+
display: block;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
&-person {
|
28
|
+
margin-left: 16px;
|
29
|
+
display: flex;
|
30
|
+
flex-direction: column;
|
31
|
+
justify-content: space-between;
|
32
|
+
padding: 2px 0;
|
33
|
+
&-name {
|
34
|
+
font-size: 16px;
|
35
|
+
font-weight: 500;
|
36
|
+
color: var(--ant-color-text);
|
37
|
+
}
|
38
|
+
&-time {
|
39
|
+
font-size: 12px;
|
40
|
+
font-weight: 500;
|
41
|
+
color: var(--ant-color-text-tertiary);
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
&-content {
|
47
|
+
display: flex;
|
48
|
+
padding-left: 20px;
|
49
|
+
padding-top: 8px;
|
50
|
+
padding-bottom: 8px;
|
51
|
+
&-line {
|
52
|
+
width: 1px;
|
53
|
+
border-left: 1px dashed var(--ant-color-border);
|
54
|
+
&--block {
|
55
|
+
display: block;
|
56
|
+
border-color: var(--ant-color-border);
|
57
|
+
min-height: 106px;
|
58
|
+
}
|
59
|
+
&--none {
|
60
|
+
display: none;
|
61
|
+
border-color: var(--ant-color-border);
|
62
|
+
min-height: 106px;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
&-item {
|
66
|
+
margin-left: 40px;
|
67
|
+
&-status {
|
68
|
+
display: flex;
|
69
|
+
align-items: center;
|
70
|
+
width: fit-content;
|
71
|
+
height: 22px;
|
72
|
+
padding: 0 8px;
|
73
|
+
border-radius: 4px;
|
74
|
+
font-size: 12px;
|
75
|
+
&--visible {
|
76
|
+
visibility: visible;
|
77
|
+
}
|
78
|
+
&--invisible {
|
79
|
+
visibility: hidden;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
&-comment {
|
83
|
+
margin-top: 4px;
|
84
|
+
padding: 0 8px;
|
85
|
+
font-size: 14px;
|
86
|
+
background-color: var(--ant-color-bg-layout);
|
87
|
+
height: 32px;
|
88
|
+
display: flex;
|
89
|
+
align-items: center;
|
90
|
+
border-radius: 4px;
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
package/dist/areas/index.js
CHANGED
@@ -17,6 +17,8 @@ export var Areas = function Areas(_ref) {
|
|
17
17
|
placeholder = _ref$placeholder === void 0 ? ['请选择学校', '请选择校区', '请选择楼栋', '请选择楼层', '请选择房间'] : _ref$placeholder,
|
18
18
|
_ref$level = _ref.level1,
|
19
19
|
level1 = _ref$level === void 0 ? true : _ref$level,
|
20
|
+
_ref$level2 = _ref.level5,
|
21
|
+
level5 = _ref$level2 === void 0 ? true : _ref$level2,
|
20
22
|
areaType = _ref.areaType,
|
21
23
|
areaSubType = _ref.areaSubType,
|
22
24
|
_ref$disabled = _ref.disabled,
|
@@ -117,7 +119,7 @@ export var Areas = function Areas(_ref) {
|
|
117
119
|
}
|
118
120
|
});
|
119
121
|
},
|
120
|
-
enabled: level4Value != null
|
122
|
+
enabled: level4Value != null && level5
|
121
123
|
}),
|
122
124
|
level5AreaData = _useQuery5.data;
|
123
125
|
// 将level1位置树处理成下拉框
|
@@ -170,6 +172,18 @@ export var Areas = function Areas(_ref) {
|
|
170
172
|
};
|
171
173
|
});
|
172
174
|
}, [level5AreaData]);
|
175
|
+
// 搜索框宽度
|
176
|
+
var searchWidth = useMemo(function () {
|
177
|
+
if (level1 && level5) {
|
178
|
+
return '20%';
|
179
|
+
} else if (level1 && !level5) {
|
180
|
+
return '25%';
|
181
|
+
} else if (!level1 && level5) {
|
182
|
+
return '25%';
|
183
|
+
} else {
|
184
|
+
return '33.3%';
|
185
|
+
}
|
186
|
+
}, [level1, level5]);
|
173
187
|
// level1选择事件
|
174
188
|
var changeLevel1Select = function changeLevel1Select(value) {
|
175
189
|
setLevel1Value(value);
|
@@ -253,7 +267,7 @@ export var Areas = function Areas(_ref) {
|
|
253
267
|
showSearch: showSearch,
|
254
268
|
optionFilterProp: "label",
|
255
269
|
style: {
|
256
|
-
width:
|
270
|
+
width: searchWidth,
|
257
271
|
height: style === null || style === void 0 ? void 0 : style.height
|
258
272
|
},
|
259
273
|
options: level1AreaOptions,
|
@@ -267,7 +281,7 @@ export var Areas = function Areas(_ref) {
|
|
267
281
|
showSearch: showSearch,
|
268
282
|
optionFilterProp: "label",
|
269
283
|
style: {
|
270
|
-
width:
|
284
|
+
width: searchWidth,
|
271
285
|
height: style === null || style === void 0 ? void 0 : style.height
|
272
286
|
},
|
273
287
|
options: level2AreaOptions,
|
@@ -281,7 +295,7 @@ export var Areas = function Areas(_ref) {
|
|
281
295
|
showSearch: showSearch,
|
282
296
|
optionFilterProp: "label",
|
283
297
|
style: {
|
284
|
-
width:
|
298
|
+
width: searchWidth,
|
285
299
|
height: style === null || style === void 0 ? void 0 : style.height
|
286
300
|
},
|
287
301
|
options: level3AreaOptions,
|
@@ -291,24 +305,24 @@ export var Areas = function Areas(_ref) {
|
|
291
305
|
}), /*#__PURE__*/React.createElement(Select, {
|
292
306
|
value: level4Value,
|
293
307
|
allowClear: allowClear,
|
294
|
-
className: "".concat(mb.b('areas-select')),
|
308
|
+
className: "".concat(level5 ? mb.b('areas-select') : ''),
|
295
309
|
showSearch: showSearch,
|
296
310
|
optionFilterProp: "label",
|
297
311
|
style: {
|
298
|
-
width:
|
312
|
+
width: searchWidth,
|
299
313
|
height: style === null || style === void 0 ? void 0 : style.height
|
300
314
|
},
|
301
315
|
options: level4AreaOptions,
|
302
316
|
onChange: changeLevel4Select,
|
303
317
|
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder[3],
|
304
318
|
disabled: disabled
|
305
|
-
}), /*#__PURE__*/React.createElement(Select, {
|
319
|
+
}), level5 && /*#__PURE__*/React.createElement(Select, {
|
306
320
|
value: level5Value,
|
307
321
|
allowClear: allowClear,
|
308
322
|
showSearch: showSearch,
|
309
323
|
optionFilterProp: "label",
|
310
324
|
style: {
|
311
|
-
width:
|
325
|
+
width: searchWidth,
|
312
326
|
height: style === null || style === void 0 ? void 0 : style.height
|
313
327
|
},
|
314
328
|
options: level5AreaOptions,
|
package/dist/areas/index.scss
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
.yot-Areas {
|
2
|
-
border: var(--ant-line-width) var(--ant-line-type) var(--ant-color-border);
|
3
|
-
border-radius: var(--ant-border-radius);
|
4
|
-
&-areas-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-Areas {
|
2
|
+
border: var(--ant-line-width) var(--ant-line-type) var(--ant-color-border);
|
3
|
+
border-radius: var(--ant-border-radius);
|
4
|
+
&-areas-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
|
+
}
|