element-assits 0.0.15 → 0.0.16
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/README.md +4 -2
- package/lib/index.js +13 -5
- package/lib/style.scss +79 -79
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -57,8 +57,10 @@ Vue 原型上挂载了 `$asyncLoad` 方法
|
|
|
57
57
|
| innerPagination | 内部 - 分页 | Boolean \| Object | undefined
|
|
58
58
|
| innerOperation | 内部 - 操作栏(尾列)| Boolean \| Object | undefined
|
|
59
59
|
|
|
60
|
-
> `
|
|
61
|
-
|
|
60
|
+
> `innerForm` 可以绑定 `{ limit: 'auto', referenceItemWidth: 180, maxItemWidth: 240 }`
|
|
61
|
+
`limit` 限制默认显示的搜索条件数量,`referenceItemWidth` 单项参考宽度,`maxItemWidth` 单项最大宽度。
|
|
62
|
+
> `innerSelection` 可以绑定 `{ data: selectedRows }` 接收选中的行。
|
|
63
|
+
> `innerOperation` 可以绑定 `{ maxNumOfBtn: 3 }` 设置操作栏最大显示的按钮数,超出将被折叠。
|
|
62
64
|
|
|
63
65
|
## methods
|
|
64
66
|
|
package/lib/index.js
CHANGED
|
@@ -1559,6 +1559,14 @@ const en = hl.exports, pl = {
|
|
|
1559
1559
|
limit: {
|
|
1560
1560
|
type: [Number, String],
|
|
1561
1561
|
default: "auto"
|
|
1562
|
+
},
|
|
1563
|
+
referenceItemWidth: {
|
|
1564
|
+
type: Number,
|
|
1565
|
+
default: 180
|
|
1566
|
+
},
|
|
1567
|
+
maxItemWidth: {
|
|
1568
|
+
type: Number,
|
|
1569
|
+
default: 240
|
|
1562
1570
|
}
|
|
1563
1571
|
},
|
|
1564
1572
|
data() {
|
|
@@ -1603,11 +1611,11 @@ const en = hl.exports, pl = {
|
|
|
1603
1611
|
const t = this.$refs.eform && this.$refs.eform.$el;
|
|
1604
1612
|
if (!t)
|
|
1605
1613
|
return;
|
|
1606
|
-
const e =
|
|
1607
|
-
this.defaultCount = this.limit === "all" ? this.allColumn.length : typeof this.limit == "number" ? Math.min(this.limit, this.allColumn.length) :
|
|
1608
|
-
const
|
|
1609
|
-
this.allColumn.forEach((
|
|
1610
|
-
|
|
1614
|
+
const e = this.getWidth(t), n = this.getWidth(this.$refs.sa.$el) + 10, r = this.getWidth(this.$refs.tm.$el), i = Math.floor(e / this.referenceItemWidth), s = Math.floor((e - n) / this.referenceItemWidth), o = Math.floor((e - n - r) / this.referenceItemWidth);
|
|
1615
|
+
this.defaultCount = this.limit === "all" ? this.allColumn.length : typeof this.limit == "number" ? Math.min(this.limit, this.allColumn.length) : o >= 1 ? o : s >= 1 ? s : i;
|
|
1616
|
+
const a = this.showAll ? this.allColumn.length : this.defaultCount, l = a <= o ? (e - n - r) / a - 10 : a <= s ? (e - n) / a - 10 : a < i ? (e - (a - 1) * 10) / a : (e - (i - 1) * 10) / i, u = a > s && a < i ? a : i;
|
|
1617
|
+
this.allColumn.forEach((f, c) => {
|
|
1618
|
+
f.style.width = Math.min(l, this.maxItemWidth) + "px", (c + 1) % u === 0 ? f.style.marginRight = 0 : f.style.marginRight = "10px";
|
|
1611
1619
|
}), this.resetSearchCount();
|
|
1612
1620
|
},
|
|
1613
1621
|
getWidth(t) {
|
package/lib/style.scss
CHANGED
|
@@ -11,6 +11,35 @@ $--color-border-base: #DCDFE6 !default;
|
|
|
11
11
|
$--color-border-light: #E4E7ED !default;
|
|
12
12
|
$--color-border-lighter: #EBEEF5 !default;
|
|
13
13
|
$--color-border-extralight: #F2F6FC !default;
|
|
14
|
+
.ea-select {
|
|
15
|
+
display: inline-block;
|
|
16
|
+
position: relative;
|
|
17
|
+
.el-select {
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
.async-loading.el-icon-loading {
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: 10px;
|
|
23
|
+
right: 28px;
|
|
24
|
+
color: #999;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
.ea-select-popover {
|
|
28
|
+
.el-select-dropdown__item {
|
|
29
|
+
display: flex;
|
|
30
|
+
.select-item-value {
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
text-overflow: ellipsis;
|
|
33
|
+
}
|
|
34
|
+
.select-item-desc {
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
text-overflow: ellipsis;
|
|
37
|
+
color: #8492a6;
|
|
38
|
+
margin-left: 8px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
14
43
|
// table
|
|
15
44
|
.ea-table {
|
|
16
45
|
// 表格头部样式美化
|
|
@@ -128,53 +157,6 @@ $--color-border-extralight: #F2F6FC !default;
|
|
|
128
157
|
transform: scaleY(0);
|
|
129
158
|
}
|
|
130
159
|
|
|
131
|
-
.ea-select {
|
|
132
|
-
display: inline-block;
|
|
133
|
-
position: relative;
|
|
134
|
-
.el-select {
|
|
135
|
-
width: 100%;
|
|
136
|
-
}
|
|
137
|
-
.async-loading.el-icon-loading {
|
|
138
|
-
position: absolute;
|
|
139
|
-
top: 10px;
|
|
140
|
-
right: 28px;
|
|
141
|
-
color: #999;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
.ea-select-popover {
|
|
145
|
-
.el-select-dropdown__item {
|
|
146
|
-
display: flex;
|
|
147
|
-
.select-item-value {
|
|
148
|
-
overflow: hidden;
|
|
149
|
-
text-overflow: ellipsis;
|
|
150
|
-
}
|
|
151
|
-
.select-item-desc {
|
|
152
|
-
overflow: hidden;
|
|
153
|
-
text-overflow: ellipsis;
|
|
154
|
-
color: #8492a6;
|
|
155
|
-
margin-left: 8px;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.el-dialog.ea-modal {
|
|
161
|
-
&.is-closing {
|
|
162
|
-
margin: 0 !important;
|
|
163
|
-
}
|
|
164
|
-
&.is-fullscreen {
|
|
165
|
-
border-radius: 0;
|
|
166
|
-
margin: 0;
|
|
167
|
-
}
|
|
168
|
-
.el-dialog__header {
|
|
169
|
-
color: #555;
|
|
170
|
-
font-size: 18px;
|
|
171
|
-
.el-dialog__title {
|
|
172
|
-
color: inherit;
|
|
173
|
-
font-size: inherit;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
160
|
.ea-button-tooltip + .ea-button-tooltip {
|
|
179
161
|
margin-left: 10px;
|
|
180
162
|
}
|
|
@@ -240,14 +222,6 @@ td {
|
|
|
240
222
|
}
|
|
241
223
|
}
|
|
242
224
|
|
|
243
|
-
.ea-list {
|
|
244
|
-
.loading-text {
|
|
245
|
-
color: $--color-secondary-text;
|
|
246
|
-
text-align: center;
|
|
247
|
-
font-size: inherit;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
225
|
.ea-split-container {
|
|
252
226
|
display: flex;
|
|
253
227
|
&.is-down {
|
|
@@ -285,6 +259,32 @@ td {
|
|
|
285
259
|
}
|
|
286
260
|
}
|
|
287
261
|
|
|
262
|
+
.el-dialog.ea-modal {
|
|
263
|
+
&.is-closing {
|
|
264
|
+
margin: 0 !important;
|
|
265
|
+
}
|
|
266
|
+
&.is-fullscreen {
|
|
267
|
+
border-radius: 0;
|
|
268
|
+
margin: 0;
|
|
269
|
+
}
|
|
270
|
+
.el-dialog__header {
|
|
271
|
+
color: #555;
|
|
272
|
+
font-size: 18px;
|
|
273
|
+
.el-dialog__title {
|
|
274
|
+
color: inherit;
|
|
275
|
+
font-size: inherit;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.ea-list {
|
|
281
|
+
.loading-text {
|
|
282
|
+
color: $--color-secondary-text;
|
|
283
|
+
text-align: center;
|
|
284
|
+
font-size: inherit;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
288
|
.ea-number .el-input__inner {
|
|
289
289
|
text-align: left;
|
|
290
290
|
}
|
|
@@ -371,6 +371,30 @@ td {
|
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
|
|
374
|
+
.ea-form .form-group-title {
|
|
375
|
+
position: relative;
|
|
376
|
+
height: 32px;
|
|
377
|
+
margin-bottom: 22px;
|
|
378
|
+
> span {
|
|
379
|
+
position: absolute;
|
|
380
|
+
top: 0;
|
|
381
|
+
left: 20%;
|
|
382
|
+
padding: 5px 25px;
|
|
383
|
+
background-color: #fff;
|
|
384
|
+
z-index: 1;
|
|
385
|
+
color: $--color-secondary-text;
|
|
386
|
+
}
|
|
387
|
+
&::after {
|
|
388
|
+
content: '';
|
|
389
|
+
position: absolute;
|
|
390
|
+
top: 50%;
|
|
391
|
+
left: 0;
|
|
392
|
+
width: 100%;
|
|
393
|
+
height: 0;
|
|
394
|
+
border-bottom: 1px dashed $--color-border-base;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
374
398
|
.ea-table-modal {
|
|
375
399
|
overflow: visible;
|
|
376
400
|
right: unset;
|
|
@@ -425,30 +449,6 @@ td {
|
|
|
425
449
|
}
|
|
426
450
|
}
|
|
427
451
|
|
|
428
|
-
.ea-form .form-group-title {
|
|
429
|
-
position: relative;
|
|
430
|
-
height: 32px;
|
|
431
|
-
margin-bottom: 22px;
|
|
432
|
-
> span {
|
|
433
|
-
position: absolute;
|
|
434
|
-
top: 0;
|
|
435
|
-
left: 20%;
|
|
436
|
-
padding: 5px 25px;
|
|
437
|
-
background-color: #fff;
|
|
438
|
-
z-index: 1;
|
|
439
|
-
color: $--color-secondary-text;
|
|
440
|
-
}
|
|
441
|
-
&::after {
|
|
442
|
-
content: '';
|
|
443
|
-
position: absolute;
|
|
444
|
-
top: 50%;
|
|
445
|
-
left: 0;
|
|
446
|
-
width: 100%;
|
|
447
|
-
height: 0;
|
|
448
|
-
border-bottom: 1px dashed $--color-border-base;
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
|
|
452
452
|
.ea-select-container {
|
|
453
453
|
display: flex;
|
|
454
454
|
justify-content: flex-start;
|