iov-pro-components 0.0.3
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/.eslintignore +5 -0
- package/.eslintrc.js +192 -0
- package/.gitignore +3 -0
- package/README.md +4 -0
- package/babel.config.js +5 -0
- package/docs/.vuepress/config.js +169 -0
- package/docs/.vuepress/styles/index.styl +62 -0
- package/docs/.vuepress/styles/palette.styl +20 -0
- package/docs/.vuepress/theme/enhanceApp.js +100 -0
- package/docs/.vuepress/theme/index.js +3 -0
- package/docs/README.md +13 -0
- package/docs/components/description.md +519 -0
- package/docs/components/dialog-select.md +91 -0
- package/docs/components/display.md +36 -0
- package/docs/components/enums.md +33 -0
- package/docs/components/icon.md +406 -0
- package/docs/components/link-group.md +39 -0
- package/docs/components/page-detail.md +48 -0
- package/docs/components/page-module.md +51 -0
- package/docs/components/pro-form.md +958 -0
- package/docs/components/pro-table.md +683 -0
- package/docs/components/request.md +44 -0
- package/docs/components/search-table.md +963 -0
- package/docs/components/space.md +35 -0
- package/docs/components/sub-title.md +24 -0
- package/docs/components/submit-module.md +24 -0
- package/docs/template/add.md +124 -0
- package/docs/template/confirm.md +28 -0
- package/docs/template/detail.md +240 -0
- package/docs/template/dialog.md +339 -0
- package/docs/template/list.md +464 -0
- package/docs/template/tabs-mini.md +32 -0
- package/docs/template/tabs.md +32 -0
- package/jsconfig.json +19 -0
- package/lib/iov-pro-components.css +1 -0
- package/lib/iov-pro-components.min.js +7 -0
- package/lib/postcss.config.js +8 -0
- package/package.json +75 -0
- package/patches/vue-server-renderer+2.7.16.patch +13 -0
- package/rollup.config.mjs +79 -0
- package/src/App.vue +103 -0
- package/src/main.js +33 -0
- package/src/packages/column-tooltip/index.js +7 -0
- package/src/packages/column-tooltip/src/main.vue +127 -0
- package/src/packages/description/index.js +7 -0
- package/src/packages/description/src/main.vue +375 -0
- package/src/packages/description/src/text.vue +103 -0
- package/src/packages/dialog-select/index.js +7 -0
- package/src/packages/dialog-select/src/main.vue +308 -0
- package/src/packages/display/index.js +7 -0
- package/src/packages/display/src/main.vue +44 -0
- package/src/packages/enums/index.js +7 -0
- package/src/packages/enums/src/main.vue +23 -0
- package/src/packages/export/index.js +7 -0
- package/src/packages/export/src/main.vue +316 -0
- package/src/packages/fixed-button-group/index.js +7 -0
- package/src/packages/fixed-button-group/src/main.vue +104 -0
- package/src/packages/form/index.js +7 -0
- package/src/packages/form/src/collapse.vue +149 -0
- package/src/packages/form/src/main.vue +1190 -0
- package/src/packages/form-collapse/index.js +7 -0
- package/src/packages/index.js +86 -0
- package/src/packages/link-group/index.js +7 -0
- package/src/packages/link-group/src/main.vue +52 -0
- package/src/packages/page-detail/index.js +7 -0
- package/src/packages/page-detail/src/main.vue +123 -0
- package/src/packages/page-module/index.js +7 -0
- package/src/packages/page-module/src/main.vue +56 -0
- package/src/packages/preview/index.js +7 -0
- package/src/packages/preview/src/eval-image-viewer.js +50 -0
- package/src/packages/preview/src/image-viewer.vue +366 -0
- package/src/packages/preview/src/main.vue +97 -0
- package/src/packages/request/index.js +7 -0
- package/src/packages/request/src/main.vue +125 -0
- package/src/packages/search-table/index.js +7 -0
- package/src/packages/search-table/src/inner-tabs.vue +237 -0
- package/src/packages/search-table/src/main.vue +472 -0
- package/src/packages/search-table/src/outer-tabs.vue +45 -0
- package/src/packages/search-table-inner-tabs/index.js +7 -0
- package/src/packages/search-table-outer-tabs/index.js +7 -0
- package/src/packages/space/index.js +7 -0
- package/src/packages/space/src/main.vue +74 -0
- package/src/packages/sub-title/index.js +7 -0
- package/src/packages/sub-title/src/main.vue +70 -0
- package/src/packages/submit-module/index.js +7 -0
- package/src/packages/submit-module/src/main.vue +67 -0
- package/src/packages/table/index.js +7 -0
- package/src/packages/table/src/filter.vue +89 -0
- package/src/packages/table/src/main.vue +668 -0
- package/src/packages/table/src/search.vue +90 -0
- package/src/packages/table/src/sort.vue +118 -0
- package/src/packages/theme/index.scss +15 -0
- package/src/packages/theme/src/column-tooltip.scss +23 -0
- package/src/packages/theme/src/common/color.scss +134 -0
- package/src/packages/theme/src/description.scss +56 -0
- package/src/packages/theme/src/dialog-select.scss +32 -0
- package/src/packages/theme/src/fixed-button-group.scss +25 -0
- package/src/packages/theme/src/form.scss +11 -0
- package/src/packages/theme/src/link-group.scss +43 -0
- package/src/packages/theme/src/page-detail.scss +61 -0
- package/src/packages/theme/src/page-module.scss +46 -0
- package/src/packages/theme/src/preview.scss +67 -0
- package/src/packages/theme/src/search-table.scss +185 -0
- package/src/packages/theme/src/space.scss +12 -0
- package/src/packages/theme/src/sub-title.scss +47 -0
- package/src/packages/theme/src/submit-module.scss +13 -0
- package/src/packages/theme/src/table.scss +129 -0
- package/src/packages/theme/src/toolbar.scss +109 -0
- package/src/packages/toolbar/index.js +7 -0
- package/src/packages/toolbar/src/main.vue +126 -0
- package/src/packages/toolbar/src/setting.vue +217 -0
- package/src/packages/toolbar/src/style.vue +68 -0
- package/src/packages/toolbar/src/zoom.vue +65 -0
- package/src/router.js +83 -0
- package/src/utils/config-center.js +218 -0
- package/src/utils/function-eval.js +84 -0
- package/src/utils/index.js +104 -0
- package/src/views/column-tooltip.vue +37 -0
- package/src/views/components/OtherSelect.vue +18 -0
- package/src/views/description.vue +60 -0
- package/src/views/detail.vue +146 -0
- package/src/views/directive/number.js +82 -0
- package/src/views/enums.vue +22 -0
- package/src/views/export.vue +9 -0
- package/src/views/form-collapse.vue +185 -0
- package/src/views/form.vue +402 -0
- package/src/views/link-group.vue +16 -0
- package/src/views/preview.vue +33 -0
- package/src/views/request.vue +56 -0
- package/src/views/search-table.vue +297 -0
- package/src/views/table.vue +145 -0
- package/src/views/toolbar.vue +30 -0
- package/vue.config.js +22 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
.image-viewer {
|
|
2
|
+
.is-disabled {
|
|
3
|
+
width: 32px;
|
|
4
|
+
height: 32px;
|
|
5
|
+
background-color: rgba(255,255,255, 0.3) !important;
|
|
6
|
+
}
|
|
7
|
+
.is-disabled-right {
|
|
8
|
+
width: 32px;
|
|
9
|
+
height: 32px;
|
|
10
|
+
transform: rotate(180deg);
|
|
11
|
+
background-color: rgba(255,255,255, 0.3) !important;
|
|
12
|
+
}
|
|
13
|
+
.el-image-viewer__prev {
|
|
14
|
+
width: 32px;
|
|
15
|
+
height: 32px;
|
|
16
|
+
background-color: rgba(255,255,255, 0.3);
|
|
17
|
+
&:hover {
|
|
18
|
+
width: 32px;
|
|
19
|
+
height: 32px;
|
|
20
|
+
background-color: rgba(255,255,255, 0.6);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.is-disabled-icon {
|
|
25
|
+
opacity: 0.2;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.el-image-viewer__next {
|
|
29
|
+
width: 32px;
|
|
30
|
+
height: 32px;
|
|
31
|
+
-webkit-transform: rotate(180deg);
|
|
32
|
+
transform: rotate(180deg);
|
|
33
|
+
right: 40px;
|
|
34
|
+
text-indent: 2px;
|
|
35
|
+
background-color: rgba(255, 255, 255, 0.3);
|
|
36
|
+
&:hover {
|
|
37
|
+
width: 32px;
|
|
38
|
+
height: 32px;
|
|
39
|
+
-webkit-transform: rotate(180deg);
|
|
40
|
+
transform: rotate(180deg);
|
|
41
|
+
background-color: rgba(255, 255, 255, 0.6);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.el-image-view__tools {
|
|
46
|
+
position: absolute;
|
|
47
|
+
right: 16px;
|
|
48
|
+
bottom: 30px;
|
|
49
|
+
line-height: 20px;
|
|
50
|
+
background: rgba(255, 255, 255, 0.2);
|
|
51
|
+
border-radius: 20px;
|
|
52
|
+
text-align: center;
|
|
53
|
+
font-size: 10px;
|
|
54
|
+
font-family: PingFangSC-Regular, PingFang SC;
|
|
55
|
+
font-weight: 400;
|
|
56
|
+
color: #494B53;
|
|
57
|
+
padding: 3px 13px;
|
|
58
|
+
:nth-child(2) {
|
|
59
|
+
padding: 0 5px;
|
|
60
|
+
font-weight: 600;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&__close {
|
|
65
|
+
font-size: 20px;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
@import "./common/color.scss";
|
|
2
|
+
|
|
3
|
+
.search-table {
|
|
4
|
+
&__title-main {
|
|
5
|
+
line-height: 22px;
|
|
6
|
+
margin-bottom: 12px;
|
|
7
|
+
}
|
|
8
|
+
&__title {
|
|
9
|
+
color: $--color-text-7;
|
|
10
|
+
font-family: PingFangSC, PingFang SC;
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
font-size: 16px;
|
|
13
|
+
}
|
|
14
|
+
&__sub-title {
|
|
15
|
+
margin-left: 8px;
|
|
16
|
+
color: $--color-text-2;
|
|
17
|
+
font-family: PingFangSC, PingFang SC;
|
|
18
|
+
font-weight: 400;
|
|
19
|
+
font-size: 12px;
|
|
20
|
+
}
|
|
21
|
+
&__module {
|
|
22
|
+
background: #FFFFFF;
|
|
23
|
+
border-radius: 8px;
|
|
24
|
+
margin-bottom: 10px;
|
|
25
|
+
padding: 16px;
|
|
26
|
+
.iov-pro-form {
|
|
27
|
+
.iov-pro-form__form-item > label {
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
padding: 0;
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
.iov-pro-table {
|
|
34
|
+
.iov-pro-link-group {
|
|
35
|
+
.iov-pro-space__item {
|
|
36
|
+
position: relative;
|
|
37
|
+
line-height: 1;
|
|
38
|
+
&:after {
|
|
39
|
+
content: '';
|
|
40
|
+
width: 1px;
|
|
41
|
+
height: 13px;
|
|
42
|
+
display: inline-block;
|
|
43
|
+
background: #DCDFE6;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
position: absolute;
|
|
46
|
+
right: 0;
|
|
47
|
+
top: 50%;
|
|
48
|
+
transform: translateY(-50%);
|
|
49
|
+
}
|
|
50
|
+
&:last-child {
|
|
51
|
+
&:after {
|
|
52
|
+
display: none;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
.el-link {
|
|
56
|
+
font-size: 13px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
&__toolbar {
|
|
63
|
+
align-items: center;
|
|
64
|
+
display: flex;
|
|
65
|
+
}
|
|
66
|
+
&__bar {
|
|
67
|
+
display: flex;
|
|
68
|
+
justify-content: space-between;
|
|
69
|
+
margin-bottom: 12px;
|
|
70
|
+
}
|
|
71
|
+
&__toggle-status {
|
|
72
|
+
align-items: center;
|
|
73
|
+
color: #0D1722;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
display: flex;
|
|
76
|
+
font-family: PingFangSC, PingFang SC;
|
|
77
|
+
font-weight: 500;
|
|
78
|
+
font-size: 12px;
|
|
79
|
+
height: 30px;
|
|
80
|
+
padding: 0 4px;
|
|
81
|
+
.iov-icon-arrow-down, .iov-icon-arrow-up {
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
margin-top: 2px;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
&__row {
|
|
87
|
+
position: relative;
|
|
88
|
+
.search-table__action-bar {
|
|
89
|
+
align-items: center;
|
|
90
|
+
bottom: 0;
|
|
91
|
+
display: flex;
|
|
92
|
+
top: 0;
|
|
93
|
+
right: 0;
|
|
94
|
+
position: absolute;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.inner-tabs {
|
|
100
|
+
&__title-main {
|
|
101
|
+
line-height: 22px;
|
|
102
|
+
margin-bottom: 12px;
|
|
103
|
+
}
|
|
104
|
+
&__title {
|
|
105
|
+
color: $--color-text-7;
|
|
106
|
+
font-family: PingFangSC, PingFang SC;
|
|
107
|
+
font-weight: 600;
|
|
108
|
+
font-size: 16px;
|
|
109
|
+
}
|
|
110
|
+
&__sub-title {
|
|
111
|
+
margin-left: 8px;
|
|
112
|
+
color: $--color-text-2;
|
|
113
|
+
font-family: PingFangSC, PingFang SC;
|
|
114
|
+
font-weight: 400;
|
|
115
|
+
font-size: 12px;
|
|
116
|
+
}
|
|
117
|
+
&__module {
|
|
118
|
+
background: #FFFFFF;
|
|
119
|
+
border-radius: 8px;
|
|
120
|
+
margin-bottom: 10px;
|
|
121
|
+
padding: 16px;
|
|
122
|
+
.iov-pro-form {
|
|
123
|
+
.iov-pro-form__form-item > label {
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
padding: 0;
|
|
126
|
+
white-space: nowrap;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
.el-tabs {
|
|
130
|
+
&__content {
|
|
131
|
+
overflow: visible;
|
|
132
|
+
}
|
|
133
|
+
&__nav-wrap::after {
|
|
134
|
+
display: none;
|
|
135
|
+
}
|
|
136
|
+
&__item {
|
|
137
|
+
font-size: 14px;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
.search-table {
|
|
141
|
+
&__module {
|
|
142
|
+
padding: 0;
|
|
143
|
+
}
|
|
144
|
+
&__action-bar {
|
|
145
|
+
bottom: 12px;
|
|
146
|
+
top: auto;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
&:last-child {
|
|
150
|
+
margin-bottom: 0;
|
|
151
|
+
padding-top: 0;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
&__bar {
|
|
155
|
+
display: flex;
|
|
156
|
+
justify-content: space-between;
|
|
157
|
+
margin-bottom: 14px;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.outer-tabs {
|
|
162
|
+
&__tabs {
|
|
163
|
+
.el-tabs {
|
|
164
|
+
&__header {
|
|
165
|
+
background: #FFFFFF;
|
|
166
|
+
border-radius: 8px 8px 0 0;
|
|
167
|
+
margin: 0;
|
|
168
|
+
padding: 0 16px;
|
|
169
|
+
}
|
|
170
|
+
&__item {
|
|
171
|
+
font-size: 14px;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
.search-table {
|
|
175
|
+
&__module {
|
|
176
|
+
&:first-child {
|
|
177
|
+
border-radius: 0 0 8px 8px;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
&__title-main {
|
|
181
|
+
display: none;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@import "./common/color.scss";
|
|
2
|
+
|
|
3
|
+
.iov-pro-sub-title {
|
|
4
|
+
margin-bottom: 12px;
|
|
5
|
+
font-family: PingFangSC, PingFang SC;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
}
|
|
9
|
+
.iov-pro-sub-title__icon {
|
|
10
|
+
margin-right: 8px;
|
|
11
|
+
width: 18px;
|
|
12
|
+
height: 18px;
|
|
13
|
+
background-position: 0 0;
|
|
14
|
+
background-repeat: no-repeat;
|
|
15
|
+
background-size: contain;
|
|
16
|
+
}
|
|
17
|
+
.iov-pro-sub-title__name {
|
|
18
|
+
margin-right: 8px;
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
color: $--color-text-6;
|
|
22
|
+
}
|
|
23
|
+
.iov-pro-sub-title__desc {
|
|
24
|
+
margin-right: 8px;
|
|
25
|
+
font-size: 13px;
|
|
26
|
+
color: $--color-text-4;
|
|
27
|
+
}
|
|
28
|
+
.iov-pro-sub-title__help {
|
|
29
|
+
margin-right: 8px;
|
|
30
|
+
.el-link {
|
|
31
|
+
margin-right: 8px;
|
|
32
|
+
font-size: 13px;
|
|
33
|
+
height: 26px;
|
|
34
|
+
color: #2F48FF;
|
|
35
|
+
line-height: 26px;
|
|
36
|
+
padding: 0 4px;
|
|
37
|
+
border-radius: 4px;
|
|
38
|
+
transition: all .2s ease;
|
|
39
|
+
.iconfont {
|
|
40
|
+
font-size: 12px;
|
|
41
|
+
margin-right: 4px;
|
|
42
|
+
}
|
|
43
|
+
&:not(.is-disabled):hover {
|
|
44
|
+
background: rgba(42, 104, 255, 0.08);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.iov-pro-submit-module {
|
|
2
|
+
padding: 16px 0 20px;
|
|
3
|
+
border-radius: 0px 0px 8px 8px;
|
|
4
|
+
position: fixed;
|
|
5
|
+
left: 228px;
|
|
6
|
+
right: 20px;
|
|
7
|
+
bottom: 0;
|
|
8
|
+
z-index: 9;
|
|
9
|
+
font-size: 0;
|
|
10
|
+
background: #fff;
|
|
11
|
+
text-align: center;
|
|
12
|
+
box-shadow: 0 0 12px 0 rgba(196, 198, 207, .2);
|
|
13
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
@import "./common/color.scss";
|
|
2
|
+
|
|
3
|
+
.iov-pro-table {
|
|
4
|
+
&__table {
|
|
5
|
+
.is-right .iov-pro-space.horizontal {
|
|
6
|
+
justify-content: flex-end;
|
|
7
|
+
}
|
|
8
|
+
.is-center .iov-pro-space.horizontal {
|
|
9
|
+
justify-content: center;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&__pagination {
|
|
14
|
+
text-align: right;
|
|
15
|
+
padding: 12px 0 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-filter {
|
|
19
|
+
&__icon {
|
|
20
|
+
border-radius: 2px;
|
|
21
|
+
color: $--color-fill-4;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
display: block;
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
width: 20px;
|
|
26
|
+
height: 20px;
|
|
27
|
+
line-height: 20px;
|
|
28
|
+
text-align: center;
|
|
29
|
+
&.is-actived {
|
|
30
|
+
color: $--color-primary-6;
|
|
31
|
+
&:hover {
|
|
32
|
+
color: $--color-primary-6;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
&:hover {
|
|
36
|
+
background-color: $--color-fill-3;
|
|
37
|
+
color: $--color-fill-5;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
&__operation {
|
|
41
|
+
border-top: 1px solid $--color-line-1;
|
|
42
|
+
text-align: right;
|
|
43
|
+
padding: 8px;
|
|
44
|
+
}
|
|
45
|
+
&__checkbox-group {
|
|
46
|
+
padding: 4px;
|
|
47
|
+
}
|
|
48
|
+
&__checkbox {
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
line-height: 32px;
|
|
51
|
+
padding: 0 12px;
|
|
52
|
+
width: 100%;
|
|
53
|
+
&:hover {
|
|
54
|
+
background-color: $--color-primary-1;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
&__popper {
|
|
58
|
+
margin-top: 4px;
|
|
59
|
+
padding: 0;
|
|
60
|
+
min-width: 120px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&-search {
|
|
65
|
+
&__icon {
|
|
66
|
+
border-radius: 2px;
|
|
67
|
+
color: $--color-fill-4;
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
display: inline-block;
|
|
70
|
+
font-size: 14px;
|
|
71
|
+
width: 20px;
|
|
72
|
+
height: 20px;
|
|
73
|
+
line-height: 20px;
|
|
74
|
+
text-align: center;
|
|
75
|
+
&.is-actived {
|
|
76
|
+
color: $--color-primary-6;
|
|
77
|
+
&:hover {
|
|
78
|
+
color: $--color-primary-6;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
&:hover {
|
|
82
|
+
background-color: $--color-fill-3;
|
|
83
|
+
color: $--color-fill-5;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
&__operation {
|
|
87
|
+
padding: 8px;
|
|
88
|
+
text-align: right;
|
|
89
|
+
}
|
|
90
|
+
&__input-wrapper {
|
|
91
|
+
padding: 8px 8px 0;
|
|
92
|
+
}
|
|
93
|
+
&__popper {
|
|
94
|
+
margin-top: 4px;
|
|
95
|
+
padding: 0;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&-sort {
|
|
100
|
+
box-sizing: border-box;
|
|
101
|
+
color: $--color-fill-4;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-direction: column;
|
|
105
|
+
width: 20px;
|
|
106
|
+
height: 20px;
|
|
107
|
+
padding: 3px;
|
|
108
|
+
.iovprofont {
|
|
109
|
+
display: block;
|
|
110
|
+
height: 50%;
|
|
111
|
+
&.iov-icon-sort-up {
|
|
112
|
+
line-height: 14px;
|
|
113
|
+
}
|
|
114
|
+
&.iov-icon-sort-down {
|
|
115
|
+
line-height: 2px;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
&.ascending {
|
|
119
|
+
.iov-icon-sort-up {
|
|
120
|
+
color: $--color-primary-6;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
&.descending {
|
|
124
|
+
.iov-icon-sort-down {
|
|
125
|
+
color: $--color-primary-6;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
@import "./common/color.scss";
|
|
2
|
+
|
|
3
|
+
.iov-pro-toolbar {
|
|
4
|
+
align-items: center;
|
|
5
|
+
display: flex;
|
|
6
|
+
&__icon {
|
|
7
|
+
background-color: #F2F3F5;
|
|
8
|
+
background-position: center center;
|
|
9
|
+
background-repeat: no-repeat;
|
|
10
|
+
background-size: 16px 16px;
|
|
11
|
+
border-radius: 4px;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
color: $--color-text-6;
|
|
14
|
+
display: block;
|
|
15
|
+
width: 26px;
|
|
16
|
+
height: 26px;
|
|
17
|
+
text-align: center;
|
|
18
|
+
line-height: 26px;
|
|
19
|
+
img {
|
|
20
|
+
width: 16px;
|
|
21
|
+
height: 16px;
|
|
22
|
+
vertical-align: middle;
|
|
23
|
+
}
|
|
24
|
+
&:hover {
|
|
25
|
+
color: $--color-primary-6;
|
|
26
|
+
}
|
|
27
|
+
&:active, &.is-active {
|
|
28
|
+
color: $--color-primary-7;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
&__dropdown-menu {
|
|
32
|
+
padding: 4px;
|
|
33
|
+
.el-dropdown-menu__item {
|
|
34
|
+
font-size: 13px;
|
|
35
|
+
line-height: 32px;
|
|
36
|
+
padding: 0 12px;
|
|
37
|
+
&:hover {
|
|
38
|
+
background-color: #F6F7F8;
|
|
39
|
+
color: $--color-text-6;
|
|
40
|
+
}
|
|
41
|
+
&:active {
|
|
42
|
+
font-weight: 600;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
&__setting {
|
|
47
|
+
&-popper {
|
|
48
|
+
padding: 0;
|
|
49
|
+
}
|
|
50
|
+
&-header {
|
|
51
|
+
align-items: center;
|
|
52
|
+
border-bottom: 1px solid $--color-line-1;
|
|
53
|
+
display: flex;
|
|
54
|
+
padding: 0 16px;
|
|
55
|
+
height: 42px;
|
|
56
|
+
justify-content: space-between;
|
|
57
|
+
}
|
|
58
|
+
&-body {
|
|
59
|
+
overflow: auto;
|
|
60
|
+
padding: 4px;
|
|
61
|
+
max-height: 190px;
|
|
62
|
+
}
|
|
63
|
+
&-item {
|
|
64
|
+
align-items: center;
|
|
65
|
+
border-radius: 2px;
|
|
66
|
+
display: flex;
|
|
67
|
+
height: 32px;
|
|
68
|
+
justify-content: space-between;
|
|
69
|
+
padding: 0 12px;
|
|
70
|
+
&:hover {
|
|
71
|
+
background: #F6F7F8;
|
|
72
|
+
}
|
|
73
|
+
&--drag {
|
|
74
|
+
color: $--color-fill-5;
|
|
75
|
+
cursor: grab;
|
|
76
|
+
font-size: 16px;
|
|
77
|
+
&.undraggable {
|
|
78
|
+
cursor: not-allowed;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
.el-checkbox {
|
|
82
|
+
align-items: center;
|
|
83
|
+
display: flex;
|
|
84
|
+
.el-checkbox__input {
|
|
85
|
+
height: 16px;
|
|
86
|
+
}
|
|
87
|
+
.el-checkbox__label {
|
|
88
|
+
max-width: 102px;
|
|
89
|
+
white-space: nowrap;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
text-overflow: ellipsis;
|
|
92
|
+
}
|
|
93
|
+
&.is-disabled {
|
|
94
|
+
.el-checkbox__label {
|
|
95
|
+
color: $--color-text-7;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
&-footer {
|
|
101
|
+
align-items: center;
|
|
102
|
+
border-top: 1px solid $--color-line-1;
|
|
103
|
+
display: flex;
|
|
104
|
+
padding: 0 8px;
|
|
105
|
+
height: 42px;
|
|
106
|
+
justify-content: flex-end;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import Space from '@/packages/space'
|
|
3
|
+
import functionEval from '@/utils/function-eval'
|
|
4
|
+
import { getComponentNames } from '@/utils/config-center'
|
|
5
|
+
import ToolbarSetting from './setting.vue'
|
|
6
|
+
import ToolbarZoom from './zoom.vue'
|
|
7
|
+
import ToolbarStyle from './style.vue'
|
|
8
|
+
|
|
9
|
+
const CONFIG_NAME = {
|
|
10
|
+
style: '样式',
|
|
11
|
+
refresh: '刷新',
|
|
12
|
+
zoom: '密度',
|
|
13
|
+
setting: '设置'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
name: 'IovProToolbar',
|
|
18
|
+
props: {
|
|
19
|
+
config: {
|
|
20
|
+
type: Array,
|
|
21
|
+
default: () => ['style', 'refresh', 'zoom', 'setting']
|
|
22
|
+
},
|
|
23
|
+
table: {
|
|
24
|
+
type: [Object, Function],
|
|
25
|
+
default: null
|
|
26
|
+
},
|
|
27
|
+
placement: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: 'top'
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
data() {
|
|
33
|
+
return {
|
|
34
|
+
selectAll: false,
|
|
35
|
+
settingVisible: false,
|
|
36
|
+
tableColumns: [],
|
|
37
|
+
checkedColumns: []
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
methods: {
|
|
41
|
+
/**
|
|
42
|
+
* 点击工具栏
|
|
43
|
+
* @param {String} type 当前配置类型
|
|
44
|
+
* @time 2024-10-30 10:58:10
|
|
45
|
+
*/
|
|
46
|
+
onClickToolbar(type) {
|
|
47
|
+
functionEval(type.onClick)()
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 重新加载表格数据
|
|
52
|
+
* @param {Object} vm 当前组件实例
|
|
53
|
+
* @time 2024-10-30 14:27:40
|
|
54
|
+
*/
|
|
55
|
+
reloadTableData() {
|
|
56
|
+
// 获取IovProTable示例
|
|
57
|
+
const iovProTable = this.table instanceof Function ? this.table() : this.table
|
|
58
|
+
// 表格组件方法刷新数据
|
|
59
|
+
iovProTable?.refresh()
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
render() {
|
|
63
|
+
const [Tooltip] = getComponentNames(['tooltip'])
|
|
64
|
+
return (
|
|
65
|
+
<div class='iov-pro-toolbar'>
|
|
66
|
+
<Space direction='horizontal' space='8px'>
|
|
67
|
+
{
|
|
68
|
+
this.config?.map(item => {
|
|
69
|
+
// 如果当前是调整密度
|
|
70
|
+
if (['style'].includes(item)) {
|
|
71
|
+
return (
|
|
72
|
+
<ToolbarStyle
|
|
73
|
+
placement={this.placement}
|
|
74
|
+
table={this.table}
|
|
75
|
+
/>
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
// 如果当前是刷新
|
|
79
|
+
if (['refresh'].includes(item)) {
|
|
80
|
+
return (
|
|
81
|
+
<Tooltip effect='dark' content={CONFIG_NAME[item]} placement={this.placement}>
|
|
82
|
+
<i class='iov-pro-toolbar__icon iov-icon-refresh' onClick={this.reloadTableData} />
|
|
83
|
+
</Tooltip>
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
// 如果当前是调整密度
|
|
87
|
+
if (['zoom'].includes(item)) {
|
|
88
|
+
return (
|
|
89
|
+
<ToolbarZoom
|
|
90
|
+
placement={this.placement}
|
|
91
|
+
table={this.table}
|
|
92
|
+
/>
|
|
93
|
+
)
|
|
94
|
+
}// 如果当前是设置表头字段
|
|
95
|
+
if (['setting'].includes(item)) {
|
|
96
|
+
return (
|
|
97
|
+
<ToolbarSetting
|
|
98
|
+
placement={this.placement}
|
|
99
|
+
table={this.table}
|
|
100
|
+
/>
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
// 如果是自定义配置
|
|
104
|
+
// 如果当前是icon字体图标
|
|
105
|
+
if (item.icon) {
|
|
106
|
+
return (
|
|
107
|
+
<Tooltip effect='dark' disabled={!item.name} content={item.name} placement={this.placement}>
|
|
108
|
+
<i class={['iov-pro-toolbar__icon', item.icon].join(' ')} onClick={this.onClickToolbar.bind(this, item)} />
|
|
109
|
+
</Tooltip>
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
return (
|
|
113
|
+
<Tooltip effect='dark' disabled={!item.name} content={item.name} placement={this.placement}>
|
|
114
|
+
<i class='iov-pro-toolbar__icon' onClick={this.onClickToolbar.bind(this, item)}>
|
|
115
|
+
<img src={item.image} />
|
|
116
|
+
</i>
|
|
117
|
+
</Tooltip>
|
|
118
|
+
)
|
|
119
|
+
})
|
|
120
|
+
}
|
|
121
|
+
</Space>
|
|
122
|
+
</div>
|
|
123
|
+
)
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
</script>
|