element-assits 0.0.46 → 0.0.48

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.
Files changed (3) hide show
  1. package/lib/index.js +11 -9
  2. package/lib/style.scss +111 -111
  3. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -2076,8 +2076,8 @@ class Xx {
2076
2076
  }
2077
2077
  add({ $index: n }, i) {
2078
2078
  this.isTrigger || (this.o[n] = i.map((o) => {
2079
- const u = Rt(o, "componentOptions.children[0].text");
2080
- return Math.max(u.length, 2) * 14 + 14 + 9;
2079
+ const u = Rt(o, "componentInstance.$el.innerText");
2080
+ return Math.max(u && u.length, 2) * 14 + 14 + 9;
2081
2081
  }).reduce((o, u) => o + u, 0) + 14 * 3 + 20, this.o.every(Boolean) && (this.isTrigger = !0, this.callback(Math.max(...this.o))));
2082
2082
  }
2083
2083
  }
@@ -2093,15 +2093,16 @@ function $u(r = 3) {
2093
2093
  o = {
2094
2094
  props: { scope: { type: Object, default: void 0 } },
2095
2095
  data() {
2096
- var b;
2097
- const d = Cu.bind(n)(this.scope).filter((S) => S.tag), v = d.slice(0, r - 1);
2098
- (b = n.fitOpt) == null || b.add(this.scope, v);
2099
- const m = d.slice(r - 1);
2096
+ const d = Cu.bind(n)(this.scope).filter((b) => b.tag), v = d.slice(0, r - 1), m = d.slice(r - 1);
2100
2097
  return {
2101
2098
  children: v,
2102
2099
  moreChildren: m
2103
2100
  };
2104
2101
  },
2102
+ mounted() {
2103
+ var d;
2104
+ (d = n.fitOpt) == null || d.add(this.scope, this.children);
2105
+ },
2105
2106
  render(d) {
2106
2107
  return d("div", [
2107
2108
  ...this.children,
@@ -2129,8 +2130,9 @@ function $u(r = 3) {
2129
2130
  };
2130
2131
  }
2131
2132
  function Cu(r) {
2132
- let n = this.$slots["row-menu"], i = this.$scopedSlots["row-menu"];
2133
- return n = Array.isArray(n) ? n : n && n() || [], i = Array.isArray(i) ? i : i && i(r) || [], [...n, ...i];
2133
+ const i = (this.$root.constructor.version.match(/\.(\d+)\./) || [])[1];
2134
+ let o = this.$slots["row-menu"], u = this.$scopedSlots["row-menu"];
2135
+ return o = Array.isArray(o) ? o : o && o() || [], u = Array.isArray(u) ? u : u && u(r) || [], i >= 6 ? u : [...o, ...u];
2134
2136
  }
2135
2137
  let Gs, rf = null, Su = null;
2136
2138
  function sf() {
@@ -2680,7 +2682,7 @@ function _$(r) {
2680
2682
  }
2681
2683
  function Lt(r, n) {
2682
2684
  const i = document.createElement("div");
2683
- i.style.position = "absolute", g$(i, n), r.style.userSelect = "none", r.appendChild(i);
2685
+ i.style.position = "absolute", g$(i, n), r.appendChild(i);
2684
2686
  let o = r.offsetLeft, u = r.offsetTop, d = r.offsetWidth, v = r.offsetHeight, m = !1, b, S;
2685
2687
  const T = () => {
2686
2688
  m = !1, b = void 0, S = void 0, o = r.offsetLeft, u = r.offsetTop, d = r.offsetWidth, v = r.offsetHeight;
package/lib/style.scss CHANGED
@@ -167,36 +167,6 @@ $--color-border-extralight: #F2F6FC !default;
167
167
  }
168
168
  }
169
169
 
170
- .ea-select {
171
- display: inline-block;
172
- position: relative;
173
- .el-select {
174
- width: 100%;
175
- }
176
- .async-loading.el-icon-loading {
177
- position: absolute;
178
- top: 10px;
179
- right: 28px;
180
- color: #999;
181
- }
182
- }
183
- .ea-select-popover {
184
- .el-select-dropdown__item {
185
- display: flex;
186
- justify-content: space-between;
187
- .select-item-value {
188
- overflow: hidden;
189
- text-overflow: ellipsis;
190
- }
191
- .select-item-desc {
192
- overflow: hidden;
193
- text-overflow: ellipsis;
194
- color: #8492a6;
195
- margin-left: 8px;
196
- }
197
- }
198
- }
199
-
200
170
  .el-dialog.ea-modal {
201
171
  &.is-closing {
202
172
  margin: 0 0 50px !important;
@@ -280,8 +250,34 @@ td {
280
250
  }
281
251
  }
282
252
 
283
- .ea-number .el-input__inner {
284
- text-align: left;
253
+ .ea-select {
254
+ display: inline-block;
255
+ position: relative;
256
+ .el-select {
257
+ width: 100%;
258
+ }
259
+ .async-loading.el-icon-loading {
260
+ position: absolute;
261
+ top: 10px;
262
+ right: 28px;
263
+ color: #999;
264
+ }
265
+ }
266
+ .ea-select-popover {
267
+ .el-select-dropdown__item {
268
+ display: flex;
269
+ justify-content: space-between;
270
+ .select-item-value {
271
+ overflow: hidden;
272
+ text-overflow: ellipsis;
273
+ }
274
+ .select-item-desc {
275
+ overflow: hidden;
276
+ text-overflow: ellipsis;
277
+ color: #8492a6;
278
+ margin-left: 8px;
279
+ }
280
+ }
285
281
  }
286
282
 
287
283
  .ea-tree {
@@ -347,6 +343,18 @@ td {
347
343
  }
348
344
  }
349
345
 
346
+ .ea-number .el-input__inner {
347
+ text-align: left;
348
+ }
349
+
350
+ .ea-list {
351
+ .loading-text {
352
+ color: $--color-secondary-text;
353
+ text-align: center;
354
+ font-size: inherit;
355
+ }
356
+ }
357
+
350
358
  .ea-desc {
351
359
  font-size: 14px;
352
360
  &__title {
@@ -391,14 +399,63 @@ td {
391
399
  }
392
400
  }
393
401
 
394
- .ea-list {
395
- .loading-text {
396
- color: $--color-secondary-text;
397
- text-align: center;
398
- font-size: inherit;
402
+ .ea-data-tree-body {
403
+ &.ea-data-tree-body__border {
404
+ border: 1px solid $--color-border-light;
405
+ }
406
+ }
407
+
408
+ .ea-data-tree-row {
409
+ height: 32px;
410
+ line-height: 32px;
411
+ display: flex;
412
+ justify-content: flex-start;
413
+ position: relative;
414
+ padding-left: 20px;
415
+ &.odd { background-color: #F8F8F8; }
416
+ &:hover { background-color: #EBEEF5; }
417
+ .ea-data-tree-cell {
418
+ flex: 0 0 auto;
419
+ height: 100%;
420
+ font-size: 14px;
421
+ box-sizing: border-box;
422
+ padding: 0 8px;
423
+ position: relative;
424
+ overflow: hidden;
425
+ text-overflow: ellipsis;
426
+ white-space: nowrap;
427
+ word-break: break-all;
428
+ & > .ea-data-tree-checkbox {
429
+ position: absolute;
430
+ top: 0;
431
+ }
432
+ }
433
+ .ea-data-tree-icon {
434
+ cursor: pointer;
435
+ position: absolute;
436
+ height: 100%;
437
+ color: #CCC;
438
+ display: flex;
439
+ align-items: center;
440
+ z-index: 1;
441
+ &:hover {
442
+ color: #333;
443
+ }
399
444
  }
400
445
  }
401
446
 
447
+ .ea-data-tree-checkbox .el-checkbox__input.is-indeterminate .el-checkbox__inner {
448
+ background-color: $--color-secondary-text;
449
+ border-color: $--color-secondary-text;
450
+ }
451
+
452
+ .ea-data-tree-empty {
453
+ display: flex;
454
+ justify-content: center;
455
+ align-items: center;
456
+ color: $--color-secondary-text;
457
+ }
458
+
402
459
  .file-upload-dialog {
403
460
  // 拖拽区域铺满
404
461
  .el-upload,
@@ -625,63 +682,6 @@ td {
625
682
  .ea-icon-more:before { content: "\e60e" }
626
683
  .eafont.ea-icon-conf.has { color: #000 }
627
684
 
628
- .ea-data-tree-body {
629
- &.ea-data-tree-body__border {
630
- border: 1px solid $--color-border-light;
631
- }
632
- }
633
-
634
- .ea-data-tree-row {
635
- height: 32px;
636
- line-height: 32px;
637
- display: flex;
638
- justify-content: flex-start;
639
- position: relative;
640
- padding-left: 20px;
641
- &.odd { background-color: #F8F8F8; }
642
- &:hover { background-color: #EBEEF5; }
643
- .ea-data-tree-cell {
644
- flex: 0 0 auto;
645
- height: 100%;
646
- font-size: 14px;
647
- box-sizing: border-box;
648
- padding: 0 8px;
649
- position: relative;
650
- overflow: hidden;
651
- text-overflow: ellipsis;
652
- white-space: nowrap;
653
- word-break: break-all;
654
- & > .ea-data-tree-checkbox {
655
- position: absolute;
656
- top: 0;
657
- }
658
- }
659
- .ea-data-tree-icon {
660
- cursor: pointer;
661
- position: absolute;
662
- height: 100%;
663
- color: #CCC;
664
- display: flex;
665
- align-items: center;
666
- z-index: 1;
667
- &:hover {
668
- color: #333;
669
- }
670
- }
671
- }
672
-
673
- .ea-data-tree-checkbox .el-checkbox__input.is-indeterminate .el-checkbox__inner {
674
- background-color: $--color-secondary-text;
675
- border-color: $--color-secondary-text;
676
- }
677
-
678
- .ea-data-tree-empty {
679
- display: flex;
680
- justify-content: center;
681
- align-items: center;
682
- color: $--color-secondary-text;
683
- }
684
-
685
685
  .ea-table-modal {
686
686
  overflow: visible;
687
687
  right: unset;
@@ -772,6 +772,23 @@ td {
772
772
  margin-bottom: 8px !important;
773
773
  }
774
774
 
775
+ .ea-form .el-form-item__content {
776
+ & > .el-input-number,
777
+ & > .el-input,
778
+ & > .ea-select,
779
+ & > .el-select {
780
+ width: 100%;
781
+ }
782
+ }
783
+ .ea-form .el-form-item.hidden-label {
784
+ > .el-form-item__label {
785
+ display: none;
786
+ }
787
+ > .el-form-item__content {
788
+ width: 100%;
789
+ }
790
+ }
791
+
775
792
  .ea-select-container {
776
793
  display: flex;
777
794
  justify-content: flex-start;
@@ -812,23 +829,6 @@ td {
812
829
  }
813
830
  }
814
831
 
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
832
  .ea-switch-mini {
833
833
  .el-switch__core {
834
834
  width: 30px !important;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "element-assits",
3
- "version": "0.0.46",
3
+ "version": "0.0.48",
4
4
  "description": "element-ui 的扩展组件库",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",