n20-common-lib 2.2.37 → 2.2.39
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/package.json +1 -1
- package/src/components/Filters/index.vue +25 -4
- package/src/components/Layout/HeaderWrap/indexN.vue +1 -1
- package/src/components/LoginTemporary/indexN.css +277 -0
- package/src/components/LoginTemporary/indexN.scss +325 -0
- package/src/components/LoginTemporary/indexN.vue +33 -294
- package/src/components/SelectTree/index.vue +5 -1
- package/src/utils/asciiWidth.js +107 -0
- package/src/utils/repairElementUI.js +3 -102
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
ref="popover"
|
|
4
4
|
v-model="showPop"
|
|
5
5
|
trigger="manual"
|
|
6
|
-
:width="
|
|
6
|
+
:width="widthAs"
|
|
7
7
|
:title="'筛选' | $lc"
|
|
8
8
|
:popper-class="popperClass"
|
|
9
9
|
placement="bottom-end"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
v-if="showPopC"
|
|
17
17
|
v-click-outside="clickOut"
|
|
18
18
|
class="n20-filter p-a-s p-b-0"
|
|
19
|
-
:label-width="
|
|
19
|
+
:label-width="labelWidthAs + 'px'"
|
|
20
20
|
@submit.native.prevent
|
|
21
21
|
>
|
|
22
22
|
<template v-if="!type">
|
|
@@ -83,6 +83,8 @@
|
|
|
83
83
|
import formItemInput from './form-item-input.vue'
|
|
84
84
|
import footerBox from '../FooterBox/index.vue'
|
|
85
85
|
import showColumn, { getColumns } from '../ShowColumn/index.vue'
|
|
86
|
+
import getWidth from '../../utils/asciiWidth'
|
|
87
|
+
|
|
86
88
|
export default {
|
|
87
89
|
name: 'Filters',
|
|
88
90
|
components: {
|
|
@@ -93,7 +95,7 @@ export default {
|
|
|
93
95
|
props: {
|
|
94
96
|
width: {
|
|
95
97
|
type: Number,
|
|
96
|
-
default:
|
|
98
|
+
default: undefined
|
|
97
99
|
},
|
|
98
100
|
defaultShow: {
|
|
99
101
|
type: Number,
|
|
@@ -109,7 +111,7 @@ export default {
|
|
|
109
111
|
},
|
|
110
112
|
labelWidth: {
|
|
111
113
|
type: [String, Number],
|
|
112
|
-
default:
|
|
114
|
+
default: undefined
|
|
113
115
|
},
|
|
114
116
|
type: {
|
|
115
117
|
type: String,
|
|
@@ -166,6 +168,25 @@ export default {
|
|
|
166
168
|
},
|
|
167
169
|
pageId() {
|
|
168
170
|
return 'filter:' + this.filterId
|
|
171
|
+
},
|
|
172
|
+
labelWidthAs() {
|
|
173
|
+
if (this.labelWidth !== undefined) return this.labelWidth
|
|
174
|
+
|
|
175
|
+
if (this.type === 'remote') {
|
|
176
|
+
let maxW = Math.max(4 * 14, ...this.remoteList.map((r) => getWidth(r.label)))
|
|
177
|
+
return maxW + 14
|
|
178
|
+
} else {
|
|
179
|
+
let maxW = Math.max(4 * 14, ...this.minList.map((r) => getWidth(r.label)))
|
|
180
|
+
if (this.showMore) {
|
|
181
|
+
maxW = Math.max(maxW, ...this.moreList.map((r) => getWidth(r.label)))
|
|
182
|
+
}
|
|
183
|
+
return maxW + 14
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
widthAs() {
|
|
187
|
+
if (this.width !== undefined) return this.width
|
|
188
|
+
|
|
189
|
+
return this.labelWidthAs + 240
|
|
169
190
|
}
|
|
170
191
|
},
|
|
171
192
|
methods: {
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
</el-dropdown-item>
|
|
165
165
|
<el-dropdown-item _command="systemSet">
|
|
166
166
|
<el-dropdown trigger="hover" size="medium" placement="left-start" style="width: 100%" @command="setUserFn">
|
|
167
|
-
<div class="flex-box flex-v">
|
|
167
|
+
<div class="flex-box flex-v" @click.stop>
|
|
168
168
|
<span>{{ '系统设置' | $lc }}</span>
|
|
169
169
|
<i class="el-icon-caret-right m-l-auto m-r-0"></i>
|
|
170
170
|
</div>
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
.login-logo-box {
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 48px;
|
|
4
|
+
left: 116px;
|
|
5
|
+
color: #ffffff;
|
|
6
|
+
}
|
|
7
|
+
.login-logo-text {
|
|
8
|
+
margin-left: 28px;
|
|
9
|
+
font-size: 20px;
|
|
10
|
+
font-weight: normal;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.login-form {
|
|
14
|
+
position: absolute;
|
|
15
|
+
right: 106px;
|
|
16
|
+
top: 50%;
|
|
17
|
+
width: 300px;
|
|
18
|
+
min-height: 350px;
|
|
19
|
+
padding: 30px 30px 18px !important;
|
|
20
|
+
transform: translateY(-50%);
|
|
21
|
+
background: #f7f6f6;
|
|
22
|
+
}
|
|
23
|
+
.login-form-header {
|
|
24
|
+
font-size: 16px;
|
|
25
|
+
color: #3d4a57;
|
|
26
|
+
}
|
|
27
|
+
.login-form-footer {
|
|
28
|
+
font-size: 12px;
|
|
29
|
+
color: #3d4a57;
|
|
30
|
+
}
|
|
31
|
+
.login-form-download {
|
|
32
|
+
text-decoration: none;
|
|
33
|
+
color: var(--color-primary);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.login-wrap-1 .login-logo-box {
|
|
37
|
+
left: 116px;
|
|
38
|
+
top: 48px;
|
|
39
|
+
}
|
|
40
|
+
.login-wrap-1 .login-form {
|
|
41
|
+
position: absolute;
|
|
42
|
+
right: 103px;
|
|
43
|
+
top: calc(50% - 65px);
|
|
44
|
+
transform: translateY(-50%);
|
|
45
|
+
}
|
|
46
|
+
.login-wrap-1 .sys-title {
|
|
47
|
+
display: none;
|
|
48
|
+
}
|
|
49
|
+
.login-wrap-1 .sys-carousel {
|
|
50
|
+
position: absolute;
|
|
51
|
+
left: calc(50% - 200px);
|
|
52
|
+
top: calc(50% - 22px);
|
|
53
|
+
width: 860px;
|
|
54
|
+
height: 330px;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
transform: translate(-50%, -50%);
|
|
57
|
+
}
|
|
58
|
+
.login-wrap-1 .sys-item-title {
|
|
59
|
+
height: 75px;
|
|
60
|
+
font-size: 18px;
|
|
61
|
+
font-weight: normal;
|
|
62
|
+
color: #ffffff;
|
|
63
|
+
line-height: 25px;
|
|
64
|
+
user-select: none;
|
|
65
|
+
}
|
|
66
|
+
.login-wrap-1 .sys-item-icon {
|
|
67
|
+
padding-top: 36px;
|
|
68
|
+
text-align: center;
|
|
69
|
+
}
|
|
70
|
+
.login-wrap-1 .sys-item-icon img {
|
|
71
|
+
width: 240px;
|
|
72
|
+
height: 160px;
|
|
73
|
+
user-select: none;
|
|
74
|
+
}
|
|
75
|
+
.login-wrap-1 .sys-item-shadow {
|
|
76
|
+
display: none;
|
|
77
|
+
}
|
|
78
|
+
.login-wrap-1 .swiper-slide {
|
|
79
|
+
transition: 300ms;
|
|
80
|
+
transform: scale(0.9);
|
|
81
|
+
}
|
|
82
|
+
.login-wrap-1 .swiper-slide .sys-item {
|
|
83
|
+
width: 100%;
|
|
84
|
+
height: 281px;
|
|
85
|
+
border-radius: 8px;
|
|
86
|
+
background: linear-gradient(180deg, rgba(188, 188, 188, 0.6), rgba(124, 124, 124, 0.1));
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
}
|
|
89
|
+
.login-wrap-1 .swiper-slide-active,
|
|
90
|
+
.login-wrap-1 .swiper-slide-duplicate-active {
|
|
91
|
+
transform: scale(1);
|
|
92
|
+
}
|
|
93
|
+
.login-wrap-1 .swiper-slide-active .sys-item,
|
|
94
|
+
.login-wrap-1 .swiper-slide-duplicate-active .sys-item {
|
|
95
|
+
background-image: url('./item1-active.png');
|
|
96
|
+
background-size: 100% 100%;
|
|
97
|
+
}
|
|
98
|
+
.login-wrap-1 .swiper-button-prev,
|
|
99
|
+
.login-wrap-1 .swiper-button-next {
|
|
100
|
+
position: absolute;
|
|
101
|
+
left: calc(50% - 200px);
|
|
102
|
+
top: calc(50% - 22px);
|
|
103
|
+
margin-top: -40px;
|
|
104
|
+
margin-left: -476px;
|
|
105
|
+
width: 32px;
|
|
106
|
+
height: 54px;
|
|
107
|
+
background-image: url('./button-prev.png');
|
|
108
|
+
background-size: 100% 100%;
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
}
|
|
111
|
+
.login-wrap-1 .swiper-button-next {
|
|
112
|
+
margin-left: 442px;
|
|
113
|
+
background-image: url('./button-next.png');
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.login-wrap-2 .login-logo-box {
|
|
117
|
+
left: 116px;
|
|
118
|
+
top: 48px;
|
|
119
|
+
}
|
|
120
|
+
.login-wrap-2 .login-form {
|
|
121
|
+
position: absolute;
|
|
122
|
+
right: 106px;
|
|
123
|
+
top: 50%;
|
|
124
|
+
transform: translateY(-50%);
|
|
125
|
+
}
|
|
126
|
+
.login-wrap-2 .sys-title {
|
|
127
|
+
display: none;
|
|
128
|
+
}
|
|
129
|
+
.login-wrap-2 .sys-carousel {
|
|
130
|
+
width: 856px;
|
|
131
|
+
position: absolute;
|
|
132
|
+
left: calc(50% - 200px);
|
|
133
|
+
top: 50%;
|
|
134
|
+
transform: translate(-50%, -50%);
|
|
135
|
+
flex-wrap: wrap;
|
|
136
|
+
justify-content: space-between;
|
|
137
|
+
align-content: space-between;
|
|
138
|
+
}
|
|
139
|
+
.login-wrap-2 .sys-item {
|
|
140
|
+
width: 190px;
|
|
141
|
+
height: 205px;
|
|
142
|
+
background: url('./item2.png');
|
|
143
|
+
background-size: 100% 100%;
|
|
144
|
+
}
|
|
145
|
+
.login-wrap-2 .sys-item:hover,
|
|
146
|
+
.login-wrap-2 .sys-item.active {
|
|
147
|
+
background: url('./item2-active.png');
|
|
148
|
+
background-size: 100% 100%;
|
|
149
|
+
}
|
|
150
|
+
.login-wrap-2 .sys-item-title {
|
|
151
|
+
height: 58px;
|
|
152
|
+
font-size: 14px;
|
|
153
|
+
color: #ffffff;
|
|
154
|
+
line-height: 20px;
|
|
155
|
+
user-select: none;
|
|
156
|
+
}
|
|
157
|
+
.login-wrap-2 .sys-item-icon {
|
|
158
|
+
padding-top: 20px;
|
|
159
|
+
text-align: center;
|
|
160
|
+
}
|
|
161
|
+
.login-wrap-2 .sys-item-icon img {
|
|
162
|
+
width: 180px;
|
|
163
|
+
height: 120px;
|
|
164
|
+
}
|
|
165
|
+
.login-wrap-2 .marginR {
|
|
166
|
+
margin-right: 32px;
|
|
167
|
+
}
|
|
168
|
+
.login-wrap-2 .marginB {
|
|
169
|
+
margin-bottom: 54px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.login-verify-box {
|
|
173
|
+
box-sizing: border-box;
|
|
174
|
+
position: absolute;
|
|
175
|
+
top: 57px;
|
|
176
|
+
right: 103px;
|
|
177
|
+
height: 28px;
|
|
178
|
+
line-height: 26px;
|
|
179
|
+
padding-left: 8px;
|
|
180
|
+
padding-right: 8px;
|
|
181
|
+
border: 1px solid #ffffff;
|
|
182
|
+
border-radius: 4px;
|
|
183
|
+
font-size: 14px;
|
|
184
|
+
text-align: center;
|
|
185
|
+
color: #ffffff;
|
|
186
|
+
cursor: pointer;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.login-copyright {
|
|
190
|
+
position: absolute;
|
|
191
|
+
bottom: 24px;
|
|
192
|
+
left: 0;
|
|
193
|
+
font-size: 12px;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.download-plug-in {
|
|
197
|
+
text-decoration: underline;
|
|
198
|
+
margin-left: 48px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@media (max-width: 1400px), (max-height: 720px) {
|
|
202
|
+
.login-wrap-1 .login-form {
|
|
203
|
+
right: 80px;
|
|
204
|
+
top: calc(50% + 30px);
|
|
205
|
+
width: 288px;
|
|
206
|
+
min-height: 338px;
|
|
207
|
+
padding: 24px 24px 14px !important;
|
|
208
|
+
}
|
|
209
|
+
.login-wrap-1 .sys-carousel {
|
|
210
|
+
top: calc(50% + 40px);
|
|
211
|
+
}
|
|
212
|
+
.login-wrap-1 .swiper-button-prev,
|
|
213
|
+
.login-wrap-1 .swiper-button-next {
|
|
214
|
+
top: calc(50% + 30px);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.login-wrap-2 .login-form {
|
|
218
|
+
right: 98px;
|
|
219
|
+
top: calc(50% + 30px);
|
|
220
|
+
width: 288px;
|
|
221
|
+
min-height: 338px;
|
|
222
|
+
padding: 24px 24px 14px !important;
|
|
223
|
+
}
|
|
224
|
+
.login-wrap-2 .sys-carousel {
|
|
225
|
+
width: 834px;
|
|
226
|
+
left: calc(50% - 190px);
|
|
227
|
+
top: calc(50% + 30px);
|
|
228
|
+
}
|
|
229
|
+
.login-wrap-2 .marginR {
|
|
230
|
+
margin-right: 24px;
|
|
231
|
+
}
|
|
232
|
+
.login-wrap-2 .marginB {
|
|
233
|
+
margin-bottom: 32px;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
.login-bg-light .login-logo-box {
|
|
237
|
+
color: #333333;
|
|
238
|
+
}
|
|
239
|
+
.login-bg-light .login-form {
|
|
240
|
+
background: #ffffff;
|
|
241
|
+
color: #333333;
|
|
242
|
+
}
|
|
243
|
+
.login-bg-light .login-form-footer {
|
|
244
|
+
color: #333333;
|
|
245
|
+
}
|
|
246
|
+
.login-bg-light .login-verify-box {
|
|
247
|
+
color: #333333;
|
|
248
|
+
border-color: #333333;
|
|
249
|
+
}
|
|
250
|
+
.login-bg-light.login-wrap-1 .swiper-slide .sys-item {
|
|
251
|
+
background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
|
|
252
|
+
box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
|
|
253
|
+
}
|
|
254
|
+
.login-bg-light.login-wrap-1 .swiper-slide .sys-item-title {
|
|
255
|
+
color: #333333;
|
|
256
|
+
}
|
|
257
|
+
.login-bg-light.login-wrap-1 .swiper-slide-active .sys-item,
|
|
258
|
+
.login-bg-light.login-wrap-1 .swiper-slide-duplicate-active .sys-item {
|
|
259
|
+
background-image: url('./item1-light-active.png');
|
|
260
|
+
background-size: 100% 100%;
|
|
261
|
+
}
|
|
262
|
+
.login-bg-light.login-wrap-1 .swiper-button-prev,
|
|
263
|
+
.login-bg-light.login-wrap-1 .swiper-button-next {
|
|
264
|
+
filter: brightness(0.7);
|
|
265
|
+
}
|
|
266
|
+
.login-bg-light.login-wrap-2 .sys-item {
|
|
267
|
+
background-image: url('./item2-light.png');
|
|
268
|
+
box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
|
|
269
|
+
}
|
|
270
|
+
.login-bg-light.login-wrap-2 .sys-item:hover,
|
|
271
|
+
.login-bg-light.login-wrap-2 .sys-item.active {
|
|
272
|
+
background-image: url('./item2-light-active.png');
|
|
273
|
+
background-size: 100% 100%;
|
|
274
|
+
}
|
|
275
|
+
.login-bg-light.login-wrap-2 .sys-item-title {
|
|
276
|
+
color: #333333;
|
|
277
|
+
}
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
$colorL: #ffffff;
|
|
2
|
+
$colorB: #333333;
|
|
3
|
+
$swiperW: 860px;
|
|
4
|
+
|
|
5
|
+
.login-logo {
|
|
6
|
+
&-box {
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 48px;
|
|
9
|
+
left: 116px;
|
|
10
|
+
|
|
11
|
+
color: $colorL;
|
|
12
|
+
}
|
|
13
|
+
&-text {
|
|
14
|
+
margin-left: 28px;
|
|
15
|
+
font-size: 20px;
|
|
16
|
+
font-weight: normal;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
.login-form {
|
|
20
|
+
position: absolute;
|
|
21
|
+
right: 106px;
|
|
22
|
+
top: 50%;
|
|
23
|
+
|
|
24
|
+
width: 300px;
|
|
25
|
+
min-height: 350px;
|
|
26
|
+
padding: 30px 30px 18px !important;
|
|
27
|
+
transform: translateY(-50%);
|
|
28
|
+
background: #f7f6f6;
|
|
29
|
+
|
|
30
|
+
&-header {
|
|
31
|
+
font-size: 16px;
|
|
32
|
+
color: #3d4a57;
|
|
33
|
+
}
|
|
34
|
+
&-footer {
|
|
35
|
+
font-size: 12px;
|
|
36
|
+
color: #3d4a57;
|
|
37
|
+
}
|
|
38
|
+
&-download {
|
|
39
|
+
text-decoration: none;
|
|
40
|
+
color: var(--color-primary);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.login-wrap-1 {
|
|
45
|
+
.login-logo-box {
|
|
46
|
+
left: 116px;
|
|
47
|
+
top: 48px;
|
|
48
|
+
}
|
|
49
|
+
.login-form {
|
|
50
|
+
position: absolute;
|
|
51
|
+
right: 103px;
|
|
52
|
+
top: calc(50% - 65px);
|
|
53
|
+
transform: translateY(-50%);
|
|
54
|
+
}
|
|
55
|
+
.sys {
|
|
56
|
+
&-title {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
&-carousel {
|
|
60
|
+
position: absolute;
|
|
61
|
+
left: calc(50% - 200px);
|
|
62
|
+
top: calc(50% - 22px);
|
|
63
|
+
|
|
64
|
+
width: $swiperW;
|
|
65
|
+
height: 330px;
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
transform: translate(-50%, -50%);
|
|
68
|
+
}
|
|
69
|
+
&-item {
|
|
70
|
+
&-title {
|
|
71
|
+
height: 75px;
|
|
72
|
+
font-size: 18px;
|
|
73
|
+
font-weight: normal;
|
|
74
|
+
color: $colorL;
|
|
75
|
+
line-height: 25px;
|
|
76
|
+
user-select: none;
|
|
77
|
+
}
|
|
78
|
+
&-icon {
|
|
79
|
+
padding-top: 36px;
|
|
80
|
+
text-align: center;
|
|
81
|
+
img {
|
|
82
|
+
width: 240px;
|
|
83
|
+
height: 160px;
|
|
84
|
+
user-select: none;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
&-shadow {
|
|
88
|
+
display: none;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.swiper-slide {
|
|
94
|
+
transition: 300ms;
|
|
95
|
+
transform: scale(0.9);
|
|
96
|
+
.sys-item {
|
|
97
|
+
width: 100%;
|
|
98
|
+
height: 281px;
|
|
99
|
+
border-radius: 8px;
|
|
100
|
+
background: linear-gradient(180deg, rgba(188, 188, 188, 0.6), rgba(124, 124, 124, 0.1));
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
}
|
|
103
|
+
&-active,
|
|
104
|
+
&-duplicate-active {
|
|
105
|
+
transform: scale(1);
|
|
106
|
+
.sys-item {
|
|
107
|
+
background-image: url('./item1-active.png');
|
|
108
|
+
background-size: 100% 100%;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.swiper-button-prev,
|
|
114
|
+
.swiper-button-next {
|
|
115
|
+
position: absolute;
|
|
116
|
+
left: calc(50% - 200px);
|
|
117
|
+
top: calc(50% - 22px);
|
|
118
|
+
|
|
119
|
+
margin-top: -40px;
|
|
120
|
+
margin-left: -46px - $swiperW/2;
|
|
121
|
+
width: 32px;
|
|
122
|
+
height: 54px;
|
|
123
|
+
background-image: url('./button-prev.png');
|
|
124
|
+
background-size: 100% 100%;
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
}
|
|
127
|
+
.swiper-button-next {
|
|
128
|
+
margin-left: 12px + $swiperW/2;
|
|
129
|
+
background-image: url('./button-next.png');
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.login-wrap-2 {
|
|
134
|
+
.login-logo-box {
|
|
135
|
+
left: 116px;
|
|
136
|
+
top: 48px;
|
|
137
|
+
}
|
|
138
|
+
.login-form {
|
|
139
|
+
position: absolute;
|
|
140
|
+
right: 106px;
|
|
141
|
+
top: 50%;
|
|
142
|
+
transform: translateY(-50%);
|
|
143
|
+
}
|
|
144
|
+
.sys {
|
|
145
|
+
&-title {
|
|
146
|
+
display: none;
|
|
147
|
+
}
|
|
148
|
+
&-carousel {
|
|
149
|
+
width: 856px;
|
|
150
|
+
position: absolute;
|
|
151
|
+
left: calc(50% - 200px);
|
|
152
|
+
top: 50%;
|
|
153
|
+
transform: translate(-50%, -50%);
|
|
154
|
+
flex-wrap: wrap;
|
|
155
|
+
justify-content: space-between;
|
|
156
|
+
align-content: space-between;
|
|
157
|
+
}
|
|
158
|
+
&-item {
|
|
159
|
+
width: 190px;
|
|
160
|
+
height: 205px;
|
|
161
|
+
background: url('./item2.png');
|
|
162
|
+
background-size: 100% 100%;
|
|
163
|
+
&:hover,
|
|
164
|
+
&.active {
|
|
165
|
+
background: url('./item2-active.png');
|
|
166
|
+
background-size: 100% 100%;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&-title {
|
|
170
|
+
height: 58px;
|
|
171
|
+
font-size: 14px;
|
|
172
|
+
color: $colorL;
|
|
173
|
+
line-height: 20px;
|
|
174
|
+
user-select: none;
|
|
175
|
+
}
|
|
176
|
+
&-icon {
|
|
177
|
+
padding-top: 20px;
|
|
178
|
+
text-align: center;
|
|
179
|
+
img {
|
|
180
|
+
width: 180px;
|
|
181
|
+
height: 120px;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
.marginR {
|
|
187
|
+
margin-right: 32px;
|
|
188
|
+
}
|
|
189
|
+
.marginB {
|
|
190
|
+
margin-bottom: 54px;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// 查验中心
|
|
195
|
+
.login-verify-box {
|
|
196
|
+
box-sizing: border-box;
|
|
197
|
+
|
|
198
|
+
position: absolute;
|
|
199
|
+
top: 57px;
|
|
200
|
+
right: 103px;
|
|
201
|
+
|
|
202
|
+
height: 28px;
|
|
203
|
+
line-height: 26px;
|
|
204
|
+
padding-left: 8px;
|
|
205
|
+
padding-right: 8px;
|
|
206
|
+
border: 1px solid #ffffff;
|
|
207
|
+
border-radius: 4px;
|
|
208
|
+
font-size: 14px;
|
|
209
|
+
text-align: center;
|
|
210
|
+
color: $colorL;
|
|
211
|
+
cursor: pointer;
|
|
212
|
+
}
|
|
213
|
+
// 版权声明
|
|
214
|
+
.login-copyright {
|
|
215
|
+
position: absolute;
|
|
216
|
+
bottom: 24px;
|
|
217
|
+
left: 0;
|
|
218
|
+
font-size: 12px;
|
|
219
|
+
}
|
|
220
|
+
// 插件下载
|
|
221
|
+
.download-plug-in {
|
|
222
|
+
text-decoration: underline;
|
|
223
|
+
margin-left: 48px;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
@media (max-width: 1400px), (max-height: 720px) {
|
|
227
|
+
.login-wrap-1 {
|
|
228
|
+
.login-form {
|
|
229
|
+
right: 80px;
|
|
230
|
+
top: calc(50% + 30px);
|
|
231
|
+
|
|
232
|
+
width: 288px;
|
|
233
|
+
min-height: 338px;
|
|
234
|
+
padding: 24px 24px 14px !important;
|
|
235
|
+
}
|
|
236
|
+
.sys {
|
|
237
|
+
&-carousel {
|
|
238
|
+
top: calc(50% + 40px);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
.swiper-button-prev,
|
|
242
|
+
.swiper-button-next {
|
|
243
|
+
top: calc(50% + 30px);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
.login-wrap-2 {
|
|
247
|
+
.login-form {
|
|
248
|
+
right: 98px;
|
|
249
|
+
top: calc(50% + 30px);
|
|
250
|
+
|
|
251
|
+
width: 288px;
|
|
252
|
+
min-height: 338px;
|
|
253
|
+
padding: 24px 24px 14px !important;
|
|
254
|
+
}
|
|
255
|
+
.sys {
|
|
256
|
+
&-carousel {
|
|
257
|
+
width: 834px;
|
|
258
|
+
left: calc(50% - 190px);
|
|
259
|
+
top: calc(50% + 30px);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
.marginR {
|
|
263
|
+
margin-right: 24px;
|
|
264
|
+
}
|
|
265
|
+
.marginB {
|
|
266
|
+
margin-bottom: 32px;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.login-bg-light {
|
|
272
|
+
.login-logo-box {
|
|
273
|
+
color: $colorB;
|
|
274
|
+
}
|
|
275
|
+
.login-form {
|
|
276
|
+
background: #ffffff;
|
|
277
|
+
color: $colorB;
|
|
278
|
+
&-footer {
|
|
279
|
+
color: $colorB;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
.login-verify-box {
|
|
283
|
+
color: $colorB;
|
|
284
|
+
border-color: $colorB;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
&.login-wrap-1 {
|
|
288
|
+
.swiper-slide {
|
|
289
|
+
.sys-item {
|
|
290
|
+
background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
|
|
291
|
+
box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
|
|
292
|
+
&-title {
|
|
293
|
+
color: $colorB;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
&-active,
|
|
297
|
+
&-duplicate-active {
|
|
298
|
+
.sys-item {
|
|
299
|
+
background-image: url('./item1-light-active.png');
|
|
300
|
+
background-size: 100% 100%;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.swiper-button-prev,
|
|
306
|
+
.swiper-button-next {
|
|
307
|
+
filter: brightness(0.7);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
&.login-wrap-2 {
|
|
312
|
+
.sys-item {
|
|
313
|
+
background-image: url('./item2-light.png');
|
|
314
|
+
box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
|
|
315
|
+
&:hover,
|
|
316
|
+
&.active {
|
|
317
|
+
background-image: url('./item2-light-active.png');
|
|
318
|
+
background-size: 100% 100%;
|
|
319
|
+
}
|
|
320
|
+
&-title {
|
|
321
|
+
color: $colorB;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
@@ -62,10 +62,10 @@
|
|
|
62
62
|
v-for="(item, i) in systemList"
|
|
63
63
|
:key="item.NO"
|
|
64
64
|
class="sys-item float-left"
|
|
65
|
-
:class="{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
:class="{
|
|
66
|
+
active: item.NO === sltSys.NO,
|
|
67
|
+
marginR: (i + 1) % 4,
|
|
68
|
+
marginB: systemList.length > 4 && i < 4
|
|
69
69
|
}"
|
|
70
70
|
@click="selSystem(item)"
|
|
71
71
|
>
|
|
@@ -96,9 +96,7 @@
|
|
|
96
96
|
<el-dropdown-item slot="other">
|
|
97
97
|
<slot name="others"></slot>
|
|
98
98
|
</el-dropdown-item>
|
|
99
|
-
<div slot="footer" class="login-form-footer
|
|
100
|
-
<slot name="footer"></slot>
|
|
101
|
-
</div>
|
|
99
|
+
<div slot="footer" class="login-form-footer text-r"><slot name="footer"></slot></div>
|
|
102
100
|
</loginForm>
|
|
103
101
|
<retrievePw v-if="operateType === 'retrievePw'" class="login-form" @changType="getChangetype" />
|
|
104
102
|
<div class="login-copyright w-100p text-c color-white">
|
|
@@ -341,13 +339,13 @@ export default {
|
|
|
341
339
|
if (window.sessionStorage.getItem('_auto_login_ing_')) return this.autoLoginSS()
|
|
342
340
|
this.removeStorage()
|
|
343
341
|
|
|
344
|
-
this.setWrapSty()
|
|
345
|
-
window.addEventListener('resize', this.setWrapSty)
|
|
342
|
+
// this.setWrapSty()
|
|
343
|
+
// window.addEventListener('resize', this.setWrapSty)
|
|
346
344
|
|
|
347
345
|
this.init()
|
|
348
346
|
},
|
|
349
347
|
beforeDestroy() {
|
|
350
|
-
window.removeEventListener('resize', this.setWrapSty)
|
|
348
|
+
// window.removeEventListener('resize', this.setWrapSty)
|
|
351
349
|
},
|
|
352
350
|
methods: {
|
|
353
351
|
async loginThenT() {
|
|
@@ -360,25 +358,23 @@ export default {
|
|
|
360
358
|
await this.loginThen()
|
|
361
359
|
}
|
|
362
360
|
},
|
|
363
|
-
setWrapSty() {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}
|
|
381
|
-
},
|
|
361
|
+
// setWrapSty() {
|
|
362
|
+
// let winW = document.documentElement.clientWidth
|
|
363
|
+
// let winH = document.documentElement.clientHeight
|
|
364
|
+
// let ratioO = winW / winH
|
|
365
|
+
// let W = 1440
|
|
366
|
+
// let H = 900
|
|
367
|
+
// let ratio = W / H
|
|
368
|
+
// if (winW >= W && winH >= H) {
|
|
369
|
+
// this.wrapStyle = ''
|
|
370
|
+
// return false
|
|
371
|
+
// }
|
|
372
|
+
// if (ratioO > ratio) {
|
|
373
|
+
// this.wrapStyle = `.login-wrap{width:${Math.floor(H * ratioO)}px; height:${H}px; transform: scale(${winH / H});}`
|
|
374
|
+
// } else {
|
|
375
|
+
// this.wrapStyle = `.login-wrap{width:${W}px; height:${Math.floor(W / ratioO)}px; transform: scale(${winW / W});}`
|
|
376
|
+
// }
|
|
377
|
+
// },
|
|
382
378
|
async init() {
|
|
383
379
|
const { _layoutData = {}, loginSetting } = await getJsonc('/server-config.jsonc')
|
|
384
380
|
let _loginSetting = loginSetting || _layoutData.loginSetting
|
|
@@ -517,269 +513,12 @@ export default {
|
|
|
517
513
|
}
|
|
518
514
|
}
|
|
519
515
|
</script>
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
color: #333333;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
.login-logo-text {
|
|
532
|
-
margin-left: 28px;
|
|
533
|
-
font-size: 20px;
|
|
534
|
-
font-weight: normal;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
.login-form {
|
|
538
|
-
position: absolute;
|
|
539
|
-
right: 103px;
|
|
540
|
-
top: 50%;
|
|
541
|
-
width: 324px;
|
|
542
|
-
min-height: 360px;
|
|
543
|
-
padding: 30px 30px 18px !important;
|
|
544
|
-
transform: translateY(-50%);
|
|
545
|
-
background: #f7f6f6;
|
|
546
|
-
}
|
|
547
|
-
.login-bg-light .login-form {
|
|
548
|
-
background: #ffffff;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
.login-verify-box {
|
|
552
|
-
box-sizing: border-box;
|
|
553
|
-
position: absolute;
|
|
554
|
-
top: 57px;
|
|
555
|
-
right: 103px;
|
|
556
|
-
height: 28px;
|
|
557
|
-
line-height: 26px;
|
|
558
|
-
padding-left: 8px;
|
|
559
|
-
padding-right: 8px;
|
|
560
|
-
border: 1px solid #ffffff;
|
|
561
|
-
border-radius: 4px;
|
|
562
|
-
font-size: 14px;
|
|
563
|
-
text-align: center;
|
|
564
|
-
color: #ffffff;
|
|
565
|
-
cursor: pointer;
|
|
566
|
-
}
|
|
567
|
-
.login-bg-light .login-verify-box {
|
|
568
|
-
color: #333333;
|
|
569
|
-
border-color: #333333;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
.login-form-header {
|
|
573
|
-
font-size: 16px;
|
|
574
|
-
color: #3d4a57;
|
|
575
|
-
}
|
|
576
|
-
.login-bg-light .login-form {
|
|
577
|
-
color: #333333;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
.login-form-footer {
|
|
581
|
-
font-size: 12px;
|
|
582
|
-
color: #3d4a57;
|
|
583
|
-
}
|
|
584
|
-
.login-bg-light .login-form-footer {
|
|
585
|
-
color: #333333;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
.login-form-download {
|
|
589
|
-
text-decoration: none;
|
|
590
|
-
color: var(--color-primary);
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
.login-copyright {
|
|
594
|
-
position: absolute;
|
|
595
|
-
bottom: 24px;
|
|
596
|
-
left: 0;
|
|
597
|
-
font-size: 12px;
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
.download-plug-in {
|
|
601
|
-
text-decoration: underline;
|
|
602
|
-
margin-left: 48px;
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
.login-wrap-1 .login-logo-box {
|
|
606
|
-
left: 116px;
|
|
607
|
-
top: 48px;
|
|
608
|
-
}
|
|
609
|
-
.login-wrap-1 .login-form {
|
|
610
|
-
position: absolute;
|
|
611
|
-
right: 103px;
|
|
612
|
-
top: calc(50% - 65px);
|
|
613
|
-
transform: translateY(-50%);
|
|
614
|
-
}
|
|
615
|
-
.login-wrap-1 .sys-title {
|
|
616
|
-
display: none;
|
|
617
|
-
/* position: absolute;
|
|
618
|
-
left: 116px;
|
|
619
|
-
top: calc(50% - 248px);
|
|
620
|
-
line-height: 22px;
|
|
621
|
-
font-size: 16px;
|
|
622
|
-
color: #ffffff; */
|
|
623
|
-
}
|
|
624
|
-
.login-wrap-1 .sys-carousel {
|
|
625
|
-
position: absolute;
|
|
626
|
-
left: 90px;
|
|
627
|
-
top: calc(50% - 22px);
|
|
628
|
-
width: 860px;
|
|
629
|
-
height: 330px;
|
|
630
|
-
overflow: hidden;
|
|
631
|
-
transform: translateY(-50%);
|
|
632
|
-
}
|
|
633
|
-
.login-wrap-1 .swiper-slide {
|
|
634
|
-
transition: 300ms;
|
|
635
|
-
transform: scale(0.9);
|
|
636
|
-
}
|
|
637
|
-
.login-wrap-1 .swiper-slide .sys-item {
|
|
638
|
-
width: 100%;
|
|
639
|
-
height: 281px;
|
|
640
|
-
border-radius: 8px;
|
|
641
|
-
background: linear-gradient(180deg, rgba(188, 188, 188, 0.6), rgba(124, 124, 124, 0.1));
|
|
642
|
-
cursor: pointer;
|
|
643
|
-
}
|
|
644
|
-
.login-bg-light.login-wrap-1 .swiper-slide .sys-item {
|
|
645
|
-
background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
|
|
646
|
-
box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
|
|
647
|
-
}
|
|
648
|
-
.login-wrap-1 .swiper-slide-active,
|
|
649
|
-
.login-wrap-1 .swiper-slide-duplicate-active {
|
|
650
|
-
transform: scale(1);
|
|
651
|
-
}
|
|
652
|
-
.login-wrap-1 .swiper-slide-active .sys-item,
|
|
653
|
-
.login-wrap-1 .swiper-slide-duplicate-active .sys-item {
|
|
654
|
-
background-image: url('./item1-active.png');
|
|
655
|
-
background-size: 100% 100%;
|
|
656
|
-
}
|
|
657
|
-
.login-bg-light.login-wrap-1 .swiper-slide-active .sys-item,
|
|
658
|
-
.login-bg-light.login-wrap-1 .swiper-slide-duplicate-active .sys-item {
|
|
659
|
-
background-image: url('./item1-light-active.png');
|
|
660
|
-
background-size: 100% 100%;
|
|
661
|
-
}
|
|
662
|
-
.login-wrap-1 .swiper-button-prev,
|
|
663
|
-
.login-wrap-1 .swiper-button-next {
|
|
664
|
-
position: absolute;
|
|
665
|
-
left: 40px;
|
|
666
|
-
top: calc(50% - 22px);
|
|
667
|
-
margin-top: -40px;
|
|
668
|
-
width: 32px;
|
|
669
|
-
height: 54px;
|
|
670
|
-
background-image: url('./button-prev.png');
|
|
671
|
-
background-size: 100% 100%;
|
|
672
|
-
cursor: pointer;
|
|
673
|
-
}
|
|
674
|
-
.login-bg-light.login-wrap-1 .swiper-button-prev,
|
|
675
|
-
.login-bg-light.login-wrap-1 .swiper-button-next {
|
|
676
|
-
filter: brightness(0.7);
|
|
677
|
-
}
|
|
678
|
-
.login-wrap-1 .swiper-button-next {
|
|
679
|
-
left: 964px;
|
|
680
|
-
background-image: url('./button-next.png');
|
|
681
|
-
}
|
|
682
|
-
.login-wrap-1 .sys-item-title {
|
|
683
|
-
height: 75px;
|
|
684
|
-
font-size: 18px;
|
|
685
|
-
font-weight: normal;
|
|
686
|
-
color: #ffffff;
|
|
687
|
-
line-height: 25px;
|
|
688
|
-
user-select: none;
|
|
689
|
-
}
|
|
690
|
-
.login-bg-light.login-wrap-1 .sys-item-title {
|
|
691
|
-
color: #333333;
|
|
692
|
-
}
|
|
693
|
-
.login-wrap-1 .sys-item-icon {
|
|
694
|
-
padding-top: 36px;
|
|
695
|
-
text-align: center;
|
|
696
|
-
}
|
|
697
|
-
.login-wrap-1 .sys-item-icon img {
|
|
698
|
-
width: 240px;
|
|
699
|
-
height: 160px;
|
|
700
|
-
user-select: none;
|
|
701
|
-
}
|
|
702
|
-
.login-wrap-1 .sys-item-shadow {
|
|
703
|
-
display: none;
|
|
704
|
-
/* width: 349px;
|
|
705
|
-
height: 15px;
|
|
706
|
-
margin-top: 20px;
|
|
707
|
-
background: url('./sysShadow.png');
|
|
708
|
-
background-size: 100% 100%;
|
|
709
|
-
margin-left: -45px;
|
|
710
|
-
opacity: 0;
|
|
711
|
-
transition: 300ms; */
|
|
712
|
-
}
|
|
713
|
-
/* .login-wrap-1 .swiper-slide-active .sys-item-shadow,
|
|
714
|
-
.login-wrap-1 .swiper-slide-duplicate-active .sys-item-shadow {
|
|
715
|
-
opacity: 0.5;
|
|
716
|
-
} */
|
|
717
|
-
|
|
718
|
-
.login-wrap-2 .login-logo-box {
|
|
719
|
-
left: 116px;
|
|
720
|
-
top: 48px;
|
|
721
|
-
}
|
|
722
|
-
.login-wrap-2 .login-form {
|
|
723
|
-
position: absolute;
|
|
724
|
-
right: 106px;
|
|
725
|
-
top: 50%;
|
|
726
|
-
transform: translateY(-50%);
|
|
727
|
-
}
|
|
728
|
-
.login-wrap-2 .sys-title {
|
|
729
|
-
display: none;
|
|
730
|
-
/* position: absolute;
|
|
731
|
-
left: 116px;
|
|
732
|
-
top: calc(50% - 310px);
|
|
733
|
-
line-height: 22px;
|
|
734
|
-
font-size: 16px;
|
|
735
|
-
color: #ffffff; */
|
|
736
|
-
}
|
|
737
|
-
.login-wrap-2 .sys-carousel {
|
|
738
|
-
width: 856px;
|
|
739
|
-
position: absolute;
|
|
740
|
-
left: 106px;
|
|
741
|
-
top: calc(50% + 0px);
|
|
742
|
-
transform: translateY(-50%);
|
|
743
|
-
flex-wrap: wrap;
|
|
744
|
-
justify-content: space-between;
|
|
745
|
-
align-content: space-between;
|
|
746
|
-
}
|
|
747
|
-
.login-wrap-2 .sys-item {
|
|
748
|
-
width: 190px;
|
|
749
|
-
height: 205px;
|
|
750
|
-
background: url('./item2.png');
|
|
751
|
-
background-size: 100% 100%;
|
|
752
|
-
}
|
|
753
|
-
.login-bg-light.login-wrap-2 .sys-item {
|
|
754
|
-
background-image: url('./item2-light.png');
|
|
755
|
-
box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
|
|
756
|
-
}
|
|
757
|
-
.login-wrap-2 .sys-item:hover,
|
|
758
|
-
.login-wrap-2 .sys-item.active {
|
|
759
|
-
background: url('./item2-active.png');
|
|
760
|
-
background-size: 100% 100%;
|
|
761
|
-
}
|
|
762
|
-
.login-bg-light.login-wrap-2 .sys-item:hover,
|
|
763
|
-
.login-bg-light.login-wrap-2 .sys-item.active {
|
|
764
|
-
background-image: url('./item2-light-active.png');
|
|
765
|
-
background-size: 100% 100%;
|
|
766
|
-
}
|
|
767
|
-
.login-wrap-2 .sys-item-title {
|
|
768
|
-
height: 58px;
|
|
769
|
-
font-size: 14px;
|
|
770
|
-
color: #ffffff;
|
|
771
|
-
line-height: 20px;
|
|
772
|
-
user-select: none;
|
|
773
|
-
}
|
|
774
|
-
.login-bg-light.login-wrap-2 .sys-item-title {
|
|
775
|
-
color: #333333;
|
|
776
|
-
}
|
|
777
|
-
.login-wrap-2 .sys-item-icon {
|
|
778
|
-
padding-top: 20px;
|
|
779
|
-
text-align: center;
|
|
780
|
-
}
|
|
781
|
-
.login-wrap-2 .sys-item-icon img {
|
|
782
|
-
width: 180px;
|
|
783
|
-
height: 120px;
|
|
784
|
-
}
|
|
516
|
+
<!-- 由于项目使用可能不支持scss,所有开发组件时使用scss,发布时转成css, 在线转换网站 https://www.sassmeister.com/ -->
|
|
517
|
+
<!--
|
|
518
|
+
<style lang="scss" scoped>
|
|
519
|
+
@import './indexN.scss';
|
|
520
|
+
</style>
|
|
521
|
+
-->
|
|
522
|
+
<style lang="css" scoped>
|
|
523
|
+
@import './indexN.css';
|
|
785
524
|
</style>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
:default-expanded-keys="expandedKeys"
|
|
33
33
|
:highlight-current="!multiple"
|
|
34
34
|
:show-checkbox="multiple"
|
|
35
|
-
:check-strictly="
|
|
35
|
+
:check-strictly="checkStrictly"
|
|
36
36
|
:expand-on-click-node="multiple"
|
|
37
37
|
:filter-node-method="filterNode"
|
|
38
38
|
:size="size"
|
|
@@ -94,6 +94,10 @@ export default {
|
|
|
94
94
|
type: Array,
|
|
95
95
|
default: () => []
|
|
96
96
|
},
|
|
97
|
+
checkStrictly: {
|
|
98
|
+
type: Boolean,
|
|
99
|
+
default: true
|
|
100
|
+
},
|
|
97
101
|
props: {
|
|
98
102
|
type: Object,
|
|
99
103
|
default: () => ({
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// 设置表头最小宽度,保证表头不换行
|
|
2
|
+
const ASCII_W = {
|
|
3
|
+
' ': 4.125,
|
|
4
|
+
0: 8.21875,
|
|
5
|
+
1: 8.21875,
|
|
6
|
+
2: 8.21875,
|
|
7
|
+
3: 8.21875,
|
|
8
|
+
4: 8.21875,
|
|
9
|
+
5: 8.21875,
|
|
10
|
+
6: 8.21875,
|
|
11
|
+
7: 8.21875,
|
|
12
|
+
8: 8.21875,
|
|
13
|
+
9: 8.21875,
|
|
14
|
+
'!': 4.375,
|
|
15
|
+
'"': 6.109375,
|
|
16
|
+
'#': 8.9375,
|
|
17
|
+
$: 8.21875,
|
|
18
|
+
'%': 12.46875,
|
|
19
|
+
'&': 12.1875,
|
|
20
|
+
"'": 3.59375,
|
|
21
|
+
'(': 4.6875,
|
|
22
|
+
')': 4.6875,
|
|
23
|
+
'*': 6.375,
|
|
24
|
+
'+': 10.390625,
|
|
25
|
+
',': 3.375,
|
|
26
|
+
'-': 6.0625,
|
|
27
|
+
'.': 3.375,
|
|
28
|
+
'/': 5.984375,
|
|
29
|
+
':': 3.375,
|
|
30
|
+
';': 3.375,
|
|
31
|
+
'<': 10.390625,
|
|
32
|
+
'=': 10.390625,
|
|
33
|
+
'>': 10.390625,
|
|
34
|
+
'?': 6.765625,
|
|
35
|
+
'@': 14.4375,
|
|
36
|
+
A: 9.859375,
|
|
37
|
+
B: 8.796875,
|
|
38
|
+
C: 9.375,
|
|
39
|
+
D: 10.671875,
|
|
40
|
+
E: 7.703125,
|
|
41
|
+
F: 7.4375,
|
|
42
|
+
G: 10.421875,
|
|
43
|
+
H: 10.828125,
|
|
44
|
+
I: 4.125,
|
|
45
|
+
J: 5.546875,
|
|
46
|
+
K: 8.890625,
|
|
47
|
+
L: 7.1875,
|
|
48
|
+
M: 13.6875,
|
|
49
|
+
N: 11.390625,
|
|
50
|
+
O: 11.421875,
|
|
51
|
+
P: 8.578125,
|
|
52
|
+
Q: 11.421875,
|
|
53
|
+
R: 9.140625,
|
|
54
|
+
S: 8.09375,
|
|
55
|
+
T: 8.03125,
|
|
56
|
+
U: 10.453125,
|
|
57
|
+
V: 9.46875,
|
|
58
|
+
W: 14.25,
|
|
59
|
+
X: 9.03125,
|
|
60
|
+
Y: 8.453125,
|
|
61
|
+
Z: 8.6875,
|
|
62
|
+
'[': 4.6875,
|
|
63
|
+
'\\': 5.828125,
|
|
64
|
+
']': 4.6875,
|
|
65
|
+
'^': 10.390625,
|
|
66
|
+
_: 6.28125,
|
|
67
|
+
'`': 4.140625,
|
|
68
|
+
a: 7.75,
|
|
69
|
+
b: 8.953125,
|
|
70
|
+
c: 7.03125,
|
|
71
|
+
d: 8.96875,
|
|
72
|
+
e: 7.953125,
|
|
73
|
+
f: 4.859375,
|
|
74
|
+
g: 8.96875,
|
|
75
|
+
h: 8.625,
|
|
76
|
+
i: 3.734375,
|
|
77
|
+
j: 3.75,
|
|
78
|
+
k: 7.625,
|
|
79
|
+
l: 3.734375,
|
|
80
|
+
m: 13.125,
|
|
81
|
+
n: 8.640625,
|
|
82
|
+
o: 8.90625,
|
|
83
|
+
p: 8.953125,
|
|
84
|
+
q: 8.96875,
|
|
85
|
+
r: 5.40625,
|
|
86
|
+
s: 6.546875,
|
|
87
|
+
t: 5.21875,
|
|
88
|
+
u: 8.640625,
|
|
89
|
+
v: 7.359375,
|
|
90
|
+
w: 11.0625,
|
|
91
|
+
x: 7.109375,
|
|
92
|
+
y: 7.421875,
|
|
93
|
+
z: 6.890625,
|
|
94
|
+
'{': 4.6875,
|
|
95
|
+
'|': 3.78125,
|
|
96
|
+
'}': 4.6875,
|
|
97
|
+
'~': 10.390625
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export default function getWidth(label) {
|
|
101
|
+
label = label || ''
|
|
102
|
+
let labels = label.match(/./gu) || []
|
|
103
|
+
let labelW = 0
|
|
104
|
+
labels.forEach((s) => (labelW += ASCII_W[s] || 14))
|
|
105
|
+
|
|
106
|
+
return labelW
|
|
107
|
+
}
|
|
@@ -38,104 +38,8 @@ setPropsDefault(ElementUI.Dialog, {
|
|
|
38
38
|
}
|
|
39
39
|
})
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
' ': 4.125,
|
|
44
|
-
0: 8.21875,
|
|
45
|
-
1: 8.21875,
|
|
46
|
-
2: 8.21875,
|
|
47
|
-
3: 8.21875,
|
|
48
|
-
4: 8.21875,
|
|
49
|
-
5: 8.21875,
|
|
50
|
-
6: 8.21875,
|
|
51
|
-
7: 8.21875,
|
|
52
|
-
8: 8.21875,
|
|
53
|
-
9: 8.21875,
|
|
54
|
-
'!': 4.375,
|
|
55
|
-
'"': 6.109375,
|
|
56
|
-
'#': 8.9375,
|
|
57
|
-
$: 8.21875,
|
|
58
|
-
'%': 12.46875,
|
|
59
|
-
'&': 12.1875,
|
|
60
|
-
"'": 3.59375,
|
|
61
|
-
'(': 4.6875,
|
|
62
|
-
')': 4.6875,
|
|
63
|
-
'*': 6.375,
|
|
64
|
-
'+': 10.390625,
|
|
65
|
-
',': 3.375,
|
|
66
|
-
'-': 6.0625,
|
|
67
|
-
'.': 3.375,
|
|
68
|
-
'/': 5.984375,
|
|
69
|
-
':': 3.375,
|
|
70
|
-
';': 3.375,
|
|
71
|
-
'<': 10.390625,
|
|
72
|
-
'=': 10.390625,
|
|
73
|
-
'>': 10.390625,
|
|
74
|
-
'?': 6.765625,
|
|
75
|
-
'@': 14.4375,
|
|
76
|
-
A: 9.859375,
|
|
77
|
-
B: 8.796875,
|
|
78
|
-
C: 9.375,
|
|
79
|
-
D: 10.671875,
|
|
80
|
-
E: 7.703125,
|
|
81
|
-
F: 7.4375,
|
|
82
|
-
G: 10.421875,
|
|
83
|
-
H: 10.828125,
|
|
84
|
-
I: 4.125,
|
|
85
|
-
J: 5.546875,
|
|
86
|
-
K: 8.890625,
|
|
87
|
-
L: 7.1875,
|
|
88
|
-
M: 13.6875,
|
|
89
|
-
N: 11.390625,
|
|
90
|
-
O: 11.421875,
|
|
91
|
-
P: 8.578125,
|
|
92
|
-
Q: 11.421875,
|
|
93
|
-
R: 9.140625,
|
|
94
|
-
S: 8.09375,
|
|
95
|
-
T: 8.03125,
|
|
96
|
-
U: 10.453125,
|
|
97
|
-
V: 9.46875,
|
|
98
|
-
W: 14.25,
|
|
99
|
-
X: 9.03125,
|
|
100
|
-
Y: 8.453125,
|
|
101
|
-
Z: 8.6875,
|
|
102
|
-
'[': 4.6875,
|
|
103
|
-
'\\': 5.828125,
|
|
104
|
-
']': 4.6875,
|
|
105
|
-
'^': 10.390625,
|
|
106
|
-
_: 6.28125,
|
|
107
|
-
'`': 4.140625,
|
|
108
|
-
a: 7.75,
|
|
109
|
-
b: 8.953125,
|
|
110
|
-
c: 7.03125,
|
|
111
|
-
d: 8.96875,
|
|
112
|
-
e: 7.953125,
|
|
113
|
-
f: 4.859375,
|
|
114
|
-
g: 8.96875,
|
|
115
|
-
h: 8.625,
|
|
116
|
-
i: 3.734375,
|
|
117
|
-
j: 3.75,
|
|
118
|
-
k: 7.625,
|
|
119
|
-
l: 3.734375,
|
|
120
|
-
m: 13.125,
|
|
121
|
-
n: 8.640625,
|
|
122
|
-
o: 8.90625,
|
|
123
|
-
p: 8.953125,
|
|
124
|
-
q: 8.96875,
|
|
125
|
-
r: 5.40625,
|
|
126
|
-
s: 6.546875,
|
|
127
|
-
t: 5.21875,
|
|
128
|
-
u: 8.640625,
|
|
129
|
-
v: 7.359375,
|
|
130
|
-
w: 11.0625,
|
|
131
|
-
x: 7.109375,
|
|
132
|
-
y: 7.421875,
|
|
133
|
-
z: 6.890625,
|
|
134
|
-
'{': 4.6875,
|
|
135
|
-
'|': 3.78125,
|
|
136
|
-
'}': 4.6875,
|
|
137
|
-
'~': 10.390625
|
|
138
|
-
}
|
|
41
|
+
import getWidth from './asciiWidth'
|
|
42
|
+
|
|
139
43
|
setMethodsDefault(ElementUI.TableColumn, {
|
|
140
44
|
setColumnWidth(column) {
|
|
141
45
|
if (this.realWidth) {
|
|
@@ -146,10 +50,7 @@ setMethodsDefault(ElementUI.TableColumn, {
|
|
|
146
50
|
}
|
|
147
51
|
if (!column.minWidth) {
|
|
148
52
|
if (!column.width) {
|
|
149
|
-
let
|
|
150
|
-
let labels = label.match(/./gu) || []
|
|
151
|
-
let labelW = 0
|
|
152
|
-
labels.forEach((s) => (labelW += ASCII_W[s] || 14))
|
|
53
|
+
let labelW = getWidth(column.label)
|
|
153
54
|
|
|
154
55
|
let sortable = column.sortable ? 24 : 0
|
|
155
56
|
let filters = column.filters ? 16 : 0
|