element-assits 0.0.17 → 0.0.19

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 +24 -23
  2. package/lib/style.scss +127 -127
  3. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -4,8 +4,8 @@ const St = ln;
4
4
  var un = typeof self == "object" && self && self.Object === Object && self, cn = St || un || Function("return this")();
5
5
  const O = cn;
6
6
  var dn = O.Symbol;
7
- const x = dn;
8
- var Ot = Object.prototype, fn = Ot.hasOwnProperty, hn = Ot.toString, q = x ? x.toStringTag : void 0;
7
+ const T = dn;
8
+ var Ot = Object.prototype, fn = Ot.hasOwnProperty, hn = Ot.toString, q = T ? T.toStringTag : void 0;
9
9
  function pn(t) {
10
10
  var e = fn.call(t, q), n = t[q];
11
11
  try {
@@ -20,7 +20,7 @@ var _n = Object.prototype, gn = _n.toString;
20
20
  function mn(t) {
21
21
  return gn.call(t);
22
22
  }
23
- var yn = "[object Null]", bn = "[object Undefined]", Ke = x ? x.toStringTag : void 0;
23
+ var yn = "[object Null]", bn = "[object Undefined]", Ke = T ? T.toStringTag : void 0;
24
24
  function I(t) {
25
25
  return t == null ? t === void 0 ? bn : yn : Ke && Ke in Object(t) ? pn(t) : mn(t);
26
26
  }
@@ -38,7 +38,7 @@ function Pe(t, e) {
38
38
  }
39
39
  var $n = Array.isArray;
40
40
  const y = $n;
41
- var wn = 1 / 0, Ye = x ? x.prototype : void 0, Ze = Ye ? Ye.toString : void 0;
41
+ var wn = 1 / 0, Ye = T ? T.prototype : void 0, Ze = Ye ? Ye.toString : void 0;
42
42
  function Et(t) {
43
43
  if (typeof t == "string")
44
44
  return t;
@@ -529,7 +529,7 @@ function Be(t, e) {
529
529
  t[i + n] = e[n];
530
530
  return t;
531
531
  }
532
- var it = x ? x.isConcatSpreadable : void 0;
532
+ var it = T ? T.isConcatSpreadable : void 0;
533
533
  function qi(t) {
534
534
  return y(t) || le(t) || !!(it && t && t[it]);
535
535
  }
@@ -696,7 +696,7 @@ function Rs(t) {
696
696
  var e = new t.constructor(t.source, Ls.exec(t));
697
697
  return e.lastIndex = t.lastIndex, e;
698
698
  }
699
- var pt = x ? x.prototype : void 0, _t = pt ? pt.valueOf : void 0;
699
+ var pt = T ? T.prototype : void 0, _t = pt ? pt.valueOf : void 0;
700
700
  function Fs(t) {
701
701
  return _t ? Object(_t.call(t)) : {};
702
702
  }
@@ -866,7 +866,7 @@ function Go(t) {
866
866
  n[++e] = r;
867
867
  }), n;
868
868
  }
869
- var Xo = 1, Ko = 2, Yo = "[object Boolean]", Zo = "[object Date]", Jo = "[object Error]", Qo = "[object Map]", Vo = "[object Number]", ea = "[object RegExp]", ta = "[object Set]", na = "[object String]", ra = "[object Symbol]", ia = "[object ArrayBuffer]", sa = "[object DataView]", yt = x ? x.prototype : void 0, me = yt ? yt.valueOf : void 0;
869
+ var Xo = 1, Ko = 2, Yo = "[object Boolean]", Zo = "[object Date]", Jo = "[object Error]", Qo = "[object Map]", Vo = "[object Number]", ea = "[object RegExp]", ta = "[object Set]", na = "[object String]", ra = "[object Symbol]", ia = "[object ArrayBuffer]", sa = "[object DataView]", yt = T ? T.prototype : void 0, me = yt ? yt.valueOf : void 0;
870
870
  function oa(t, e, n, r, i, s, o) {
871
871
  switch (n) {
872
872
  case sa:
@@ -1378,7 +1378,7 @@ var ol = function() {
1378
1378
  null,
1379
1379
  null
1380
1380
  );
1381
- const ul = ll.exports, T = () => Math.random().toString(), Oe = (t, e, n = "children", r = []) => {
1381
+ const ul = ll.exports, x = () => Math.random().toString(), Oe = (t, e, n = "children", r = []) => {
1382
1382
  for (let i = 0; i < t.length; i++)
1383
1383
  if (e && e(t[i], r) === !1 || t[i][n] && t[i][n].length && (r.push(t[i]), Oe(t[i][n], e, n, r) === !1))
1384
1384
  return !1;
@@ -1872,6 +1872,7 @@ const Ol = {
1872
1872
  };
1873
1873
  let e = [];
1874
1874
  return this.pageRequest ? this.data.splice(0) : (e = L(this.data), this.data.splice(t.pageSize), t.total = e.length), {
1875
+ uuid: x,
1875
1876
  rawColumn: [],
1876
1877
  columnMenu: Tl,
1877
1878
  innerLoading: !1,
@@ -1933,7 +1934,7 @@ const Ol = {
1933
1934
  return;
1934
1935
  const e = L(t);
1935
1936
  e.forEach((n, r) => {
1936
- n.show === void 0 && this.$set(n, "show", !0), n.key === void 0 && this.$set(n, "key", T()), n.sort === void 0 && (n.sort = r), n.bind = n.bind || {}, n.bind.render = n.bind.render || n.render, this.columnControl && (n.bind.renderHeader = this.middleRender(n.bind.renderHeader));
1937
+ n.show === void 0 && this.$set(n, "show", !0), n.key === void 0 && this.$set(n, "key", x()), n.sort === void 0 && (n.sort = r), n.bind = n.bind || {}, n.bind.render = n.bind.render || n.render, this.columnControl && (n.bind.renderHeader = this.middleRender(n.bind.renderHeader));
1937
1938
  }), this.rawColumn = e;
1938
1939
  },
1939
1940
  handleTriggerMenu(t, e) {
@@ -1948,28 +1949,28 @@ const Ol = {
1948
1949
  };
1949
1950
  switch (t.value) {
1950
1951
  case 1:
1951
- i.bind.className = "column-transition-active", i.key = T(), setTimeout(() => {
1952
- i.show = !1, i.key = T(), this.$nextTick(() => this.$refs.table.doLayout());
1952
+ i.bind.className = "column-transition-active", i.key = x(), setTimeout(() => {
1953
+ i.show = !1, i.key = x(), this.$nextTick(() => this.$refs.table.doLayout());
1953
1954
  }, 300);
1954
1955
  break;
1955
1956
  case 11:
1956
- i.bind.className = "column-transition-active", i.show = !0, i.key = T(), this.$nextTick(() => this.$refs.table.doLayout()), setTimeout(() => {
1957
- i.bind.className = "", i.key = T();
1957
+ i.bind.className = "column-transition-active", i.show = !0, i.key = x(), this.$nextTick(() => this.$refs.table.doLayout()), setTimeout(() => {
1958
+ i.bind.className = "", i.key = x();
1958
1959
  }, 300);
1959
1960
  break;
1960
1961
  case 21:
1961
- this.rawColumn.splice(r, 1), this.rawColumn.splice(s(i), 0, i), i.bind.fixed = !1, i.bind.className = "column-transition-active", i.key = T(), setTimeout(() => {
1962
- i.bind.className = "", i.key = T(), this.$nextTick(() => this.$refs.table.doLayout());
1962
+ this.rawColumn.splice(r, 1), this.rawColumn.splice(s(i), 0, i), i.bind.fixed = !1, i.bind.className = "column-transition-active", i.key = x(), setTimeout(() => {
1963
+ i.bind.className = "", i.key = x(), this.$nextTick(() => this.$refs.table.doLayout());
1963
1964
  }, 300);
1964
1965
  break;
1965
1966
  case 22:
1966
- this.rawColumn.splice(r, 1), this.rawColumn.push(i), i.bind.fixed = !0, i.bind.className = "column-transition-active", i.key = T(), this.$nextTick(() => this.$refs.table.doLayout()), setTimeout(() => {
1967
- i.bind.className = "", i.key = T(), this.$nextTick(() => this.$refs.table.doLayout());
1967
+ this.rawColumn.splice(r, 1), this.rawColumn.push(i), i.bind.fixed = !0, i.bind.className = "column-transition-active", i.key = x(), this.$nextTick(() => this.$refs.table.doLayout()), setTimeout(() => {
1968
+ i.bind.className = "", i.key = x(), this.$nextTick(() => this.$refs.table.doLayout());
1968
1969
  }, 300);
1969
1970
  break;
1970
1971
  case 23:
1971
- this.rawColumn.splice(r, 1), this.rawColumn.unshift(i), i.bind.fixed = "right", i.bind.className = "column-transition-active", i.key = T(), this.$nextTick(() => this.$refs.table.doLayout()), setTimeout(() => {
1972
- i.bind.fixed = "right", i.bind.className = "", i.key = T(), this.$nextTick(() => this.$refs.table.doLayout());
1972
+ this.rawColumn.splice(r, 1), this.rawColumn.unshift(i), i.bind.fixed = "right", i.bind.className = "column-transition-active", i.key = x(), this.$nextTick(() => this.$refs.table.doLayout()), setTimeout(() => {
1973
+ i.bind.fixed = "right", i.bind.className = "", i.key = x(), this.$nextTick(() => this.$refs.table.doLayout());
1973
1974
  }, 300);
1974
1975
  break;
1975
1976
  case 3:
@@ -2063,13 +2064,13 @@ var El = function() {
2063
2064
  ...e.$attrs
2064
2065
  }, !1), e.$listeners), [e._t("before-column"), e.theIndex.show ? n("el-table-column", e._b({ attrs: { type: "index" }, scopedSlots: e._u([{ key: "default", fn: function({ $index: r }) {
2065
2066
  return [e._v(" " + e._s((e.asyncPageCurrent - 1) * e.page.pageSize + r + 1) + " ")];
2066
- } }], null, !1, 2889338112) }, "el-table-column", { label: "\u5E8F\u53F7", align: "center", fixed: !0, width: 50 + Math.ceil((String(e.page.current).length - 1) * 7), ...e.theIndex.attrs }, !1)) : e._e(), e.theSelection.show ? n("el-table-column", e._b({ attrs: { type: "selection" } }, "el-table-column", { align: "center", fixed: !0, ...e.theSelection.attrs }, !1)) : e._e(), e._l(e.rawColumn.filter((r) => r.show !== !1), function(r) {
2067
+ } }], null, !1, 2889338112) }, "el-table-column", { label: "\u5E8F\u53F7", align: "center", fixed: !0, width: 50 + Math.ceil((String(e.page.current).length - 1) * 7), ...e.theIndex.attrs }, !1)) : e._e(), e.theSelection.show ? n("el-table-column", e._b({ attrs: { type: "selection" } }, "el-table-column", { align: "center", fixed: !0, width: 50, ...e.theSelection.attrs }, !1)) : e._e(), e._l(e.rawColumn.filter((r) => r.show !== !1), function(r) {
2067
2068
  return n("el-table-column", e._g(e._b({ key: r.key, attrs: { label: r.label, prop: r.prop }, scopedSlots: e._u([r.bind.render ? { key: "default", fn: function({ row: i, column: s }) {
2068
2069
  return [n(e.generateRender(i, r, s), { tag: "component" })];
2069
2070
  } } : null], null, !0) }, "el-table-column", r.bind, !1), r.on));
2070
2071
  }), e.theOperation.show ? n("el-table-column", e._b({ scopedSlots: e._u([{ key: "default", fn: function(r) {
2071
- return [e.theOperation.render ? n(e.theOperation.render, { key: r && r.row && r.row.id || e.uuid(), tag: "component", attrs: { scope: r } }) : e._t("row-menu", null, null, r)];
2072
- } }], null, !1, 173819514) }, "el-table-column", { label: "\u64CD\u4F5C", align: "center", fixed: "right", ...e.theOperation.attrs }, !1)) : e._e(), e._t("after-column")], 2)], 1)];
2072
+ return [e.theOperation.render ? n(e.theOperation.render, { key: e.uuid(), tag: "component", attrs: { scope: r } }) : n("div", { key: e.uuid() }, [e._t("row-menu", null, null, r)], 2)];
2073
+ } }], null, !1, 931019466) }, "el-table-column", { label: "\u64CD\u4F5C", align: "center", fixed: "right", ...e.theOperation.attrs }, !1)) : e._e(), e._t("after-column")], 2)], 1)];
2073
2074
  }, { data: e.data }), e._t("footer", function() {
2074
2075
  return [n("div", { staticClass: "ea-table__footer" }, [n("div", [e._t("bottom-menu")], 2), e.thePagination.show && e.page.total ? n("el-pagination", e._b({ staticClass: "ea-table__footer-right", attrs: { layout: "total, sizes, prev, pager, next, jumper", "page-size": e.page.pageSize, "current-page": e.page.current, total: e.page.total, "page-sizes": [10, 20, 50, 100], background: "" }, on: { "size-change": e.handleSizeChange, "current-change": e.handleCurrentChange } }, "el-pagination", e.thePagination.attrs, !1)) : e._e()], 1)];
2075
2076
  })], 2);
@@ -2975,5 +2976,5 @@ export {
2975
2976
  M as asyncLoad,
2976
2977
  Gu as default,
2977
2978
  Oe as recursive,
2978
- T as uuid
2979
+ x as uuid
2979
2980
  };
package/lib/style.scss CHANGED
@@ -11,35 +11,6 @@ $--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
-
43
14
  // table
44
15
  .ea-table {
45
16
  // 表格头部样式美化
@@ -157,6 +128,35 @@ $--color-border-extralight: #F2F6FC !default;
157
128
  transform: scaleY(0);
158
129
  }
159
130
 
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
160
  .el-dialog.ea-modal {
161
161
  &.is-closing {
162
162
  margin: 0 !important;
@@ -175,6 +175,43 @@ $--color-border-extralight: #F2F6FC !default;
175
175
  }
176
176
  }
177
177
 
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;
186
+ }
187
+ .sc-right {
188
+ flex-grow: 1;
189
+ flex-shrink: 1;
190
+ }
191
+ .sc-bamboo {
192
+ flex-grow: 0;
193
+ flex-shrink: 0;
194
+ width: 8px;
195
+ border: 1px solid #DCDEE2;
196
+ border-top: none;
197
+ border-bottom: none;
198
+ background-color: #F8F8F9;
199
+ cursor: col-resize;
200
+ user-select: none;
201
+ display: flex;
202
+ flex-direction: column;
203
+ justify-content: center;
204
+ align-items: center;
205
+ margin: 0 16px;
206
+ .sc-texture {
207
+ width: 4px;
208
+ height: 1px;
209
+ background: rgba(23, 35, 61, .25);
210
+ margin-top: 3px;
211
+ }
212
+ }
213
+ }
214
+
178
215
  .ea-button-tooltip + .ea-button-tooltip {
179
216
  margin-left: 10px;
180
217
  }
@@ -240,47 +277,6 @@ td {
240
277
  }
241
278
  }
242
279
 
243
- .ea-split-container {
244
- display: flex;
245
- &.is-down {
246
- user-select: none;
247
- }
248
- .sc-left {
249
- flex-grow: 1;
250
- flex-shrink: 1;
251
- }
252
- .sc-right {
253
- flex-grow: 1;
254
- flex-shrink: 1;
255
- }
256
- .sc-bamboo {
257
- flex-grow: 0;
258
- flex-shrink: 0;
259
- width: 8px;
260
- border: 1px solid #DCDEE2;
261
- border-top: none;
262
- border-bottom: none;
263
- background-color: #F8F8F9;
264
- cursor: col-resize;
265
- user-select: none;
266
- display: flex;
267
- flex-direction: column;
268
- justify-content: center;
269
- align-items: center;
270
- margin: 0 16px;
271
- .sc-texture {
272
- width: 4px;
273
- height: 1px;
274
- background: rgba(23, 35, 61, .25);
275
- margin-top: 3px;
276
- }
277
- }
278
- }
279
-
280
- .ea-number .el-input__inner {
281
- text-align: left;
282
- }
283
-
284
280
  .ea-tree {
285
281
  .ea-tree-real {
286
282
  .el-tree-node > .el-tree-node__content{
@@ -293,31 +289,8 @@ td {
293
289
  }
294
290
  }
295
291
 
296
- .file-upload-dialog {
297
- // 拖拽区域铺满
298
- .el-upload,
299
- .el-upload .el-upload-dragger {
300
- width: 100%;
301
- }
302
- // 文件列表项边框
303
- .el-upload-list {
304
- .el-upload-list__item {
305
- border: 1px dashed #aaa;
306
- .el-icon-close {
307
- display: inline-block;
308
- }
309
- }
310
- }
311
- // 清除文件列表变动过渡动画
312
- .el-list-enter,
313
- .el-list-enter-active,
314
- .el-list-enter-to,
315
- .el-list-leave,
316
- .el-list-leave-active,
317
- .el-list-leave-to {
318
- -webkit-transition: none !important;
319
- transition: none !important;
320
- }
292
+ .ea-number .el-input__inner {
293
+ text-align: left;
321
294
  }
322
295
 
323
296
  .ea-list {
@@ -371,27 +344,30 @@ td {
371
344
  }
372
345
  }
373
346
 
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;
347
+ .file-upload-dialog {
348
+ // 拖拽区域铺满
349
+ .el-upload,
350
+ .el-upload .el-upload-dragger {
392
351
  width: 100%;
393
- height: 0;
394
- border-bottom: 1px dashed $--color-border-base;
352
+ }
353
+ // 文件列表项边框
354
+ .el-upload-list {
355
+ .el-upload-list__item {
356
+ border: 1px dashed #aaa;
357
+ .el-icon-close {
358
+ display: inline-block;
359
+ }
360
+ }
361
+ }
362
+ // 清除文件列表变动过渡动画
363
+ .el-list-enter,
364
+ .el-list-enter-active,
365
+ .el-list-enter-to,
366
+ .el-list-leave,
367
+ .el-list-leave-active,
368
+ .el-list-leave-to {
369
+ -webkit-transition: none !important;
370
+ transition: none !important;
395
371
  }
396
372
  }
397
373
 
@@ -449,20 +425,27 @@ td {
449
425
  }
450
426
  }
451
427
 
452
- .ea-form .el-form-item__content {
453
- & > .el-input-number,
454
- & > .el-input,
455
- & > .ea-select,
456
- & > .el-select {
457
- width: 100%;
458
- }
459
- }
460
- .ea-form .el-form-item.hidden-label {
461
- > .el-form-item__label {
462
- display: none;
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;
463
440
  }
464
- > .el-form-item__content {
441
+ &::after {
442
+ content: '';
443
+ position: absolute;
444
+ top: 50%;
445
+ left: 0;
465
446
  width: 100%;
447
+ height: 0;
448
+ border-bottom: 1px dashed $--color-border-base;
466
449
  }
467
450
  }
468
451
 
@@ -505,3 +488,20 @@ td {
505
488
  }
506
489
  }
507
490
  }
491
+
492
+ .ea-form .el-form-item__content {
493
+ & > .el-input-number,
494
+ & > .el-input,
495
+ & > .ea-select,
496
+ & > .el-select {
497
+ width: 100%;
498
+ }
499
+ }
500
+ .ea-form .el-form-item.hidden-label {
501
+ > .el-form-item__label {
502
+ display: none;
503
+ }
504
+ > .el-form-item__content {
505
+ width: 100%;
506
+ }
507
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "element-assits",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "description": "element-ui 的扩展组件库",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",