element-assits 0.0.51 → 0.0.53

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 CHANGED
@@ -85,7 +85,7 @@ Vue 原型上挂载了 `$asyncLoad` 方法(与asyncLoad相同)
85
85
  #### events
86
86
  | 事件名 | 说明 | 参数 |
87
87
  |:---|:---|:---|
88
- |search-reset| 搜索重置事件|callback 重置表单并搜索(不监听时默认行为) <br> reset 仅重置表单<br> search 仅搜索 |
88
+ |search-reset| 搜索重置事件|params.callback 重置表单并搜索(不监听时默认行为) <br> params.reset 仅重置表单<br> params.search 仅搜索 |
89
89
  #### column-attributes
90
90
  | 属性名 | 类型 | 默认值 | 说明 |
91
91
  |:---|:---|:---|:---|
@@ -178,7 +178,7 @@ Vue 原型上挂载了 `$asyncLoad` 方法(与asyncLoad相同)
178
178
  ### 开关 EaSwitch
179
179
  额外支 size="mini" 尺寸
180
180
 
181
- ### 滚动容器 EaScroll
181
+ ### 滚动容器 EaScrollbar
182
182
  el-scrollbar 衍生,优化样式
183
183
  #### props
184
184
  | 属性名 | 说明 | 类型 | 默认值 |
package/lib/index.js CHANGED
@@ -2072,34 +2072,31 @@ class Xx {
2072
2072
  constructor(n, i) {
2073
2073
  this.o = new Array(n.length).fill(0), this.isTrigger = !1, this.callback = i;
2074
2074
  }
2075
- add({ $index: n }, i) {
2076
- this.isTrigger || (this.o[n] = i.map((o) => {
2077
- const u = Rt(o, "componentInstance.$el.innerText");
2078
- return Math.max(u && u.length, 2) * 14 + 14 + 9;
2079
- }).reduce((o, u) => o + u, 0) + 14 * 3 + 20, this.o.every(Boolean) && (this.isTrigger = !0, this.callback(Math.max(...this.o))));
2075
+ add({ $index: n }, i, o) {
2076
+ this.isTrigger || (this.o[n] = i.map((u) => {
2077
+ const d = Rt(u, "componentInstance.$el");
2078
+ return Math.max((d && d.offsetWidth || 0) + 10, 50);
2079
+ }).reduce((u, d) => u + d, 0) + 20 + (o ? 50 : 0), this.o.every(Boolean) && (this.isTrigger = !0, this.callback(Math.max(...this.o))));
2080
2080
  }
2081
2081
  }
2082
2082
  function $u(r = 3) {
2083
2083
  const n = this;
2084
2084
  let i, o;
2085
2085
  try {
2086
- const u = Cu.bind(this)({ row: {}, column: {} });
2087
- if (i = u.some((d) => d.tag), !(r > 0))
2088
- throw new Error();
2089
- if (r === u.length)
2086
+ if (i = Cu.bind(this)({ row: {}, column: {} }).some((d) => d.tag), !(r > 0))
2090
2087
  throw new Error();
2091
2088
  o = {
2092
2089
  props: { scope: { type: Object, default: void 0 } },
2093
2090
  data() {
2094
- const d = Cu.bind(n)(this.scope).filter((b) => b.tag), g = d.slice(0, r - 1), m = d.slice(r - 1);
2091
+ const d = Cu.bind(n)(this.scope).filter((S) => S.tag), g = d.length > r ? r - 1 : r, m = d.slice(0, g), b = d.slice(g);
2095
2092
  return {
2096
- children: g,
2097
- moreChildren: m
2093
+ children: m,
2094
+ moreChildren: b
2098
2095
  };
2099
2096
  },
2100
2097
  mounted() {
2101
2098
  var d;
2102
- (d = n.fitOpt) == null || d.add(this.scope, this.children);
2099
+ (d = n.fitOpt) == null || d.add(this.scope, this.children, this.moreChildren.length);
2103
2100
  },
2104
2101
  render(d) {
2105
2102
  return d("div", [
@@ -2363,7 +2360,7 @@ const Zx = {
2363
2360
  this.getList();
2364
2361
  },
2365
2362
  handleReset({ callback: r, reset: n, search: i }) {
2366
- this.$listeners["search-reset"] ? this.$emit("search-reset", r, n, i) : r && r();
2363
+ this.$listeners["search-reset"] ? this.$emit("search-reset", { callback: r, reset: n, search: i }) : r && r();
2367
2364
  },
2368
2365
  handleClear() {
2369
2366
  this.tableData = [], this.page.total = 0;
package/lib/style.scss CHANGED
@@ -11,6 +11,123 @@ $--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
+ // table
15
+ .ea-table {
16
+ // 表格头部样式美化
17
+ .el-table {
18
+ th {
19
+ background-color: $--color-border-extralight;
20
+ color: $--color-primary-text;
21
+ .cell {
22
+ min-height: 30px;
23
+ display: flex;
24
+ justify-content: flex-start;
25
+ align-items: center;
26
+ }
27
+ &.is-center .cell { justify-content: center }
28
+ &.is-right .cell { justify-content: flex-end }
29
+ }
30
+ td, th {
31
+ .cell {
32
+ line-height: 1.2;
33
+ }
34
+ }
35
+ &.el-table--small {
36
+ td, th {
37
+ height: 48px;
38
+ }
39
+ }
40
+ &.is-dense {
41
+ td, th {
42
+ height: 32px;
43
+ padding: 2px 0;
44
+ .el-button {
45
+ padding-top: 0;
46
+ padding-bottom: 0;
47
+ }
48
+ }
49
+ }
50
+ }
51
+ // 列的更多菜单项
52
+ .theader-th-cell {
53
+ .cell-icon-menu {
54
+ position: absolute;
55
+ top: 50%;
56
+ right: 4px;
57
+ transform: rotate(90deg) translateX(-50%);
58
+ color: $--color-placeholder-text;
59
+ cursor: pointer;
60
+ padding: 4px;
61
+ border-radius: 2px;
62
+ &:hover {
63
+ color: $--color-primary-text;
64
+ background-color: $--color-border-light;
65
+ }
66
+ }
67
+ }
68
+ // 表格底部
69
+ .ea-table__footer {
70
+ display: flex;
71
+ justify-content: space-between;
72
+ .ea-table__footer-right {
73
+ margin-left: auto;
74
+ padding-right: 0;
75
+ }
76
+ > * {
77
+ margin-top: 12px;
78
+ }
79
+ }
80
+
81
+ .column-transition-active {
82
+ opacity: 0.33;
83
+ }
84
+
85
+ .el-button > i {
86
+ min-width: 12px;
87
+ }
88
+
89
+ .more-btn > i{
90
+ transform: rotate(-90deg);
91
+ }
92
+ }
93
+
94
+ // table - popover
95
+ .el-popover.ea-popover-no-padding {
96
+ padding: 8px 0;
97
+ min-width: 100px;
98
+ &.dense {
99
+ margin-top: 0px;
100
+ margin-bottom: 0px;
101
+ min-width: 70px;
102
+ }
103
+ }
104
+
105
+ .more-btn-panel {
106
+ &__item {
107
+ &:hover {
108
+ background-color: $--color-border-lighter;
109
+ }
110
+ .el-button {
111
+ padding: 8px 12px;
112
+ width: 100%;
113
+ text-align: left;
114
+ }
115
+ }
116
+ }
117
+
118
+ .ea-zoom-in-top-enter-active,
119
+ .ea-zoom-in-top-leave-active {
120
+ opacity: 1;
121
+ transform: scaleY(1);
122
+ transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), opacity 300ms cubic-bezier(0.23, 1, 0.32, 1);
123
+ transform-origin: center top;
124
+ }
125
+ .ea-zoom-in-top-enter,
126
+ .ea-zoom-in-top-leave-active {
127
+ opacity: 0;
128
+ transform: scaleY(0);
129
+ }
130
+
14
131
  .ea-select {
15
132
  display: inline-block;
16
133
  position: relative;
@@ -41,6 +158,63 @@ $--color-border-extralight: #F2F6FC !default;
41
158
  }
42
159
  }
43
160
 
161
+ .ea-data-table {
162
+ .edt-row {
163
+ display: flex;
164
+ .edt-cell {
165
+ padding: 0 8px;
166
+ flex: 0 0 auto;
167
+ box-sizing: border-box;
168
+ overflow: hidden;
169
+ text-overflow: ellipsis;
170
+ white-space: nowrap;
171
+ word-break: break-all;
172
+ }
173
+ &.edt-header {
174
+ background-color: $--color-border-extralight;
175
+ color: $--color-primary-text;
176
+ }
177
+ }
178
+ &--border {
179
+ border: 1px solid $--color-border-light;
180
+ .edt-row {
181
+ .edt-cell {
182
+ border-bottom: 1px solid $--color-border-light;
183
+ border-left: 1px solid $--color-border-light;
184
+ &:first-child {
185
+ border-left: 0;
186
+ }
187
+ }
188
+ &:last-child .edt-cell{
189
+ border-bottom: 0;
190
+ }
191
+ }
192
+ }
193
+ .loading-text {
194
+ color: $--color-secondary-text;
195
+ text-align: center;
196
+ font-size: inherit;
197
+ }
198
+ }
199
+
200
+ .el-dialog.ea-modal {
201
+ &.is-closing {
202
+ margin: 0 0 50px !important;
203
+ }
204
+ &.is-fullscreen {
205
+ border-radius: 0;
206
+ margin: 0;
207
+ }
208
+ .el-dialog__header {
209
+ color: #555;
210
+ font-size: 18px;
211
+ .el-dialog__title {
212
+ color: inherit;
213
+ font-size: inherit;
214
+ }
215
+ }
216
+ }
217
+
44
218
  .ea-button-tooltip + .ea-button-tooltip {
45
219
  margin-left: 10px;
46
220
  }
@@ -106,63 +280,6 @@ td {
106
280
  }
107
281
  }
108
282
 
109
- .ea-data-table {
110
- .edt-row {
111
- display: flex;
112
- .edt-cell {
113
- padding: 0 8px;
114
- flex: 0 0 auto;
115
- box-sizing: border-box;
116
- overflow: hidden;
117
- text-overflow: ellipsis;
118
- white-space: nowrap;
119
- word-break: break-all;
120
- }
121
- &.edt-header {
122
- background-color: $--color-border-extralight;
123
- color: $--color-primary-text;
124
- }
125
- }
126
- &--border {
127
- border: 1px solid $--color-border-light;
128
- .edt-row {
129
- .edt-cell {
130
- border-bottom: 1px solid $--color-border-light;
131
- border-left: 1px solid $--color-border-light;
132
- &:first-child {
133
- border-left: 0;
134
- }
135
- }
136
- &:last-child .edt-cell{
137
- border-bottom: 0;
138
- }
139
- }
140
- }
141
- .loading-text {
142
- color: $--color-secondary-text;
143
- text-align: center;
144
- font-size: inherit;
145
- }
146
- }
147
-
148
- .el-dialog.ea-modal {
149
- &.is-closing {
150
- margin: 0 0 50px !important;
151
- }
152
- &.is-fullscreen {
153
- border-radius: 0;
154
- margin: 0;
155
- }
156
- .el-dialog__header {
157
- color: #555;
158
- font-size: 18px;
159
- .el-dialog__title {
160
- color: inherit;
161
- font-size: inherit;
162
- }
163
- }
164
- }
165
-
166
283
  .ea-tree {
167
284
  .ea-tree-real {
168
285
  .el-tree-node > .el-tree-node__content{
@@ -175,21 +292,69 @@ td {
175
292
  }
176
293
  }
177
294
 
178
- .ea-split-container {
179
- display: flex;
180
- &.is-down {
181
- user-select: none;
182
- }
183
- .sc-left {
184
- flex-grow: 1;
185
- flex-shrink: 1;
295
+ .ea-number .el-input__inner {
296
+ text-align: left;
297
+ }
298
+
299
+ .ea-desc {
300
+ font-size: 14px;
301
+ &__title {
302
+ font-size: 16px;
303
+ margin-bottom: 12px;
186
304
  }
187
- .sc-right {
188
- flex-grow: 1;
189
- flex-shrink: 1;
305
+ &__list {
306
+ display: flex;
307
+ flex-wrap: wrap;
190
308
  }
191
- .sc-center {
192
- flex-grow: 0;
309
+ }
310
+ .ea-desc .item {
311
+ line-height: 24px;
312
+ margin-bottom: 10px;
313
+ flex: 0 0 auto;
314
+ .item-label {
315
+ float: left;
316
+ text-align: right;
317
+ padding-right: 8px;
318
+ color: #909399;
319
+ }
320
+ .item-value {
321
+ word-break: break-all;
322
+ overflow: hidden;
323
+ .value-no-wrap {
324
+ height: 48px;
325
+ overflow: hidden;
326
+ position: relative;
327
+ .click-see-more {
328
+ position: absolute;
329
+ right: 0;
330
+ bottom: 0;
331
+ height: 24px;
332
+ padding-left: 30px;
333
+ padding-right: 4px;
334
+ background-image: linear-gradient(to right, transparent 0%, #fff 20%, #fff 100%);
335
+ cursor: pointer;
336
+ color: $--color-primary;
337
+ user-select: none;
338
+ }
339
+ }
340
+ }
341
+ }
342
+
343
+ .ea-split-container {
344
+ display: flex;
345
+ &.is-down {
346
+ user-select: none;
347
+ }
348
+ .sc-left {
349
+ flex-grow: 1;
350
+ flex-shrink: 1;
351
+ }
352
+ .sc-right {
353
+ flex-grow: 1;
354
+ flex-shrink: 1;
355
+ }
356
+ .sc-center {
357
+ flex-grow: 0;
193
358
  flex-shrink: 0;
194
359
  position: relative;
195
360
  }
@@ -234,54 +399,6 @@ td {
234
399
  }
235
400
  }
236
401
 
237
- .ea-number .el-input__inner {
238
- text-align: left;
239
- }
240
-
241
- .ea-desc {
242
- font-size: 14px;
243
- &__title {
244
- font-size: 16px;
245
- margin-bottom: 12px;
246
- }
247
- &__list {
248
- display: flex;
249
- flex-wrap: wrap;
250
- }
251
- }
252
- .ea-desc .item {
253
- line-height: 24px;
254
- margin-bottom: 10px;
255
- flex: 0 0 auto;
256
- .item-label {
257
- float: left;
258
- text-align: right;
259
- padding-right: 8px;
260
- color: #909399;
261
- }
262
- .item-value {
263
- word-break: break-all;
264
- overflow: hidden;
265
- .value-no-wrap {
266
- height: 48px;
267
- overflow: hidden;
268
- position: relative;
269
- .click-see-more {
270
- position: absolute;
271
- right: 0;
272
- bottom: 0;
273
- height: 24px;
274
- padding-left: 30px;
275
- padding-right: 4px;
276
- background-image: linear-gradient(to right, transparent 0%, #fff 20%, #fff 100%);
277
- cursor: pointer;
278
- color: $--color-primary;
279
- user-select: none;
280
- }
281
- }
282
- }
283
- }
284
-
285
402
  .file-upload-dialog {
286
403
  // 拖拽区域铺满
287
404
  .el-upload,
@@ -309,29 +426,22 @@ td {
309
426
  }
310
427
  }
311
428
 
312
- .vjs-table {
313
- position: relative;
314
- overflow: hidden;
315
- }
316
- .vjs-header {
317
- position: absolute;
318
- top: 0;
319
- border: 1px solid $--color-border-light;
320
- border-bottom: 0;
321
- }
322
- .vjs-body {
323
- border: 1px solid $--color-border-light;
429
+ .ea-data-tree-body {
430
+ &.ea-data-tree-body__border {
431
+ border: 1px solid $--color-border-light;
432
+ }
324
433
  }
325
434
 
326
- .vjs-row {
435
+ .ea-data-tree-row {
327
436
  height: 32px;
328
437
  line-height: 32px;
329
438
  display: flex;
330
439
  justify-content: flex-start;
331
440
  position: relative;
441
+ padding-left: 20px;
332
442
  &.odd { background-color: #F8F8F8; }
333
- &:not(.vjs-header):hover { background-color: #EBEEF5; }
334
- .vjs-cell {
443
+ &:hover { background-color: #EBEEF5; }
444
+ .ea-data-tree-cell {
335
445
  flex: 0 0 auto;
336
446
  height: 100%;
337
447
  font-size: 14px;
@@ -342,21 +452,12 @@ td {
342
452
  text-overflow: ellipsis;
343
453
  white-space: nowrap;
344
454
  word-break: break-all;
345
- & > .el-tag {
346
- vertical-align: 1px;
347
- }
348
- &.vjs-cell-flex {
349
- flex-grow: 1;
350
- }
351
- &.error {
352
- border: 1px solid red;
353
- }
354
- & > .vjs-checkbox {
455
+ & > .ea-data-tree-checkbox {
355
456
  position: absolute;
356
457
  top: 0;
357
458
  }
358
459
  }
359
- .vjs-icon {
460
+ .ea-data-tree-icon {
360
461
  cursor: pointer;
361
462
  position: absolute;
362
463
  height: 100%;
@@ -368,162 +469,43 @@ td {
368
469
  color: #333;
369
470
  }
370
471
  }
371
- .vjs-temp {
372
- color: #909399;
373
- }
374
472
  }
375
473
 
376
- .vjs-checkbox .el-checkbox__input.is-indeterminate .el-checkbox__inner {
474
+ .ea-data-tree-checkbox .el-checkbox__input.is-indeterminate .el-checkbox__inner {
377
475
  background-color: $--color-secondary-text;
378
476
  border-color: $--color-secondary-text;
379
477
  }
380
478
 
381
- .cell-text {
382
- height: 100%;
383
- overflow: hidden;
384
- text-overflow: ellipsis;
385
- white-space: nowrap;
386
- word-break: break-all;
387
- .cell-placeholder {
388
- color: #C0C4CC;
389
- }
390
- }
391
-
392
- .cell-input {
393
- display: block;
394
- height: 30px;
395
- line-height: 30px;
396
- font-size: inherit;
397
- color: inherit;
398
- font-family: inherit;
399
- margin-left: -4.7px;
400
- .el-input__inner {
401
- border-radius: 0;
402
- font-size: inherit;
403
- color: inherit;
404
- font-family: inherit;
405
- padding-left: 4px;
406
- }
407
- }
408
-
409
- .cell-select {
410
- cursor: pointer;
411
- &:not(.is-disabled):hover {
412
- border-width: 0;
413
- border-bottom-width: 1.5px;
414
- border-style: solid;
415
- }
416
- &.is-disabled {
417
- cursor: default;
418
- }
419
- }
420
-
421
- .cell-required {
422
- width: 100%;
423
- height: 100%;
479
+ .ea-data-tree-empty {
424
480
  display: flex;
481
+ justify-content: center;
425
482
  align-items: center;
426
- .box {
427
- width: 20px;
428
- height: 20px;
429
- box-sizing: border-box;
430
- border-radius: 4px;
431
- cursor: pointer;
432
- user-select: none;
433
- display: flex;
434
- justify-content: center;
435
- align-items: center;
436
- padding-top: 4px;
437
- color: #DDD;
438
- background-color: rgba(0, 0, 0, 0.02);
439
- &:not(.is-disabled):hover {
440
- color: #999;
441
- background-color: rgba(0, 0, 0, 0.05);
442
- }
443
- &.is-disabled {
444
- cursor: default;
445
- color: transparent;
446
- background-color: transparent;
447
- }
448
- &.is-required, &.is-required:hover {
449
- color: red;
450
- background-color: rgba(0, 0, 0, 0.08);
451
- }
452
- }
453
- }
454
-
455
- .cell-action {
456
- width: 80px;
457
- i {
458
- cursor: pointer;
459
- font-size: 16px;
460
- padding: 4px;
461
- border-radius: 4px;
462
- &:hover {
463
- background-color: rgba(0,0,0,0.1);
464
- }
465
- }
466
- }
467
- .action-popover {
468
- margin: 0 !important;
469
- }
470
-
471
- .ea-blue {
472
- color: #409EFF;
473
- }
474
- .ea-purple {
475
- color: #EE46BC !important;
476
- }
477
- .ea-success {
478
- color: $--color-success;
479
- }
480
- .ea-danger {
481
- color: $--color-danger;
482
- }
483
- .ea-info {
484
- color: $--color-info;
485
- }
486
- .ea-placeholder {
487
- color: $--color-placeholder-text !important;
488
- }
489
-
490
- .ea-popover-no-margin {
491
- margin: 0 !important;
483
+ color: $--color-secondary-text;
492
484
  }
493
485
 
494
- @font-face {
495
- font-family: 'eafont';
496
- src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAQYAAsAAAAACMAAAAPLAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDHAqFDIRVATYCJAMQCwoABCAFhE8HQBu9BxEVnLHIfibwpknuXkitybkhDKpb3+RDeb1vMhOsa34zn2ST3rpbnaQ7jZOwi3OelIhQI3mLHn0haTkDFEZf6SdAAFkA/M/ltDHxABvfAoC7xti0t5dlvehe2rbAxhiUbfFAIsy8BXYOdTBB14AA0MJNMC4yOjETxsayzmZMwiDhCeDmksa6mjJIdwNYCkIgqYW8KxnIUvAAt4C7BGCJ+XnyER5JAAeeQtontTqqEsfe4I0bVawK6CPoOBDgaA4AD4ACcOqZidSmO8pB7bATCm1ckMEHOCiBA2ptM75xs1pZNCqFJDsBrvSfRwRICj1SvSIUeAOVBxzwxiiIU7qhaAUUTF8hARgJuAwQV0iaKfUsFCCNNxhGG7SjtYaxY4lGRgbuZDNvZTJvZzHv5riIWmmOGkzUuxFVl27lVB+9q7OkJEK51XPw7m2JcOs9dwL05isn1JNXdWXmfZuUzfstB7eqWw5k6s2HlMM6wyq1Ur1793aQwXL5uHLsklZ/6NadO2U+61H1yA23UsnOr6+wtChXH3JzL0iKIqt5uRoraFeuoKtaqxwuXs18qMz+If6j7B2qsiLTw2vHNIy5EZqYFJ8wvXp6reO9qIzItHL7SvuHY/ODcgM9ijxLm3N3HC3PcEt1dU11yygPdexWfv+Wuh0fmn/+fNVmI0fPkm3aUP9WzjNlTw6OGJcrozrKqO8IucXmW0liyTebp7aTH2z22fzAhy47ZeszcZbHrIk+a4L33vHyySlyqtG1ZtO2tHrQABahETOU7ZxfsjesIuV4ZLq7Z3rkXFJQo3Ome47HpVDPqpj+GrkyMLBSrvlKKHWuDKyRv1Ja3NHQyZE+ckXTJKc/WgEA1hN0Fw03WR/pMjpOe4ySKuya+Q6+fCl7UmKSv0k6BgB4ydgfclmPMZQTHnNhbsEVoizMWZJ9PQBjcRJVdNU5MiHdgxwArWwGLok4MMqTOlSjORsgEDDaBQ4iJgKFgBlERrUBHjo4yQRZ5YughaOg9TqMVgsKwjQAbAwAeAi9jcAx2gyU3kEio54F3jg/EOi9B63s/246NiVcehQjapAbOMWZFPuIQs98opmi6D1CHPXFfnCcoS6qQOyBGfuiC4bZNONIQD0nuBc4K0aGtmePaizsOLbnsqS4mxSK0+7SoxhRA7kBpziTzo/XCHfcE80URbmiOYjfcD847g5qhSqV+FBkKtjy/GE2jXEkQJ98TuDeiizKYQZt/DCPaizYEsH2rKRSlFdRjEmVNmkNgJZ0EIsjlDDCQ9oNQkbUp1VJPSXucbcDAA==') format('woff2');
486
+ .vjs-table {
487
+ position: relative;
488
+ overflow: hidden;
497
489
  }
498
- .eafont {
499
- font-family: eafont;
500
- font-style: normal;
501
- font-size: 16px;
502
- color: #909399;
503
- -webkit-font-smoothing: antialiased;
504
- -moz-osx-font-smoothing: grayscale;
490
+ .vjs-header {
491
+ position: absolute;
492
+ top: 0;
493
+ border: 1px solid $--color-border-light;
494
+ border-bottom: 0;
505
495
  }
506
- .ea-icon-disabled:before { content: "\e630" }
507
- .ea-icon-conf:before { content: "\e600" }
508
- .ea-icon-more:before { content: "\e60e" }
509
- .eafont.ea-icon-conf.has { color: #000 }
510
-
511
- .ea-data-tree-body {
512
- &.ea-data-tree-body__border {
513
- border: 1px solid $--color-border-light;
514
- }
496
+ .vjs-body {
497
+ border: 1px solid $--color-border-light;
515
498
  }
516
499
 
517
- .ea-data-tree-row {
500
+ .vjs-row {
518
501
  height: 32px;
519
502
  line-height: 32px;
520
503
  display: flex;
521
504
  justify-content: flex-start;
522
505
  position: relative;
523
- padding-left: 20px;
524
506
  &.odd { background-color: #F8F8F8; }
525
- &:hover { background-color: #EBEEF5; }
526
- .ea-data-tree-cell {
507
+ &:not(.vjs-header):hover { background-color: #EBEEF5; }
508
+ .vjs-cell {
527
509
  flex: 0 0 auto;
528
510
  height: 100%;
529
511
  font-size: 14px;
@@ -534,12 +516,21 @@ td {
534
516
  text-overflow: ellipsis;
535
517
  white-space: nowrap;
536
518
  word-break: break-all;
537
- & > .ea-data-tree-checkbox {
519
+ & > .el-tag {
520
+ vertical-align: 1px;
521
+ }
522
+ &.vjs-cell-flex {
523
+ flex-grow: 1;
524
+ }
525
+ &.error {
526
+ border: 1px solid red;
527
+ }
528
+ & > .vjs-checkbox {
538
529
  position: absolute;
539
530
  top: 0;
540
531
  }
541
532
  }
542
- .ea-data-tree-icon {
533
+ .vjs-icon {
543
534
  cursor: pointer;
544
535
  position: absolute;
545
536
  height: 100%;
@@ -551,172 +542,145 @@ td {
551
542
  color: #333;
552
543
  }
553
544
  }
545
+ .vjs-temp {
546
+ color: #909399;
547
+ }
554
548
  }
555
549
 
556
- .ea-data-tree-checkbox .el-checkbox__input.is-indeterminate .el-checkbox__inner {
550
+ .vjs-checkbox .el-checkbox__input.is-indeterminate .el-checkbox__inner {
557
551
  background-color: $--color-secondary-text;
558
552
  border-color: $--color-secondary-text;
559
553
  }
560
554
 
561
- .ea-data-tree-empty {
562
- display: flex;
563
- justify-content: center;
564
- align-items: center;
565
- color: $--color-secondary-text;
566
- }
567
-
568
- // table
569
- .ea-table {
570
- // 表格头部样式美化
571
- .el-table {
572
- th {
573
- background-color: $--color-border-extralight;
574
- color: $--color-primary-text;
575
- .cell {
576
- min-height: 30px;
577
- display: flex;
578
- justify-content: flex-start;
579
- align-items: center;
580
- }
581
- &.is-center .cell { justify-content: center }
582
- &.is-right .cell { justify-content: flex-end }
583
- }
584
- td, th {
585
- .cell {
586
- line-height: 1.2;
587
- }
588
- }
589
- &.el-table--small {
590
- td, th {
591
- height: 48px;
592
- }
593
- }
594
- &.is-dense {
595
- td, th {
596
- height: 32px;
597
- padding: 2px 0;
598
- .el-button {
599
- padding-top: 0;
600
- padding-bottom: 0;
601
- }
602
- }
603
- }
604
- }
605
- // 列的更多菜单项
606
- .theader-th-cell {
607
- .cell-icon-menu {
608
- position: absolute;
609
- top: 50%;
610
- right: 4px;
611
- transform: rotate(90deg) translateX(-50%);
612
- color: $--color-placeholder-text;
613
- cursor: pointer;
614
- padding: 4px;
615
- border-radius: 2px;
616
- &:hover {
617
- color: $--color-primary-text;
618
- background-color: $--color-border-light;
619
- }
620
- }
621
- }
622
- // 表格底部
623
- .ea-table__footer {
624
- display: flex;
625
- justify-content: space-between;
626
- .ea-table__footer-right {
627
- margin-left: auto;
628
- padding-right: 0;
629
- }
630
- > * {
631
- margin-top: 12px;
632
- }
633
- }
634
-
635
- .column-transition-active {
636
- opacity: 0.33;
555
+ .cell-text {
556
+ height: 100%;
557
+ overflow: hidden;
558
+ text-overflow: ellipsis;
559
+ white-space: nowrap;
560
+ word-break: break-all;
561
+ .cell-placeholder {
562
+ color: #C0C4CC;
637
563
  }
564
+ }
638
565
 
639
- .el-button > i {
640
- min-width: 12px;
566
+ .cell-input {
567
+ display: block;
568
+ height: 30px;
569
+ line-height: 30px;
570
+ font-size: inherit;
571
+ color: inherit;
572
+ font-family: inherit;
573
+ margin-left: -4.7px;
574
+ .el-input__inner {
575
+ border-radius: 0;
576
+ font-size: inherit;
577
+ color: inherit;
578
+ font-family: inherit;
579
+ padding-left: 4px;
641
580
  }
581
+ }
642
582
 
643
- .more-btn > i{
644
- transform: rotate(-90deg);
583
+ .cell-select {
584
+ cursor: pointer;
585
+ &:not(.is-disabled):hover {
586
+ border-width: 0;
587
+ border-bottom-width: 1.5px;
588
+ border-style: solid;
589
+ }
590
+ &.is-disabled {
591
+ cursor: default;
645
592
  }
646
593
  }
647
594
 
648
- // table - popover
649
- .el-popover.ea-popover-no-padding {
650
- padding: 8px 0;
651
- min-width: 100px;
652
- &.dense {
653
- margin-top: 0px;
654
- margin-bottom: 0px;
655
- min-width: 70px;
595
+ .cell-required {
596
+ width: 100%;
597
+ height: 100%;
598
+ display: flex;
599
+ align-items: center;
600
+ .box {
601
+ width: 20px;
602
+ height: 20px;
603
+ box-sizing: border-box;
604
+ border-radius: 4px;
605
+ cursor: pointer;
606
+ user-select: none;
607
+ display: flex;
608
+ justify-content: center;
609
+ align-items: center;
610
+ padding-top: 4px;
611
+ color: #DDD;
612
+ background-color: rgba(0, 0, 0, 0.02);
613
+ &:not(.is-disabled):hover {
614
+ color: #999;
615
+ background-color: rgba(0, 0, 0, 0.05);
616
+ }
617
+ &.is-disabled {
618
+ cursor: default;
619
+ color: transparent;
620
+ background-color: transparent;
621
+ }
622
+ &.is-required, &.is-required:hover {
623
+ color: red;
624
+ background-color: rgba(0, 0, 0, 0.08);
625
+ }
656
626
  }
657
627
  }
658
628
 
659
- .more-btn-panel {
660
- &__item {
629
+ .cell-action {
630
+ width: 80px;
631
+ i {
632
+ cursor: pointer;
633
+ font-size: 16px;
634
+ padding: 4px;
635
+ border-radius: 4px;
661
636
  &:hover {
662
- background-color: $--color-border-lighter;
663
- }
664
- .el-button {
665
- padding: 8px 12px;
666
- width: 100%;
667
- text-align: left;
637
+ background-color: rgba(0,0,0,0.1);
668
638
  }
669
639
  }
670
640
  }
641
+ .action-popover {
642
+ margin: 0 !important;
643
+ }
671
644
 
672
- .ea-zoom-in-top-enter-active,
673
- .ea-zoom-in-top-leave-active {
674
- opacity: 1;
675
- transform: scaleY(1);
676
- transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), opacity 300ms cubic-bezier(0.23, 1, 0.32, 1);
677
- transform-origin: center top;
645
+ .ea-blue {
646
+ color: #409EFF;
678
647
  }
679
- .ea-zoom-in-top-enter,
680
- .ea-zoom-in-top-leave-active {
681
- opacity: 0;
682
- transform: scaleY(0);
648
+ .ea-purple {
649
+ color: #EE46BC !important;
683
650
  }
684
-
685
- .ea-form .form-group-title {
686
- position: relative;
687
- height: 32px;
688
- margin-bottom: 22px;
689
- > span {
690
- position: absolute;
691
- top: 0;
692
- left: 20%;
693
- padding: 5px 25px;
694
- background-color: #fff;
695
- z-index: 1;
696
- color: $--color-secondary-text;
697
- }
698
- &::after {
699
- content: '';
700
- position: absolute;
701
- top: 50%;
702
- left: 0;
703
- width: 100%;
704
- height: 0;
705
- border-bottom: 1px dashed $--color-border-base;
706
- }
651
+ .ea-success {
652
+ color: $--color-success;
653
+ }
654
+ .ea-danger {
655
+ color: $--color-danger;
656
+ }
657
+ .ea-info {
658
+ color: $--color-info;
659
+ }
660
+ .ea-placeholder {
661
+ color: $--color-placeholder-text !important;
707
662
  }
708
663
 
709
- .conf-header {
710
- border-bottom: 1px solid #DDD;
711
- padding-bottom: 10px;
712
- margin-bottom: 10px;
664
+ .ea-popover-no-margin {
665
+ margin: 0 !important;
713
666
  }
714
- .conf-body {
715
- width: 300px;
667
+
668
+ @font-face {
669
+ font-family: 'eafont';
670
+ src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAQYAAsAAAAACMAAAAPLAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDHAqFDIRVATYCJAMQCwoABCAFhE8HQBu9BxEVnLHIfibwpknuXkitybkhDKpb3+RDeb1vMhOsa34zn2ST3rpbnaQ7jZOwi3OelIhQI3mLHn0haTkDFEZf6SdAAFkA/M/ltDHxABvfAoC7xti0t5dlvehe2rbAxhiUbfFAIsy8BXYOdTBB14AA0MJNMC4yOjETxsayzmZMwiDhCeDmksa6mjJIdwNYCkIgqYW8KxnIUvAAt4C7BGCJ+XnyER5JAAeeQtontTqqEsfe4I0bVawK6CPoOBDgaA4AD4ACcOqZidSmO8pB7bATCm1ckMEHOCiBA2ptM75xs1pZNCqFJDsBrvSfRwRICj1SvSIUeAOVBxzwxiiIU7qhaAUUTF8hARgJuAwQV0iaKfUsFCCNNxhGG7SjtYaxY4lGRgbuZDNvZTJvZzHv5riIWmmOGkzUuxFVl27lVB+9q7OkJEK51XPw7m2JcOs9dwL05isn1JNXdWXmfZuUzfstB7eqWw5k6s2HlMM6wyq1Ur1793aQwXL5uHLsklZ/6NadO2U+61H1yA23UsnOr6+wtChXH3JzL0iKIqt5uRoraFeuoKtaqxwuXs18qMz+If6j7B2qsiLTw2vHNIy5EZqYFJ8wvXp6reO9qIzItHL7SvuHY/ODcgM9ijxLm3N3HC3PcEt1dU11yygPdexWfv+Wuh0fmn/+fNVmI0fPkm3aUP9WzjNlTw6OGJcrozrKqO8IucXmW0liyTebp7aTH2z22fzAhy47ZeszcZbHrIk+a4L33vHyySlyqtG1ZtO2tHrQABahETOU7ZxfsjesIuV4ZLq7Z3rkXFJQo3Ome47HpVDPqpj+GrkyMLBSrvlKKHWuDKyRv1Ja3NHQyZE+ckXTJKc/WgEA1hN0Fw03WR/pMjpOe4ySKuya+Q6+fCl7UmKSv0k6BgB4ydgfclmPMZQTHnNhbsEVoizMWZJ9PQBjcRJVdNU5MiHdgxwArWwGLok4MMqTOlSjORsgEDDaBQ4iJgKFgBlERrUBHjo4yQRZ5YughaOg9TqMVgsKwjQAbAwAeAi9jcAx2gyU3kEio54F3jg/EOi9B63s/246NiVcehQjapAbOMWZFPuIQs98opmi6D1CHPXFfnCcoS6qQOyBGfuiC4bZNONIQD0nuBc4K0aGtmePaizsOLbnsqS4mxSK0+7SoxhRA7kBpziTzo/XCHfcE80URbmiOYjfcD847g5qhSqV+FBkKtjy/GE2jXEkQJ98TuDeiizKYQZt/DCPaizYEsH2rKRSlFdRjEmVNmkNgJZ0EIsjlDDCQ9oNQkbUp1VJPSXucbcDAA==') format('woff2');
716
671
  }
717
- .dense-much .el-form-item {
718
- margin-bottom: 8px !important;
672
+ .eafont {
673
+ font-family: eafont;
674
+ font-style: normal;
675
+ font-size: 16px;
676
+ color: #909399;
677
+ -webkit-font-smoothing: antialiased;
678
+ -moz-osx-font-smoothing: grayscale;
719
679
  }
680
+ .ea-icon-disabled:before { content: "\e630" }
681
+ .ea-icon-conf:before { content: "\e600" }
682
+ .ea-icon-more:before { content: "\e60e" }
683
+ .eafont.ea-icon-conf.has { color: #000 }
720
684
 
721
685
  .ea-table-modal {
722
686
  overflow: visible;
@@ -772,36 +736,40 @@ td {
772
736
  }
773
737
  }
774
738
 
775
- .ea-switch-mini {
776
- .el-switch__core {
777
- width: 30px !important;
778
- height: 16px;
779
- &::after {
780
- width: 12px;
781
- height: 12px;
782
- left: 2px;
783
- }
739
+ .ea-form .form-group-title {
740
+ position: relative;
741
+ height: 32px;
742
+ margin-bottom: 22px;
743
+ > span {
744
+ position: absolute;
745
+ top: 0;
746
+ left: 20%;
747
+ padding: 5px 25px;
748
+ background-color: #fff;
749
+ z-index: 1;
750
+ color: $--color-secondary-text;
784
751
  }
785
- &.is-checked .el-switch__core::after {
786
- margin-left: -13px;
752
+ &::after {
753
+ content: '';
754
+ position: absolute;
755
+ top: 50%;
756
+ left: 0;
757
+ width: 100%;
758
+ height: 0;
759
+ border-bottom: 1px dashed $--color-border-base;
787
760
  }
788
761
  }
789
762
 
790
- .ea-form .el-form-item__content {
791
- & > .el-input-number,
792
- & > .el-input,
793
- & > .ea-select,
794
- & > .el-select {
795
- width: 100%;
796
- }
763
+ .conf-header {
764
+ border-bottom: 1px solid #DDD;
765
+ padding-bottom: 10px;
766
+ margin-bottom: 10px;
797
767
  }
798
- .ea-form .el-form-item.hidden-label {
799
- > .el-form-item__label {
800
- display: none;
801
- }
802
- > .el-form-item__content {
803
- width: 100%;
804
- }
768
+ .conf-body {
769
+ width: 300px;
770
+ }
771
+ .dense-much .el-form-item {
772
+ margin-bottom: 8px !important;
805
773
  }
806
774
 
807
775
  .ea-select-container {
@@ -843,3 +811,35 @@ td {
843
811
  }
844
812
  }
845
813
  }
814
+
815
+ .ea-form .el-form-item__content {
816
+ & > .el-input-number,
817
+ & > .el-input,
818
+ & > .ea-select,
819
+ & > .el-select {
820
+ width: 100%;
821
+ }
822
+ }
823
+ .ea-form .el-form-item.hidden-label {
824
+ > .el-form-item__label {
825
+ display: none;
826
+ }
827
+ > .el-form-item__content {
828
+ width: 100%;
829
+ }
830
+ }
831
+
832
+ .ea-switch-mini {
833
+ .el-switch__core {
834
+ width: 30px !important;
835
+ height: 16px;
836
+ &::after {
837
+ width: 12px;
838
+ height: 12px;
839
+ left: 2px;
840
+ }
841
+ }
842
+ &.is-checked .el-switch__core::after {
843
+ margin-left: -13px;
844
+ }
845
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "element-assits",
3
- "version": "0.0.51",
3
+ "version": "0.0.53",
4
4
  "description": "element-ui 的扩展组件库",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",