element-assits 0.0.52 → 0.0.54

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
@@ -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
@@ -1470,10 +1470,10 @@ const bx = {
1470
1470
  };
1471
1471
  var wx = function() {
1472
1472
  var n = this, i = n._self._c;
1473
- return i("el-form-item", { class: { "hidden-label": n.top.labelWidth === "0" }, style: n.column.style, attrs: { label: n.column.__label, prop: n.column.prop, rules: n.column.__rules }, scopedSlots: n._u([{ key: "label", fn: function() {
1473
+ return i("el-form-item", { ref: "ElFormItem", class: { "hidden-label": n.top.labelWidth === "0" }, style: n.column.style, attrs: { label: n.column.__label, prop: n.column.prop, rules: n.column.__rules }, scopedSlots: n._u([{ key: "label", fn: function() {
1474
1474
  return [n._v(" " + n._s(n.column.__label) + " "), n.column.__labelTooltip ? i("el-tooltip", n._b({}, "el-tooltip", n.tooltip(n.column.__labelTooltip), !1), [i("i", { staticClass: "el-icon-warning-outline" })]) : n._e()];
1475
1475
  }, proxy: !0 }]) }, [i(n.column.__component, n._g(n._b({ tag: "component", on: { change: function(o) {
1476
- return n.top.$emit("change", n.top.model);
1476
+ n.top.$emit("change", n.top.model), n.$refs.ElFormItem.$emit("el.form.change");
1477
1477
  } }, nativeOn: { keyup: function(o) {
1478
1478
  return !o.type.indexOf("key") && n._k(o.keyCode, "enter", 13, o.key, "Enter") ? null : n.top.$emit("enter");
1479
1479
  } }, model: { value: n.top.model[n.column.prop], callback: function(o) {
@@ -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", [
package/lib/style.scss CHANGED
@@ -158,63 +158,6 @@ $--color-border-extralight: #F2F6FC !default;
158
158
  }
159
159
  }
160
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
-
218
161
  .ea-button-tooltip + .ea-button-tooltip {
219
162
  margin-left: 10px;
220
163
  }
@@ -280,6 +223,75 @@ td {
280
223
  }
281
224
  }
282
225
 
226
+ .ea-data-table {
227
+ .edt-row {
228
+ display: flex;
229
+ .edt-cell {
230
+ padding: 0 8px;
231
+ flex: 0 0 auto;
232
+ box-sizing: border-box;
233
+ overflow: hidden;
234
+ text-overflow: ellipsis;
235
+ white-space: nowrap;
236
+ word-break: break-all;
237
+ }
238
+ &.edt-header {
239
+ background-color: $--color-border-extralight;
240
+ color: $--color-primary-text;
241
+ }
242
+ }
243
+ &--border {
244
+ border: 1px solid $--color-border-light;
245
+ .edt-row {
246
+ .edt-cell {
247
+ border-bottom: 1px solid $--color-border-light;
248
+ border-left: 1px solid $--color-border-light;
249
+ &:first-child {
250
+ border-left: 0;
251
+ }
252
+ }
253
+ &:last-child .edt-cell{
254
+ border-bottom: 0;
255
+ }
256
+ }
257
+ }
258
+ .loading-text {
259
+ color: $--color-secondary-text;
260
+ text-align: center;
261
+ font-size: inherit;
262
+ }
263
+ }
264
+
265
+ .el-dialog.ea-modal {
266
+ &.is-closing {
267
+ margin: 0 0 50px !important;
268
+ }
269
+ &.is-fullscreen {
270
+ border-radius: 0;
271
+ margin: 0;
272
+ }
273
+ .el-dialog__header {
274
+ color: #555;
275
+ font-size: 18px;
276
+ .el-dialog__title {
277
+ color: inherit;
278
+ font-size: inherit;
279
+ }
280
+ }
281
+ }
282
+
283
+ .ea-tree {
284
+ .ea-tree-real {
285
+ .el-tree-node > .el-tree-node__content{
286
+ border-radius: 4px;
287
+ }
288
+ .el-tree-node.is-current > .el-tree-node__content {
289
+ color: $--color-primary;
290
+ background-color: rgba($--color-primary, 0.1);
291
+ }
292
+ }
293
+ }
294
+
283
295
  .ea-split-container {
284
296
  display: flex;
285
297
  &.is-down {
@@ -331,16 +343,8 @@ td {
331
343
  }
332
344
  }
333
345
 
334
- .ea-tree {
335
- .ea-tree-real {
336
- .el-tree-node > .el-tree-node__content{
337
- border-radius: 4px;
338
- }
339
- .el-tree-node.is-current > .el-tree-node__content {
340
- color: $--color-primary;
341
- background-color: rgba($--color-primary, 0.1);
342
- }
343
- }
346
+ .ea-number .el-input__inner {
347
+ text-align: left;
344
348
  }
345
349
 
346
350
  .ea-list {
@@ -395,10 +399,6 @@ td {
395
399
  }
396
400
  }
397
401
 
398
- .ea-number .el-input__inner {
399
- text-align: left;
400
- }
401
-
402
402
  .file-upload-dialog {
403
403
  // 拖拽区域铺满
404
404
  .el-upload,
@@ -426,63 +426,6 @@ td {
426
426
  }
427
427
  }
428
428
 
429
- .ea-data-tree-body {
430
- &.ea-data-tree-body__border {
431
- border: 1px solid $--color-border-light;
432
- }
433
- }
434
-
435
- .ea-data-tree-row {
436
- height: 32px;
437
- line-height: 32px;
438
- display: flex;
439
- justify-content: flex-start;
440
- position: relative;
441
- padding-left: 20px;
442
- &.odd { background-color: #F8F8F8; }
443
- &:hover { background-color: #EBEEF5; }
444
- .ea-data-tree-cell {
445
- flex: 0 0 auto;
446
- height: 100%;
447
- font-size: 14px;
448
- box-sizing: border-box;
449
- padding: 0 8px;
450
- position: relative;
451
- overflow: hidden;
452
- text-overflow: ellipsis;
453
- white-space: nowrap;
454
- word-break: break-all;
455
- & > .ea-data-tree-checkbox {
456
- position: absolute;
457
- top: 0;
458
- }
459
- }
460
- .ea-data-tree-icon {
461
- cursor: pointer;
462
- position: absolute;
463
- height: 100%;
464
- color: #CCC;
465
- display: flex;
466
- align-items: center;
467
- z-index: 1;
468
- &:hover {
469
- color: #333;
470
- }
471
- }
472
- }
473
-
474
- .ea-data-tree-checkbox .el-checkbox__input.is-indeterminate .el-checkbox__inner {
475
- background-color: $--color-secondary-text;
476
- border-color: $--color-secondary-text;
477
- }
478
-
479
- .ea-data-tree-empty {
480
- display: flex;
481
- justify-content: center;
482
- align-items: center;
483
- color: $--color-secondary-text;
484
- }
485
-
486
429
  .vjs-table {
487
430
  position: relative;
488
431
  overflow: hidden;
@@ -682,6 +625,87 @@ td {
682
625
  .ea-icon-more:before { content: "\e60e" }
683
626
  .eafont.ea-icon-conf.has { color: #000 }
684
627
 
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
+ .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
+ }
707
+ }
708
+
685
709
  .ea-table-modal {
686
710
  overflow: visible;
687
711
  right: unset;
@@ -736,30 +760,6 @@ td {
736
760
  }
737
761
  }
738
762
 
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;
751
- }
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;
760
- }
761
- }
762
-
763
763
  .conf-header {
764
764
  border-bottom: 1px solid #DDD;
765
765
  padding-bottom: 10px;
@@ -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.52",
3
+ "version": "0.0.54",
4
4
  "description": "element-ui 的扩展组件库",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",