element-assits 0.0.17 → 0.0.18

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 +23 -22
  2. package/lib/style.scss +170 -170
  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:
@@ -2068,8 +2069,8 @@ var El = function() {
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 } }) : e._t("row-menu", null, null, r)];
2073
+ } }], null, !1, 3677384915) }, "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
@@ -40,141 +40,6 @@ $--color-border-extralight: #F2F6FC !default;
40
40
  }
41
41
  }
42
42
 
43
- // table
44
- .ea-table {
45
- // 表格头部样式美化
46
- .el-table {
47
- th {
48
- background-color: $--color-border-extralight;
49
- color: $--color-primary-text;
50
- .cell {
51
- min-height: 30px;
52
- display: flex;
53
- justify-content: flex-start;
54
- align-items: center;
55
- }
56
- &.is-center .cell { justify-content: center }
57
- &.is-right .cell { justify-content: flex-end }
58
- }
59
- td, th {
60
- .cell {
61
- line-height: 1.2;
62
- }
63
- }
64
- &.el-table--small {
65
- td, th {
66
- height: 48px;
67
- }
68
- }
69
- &.is-dense {
70
- td, th {
71
- height: 32px;
72
- padding: 2px 0;
73
- .el-button {
74
- padding-top: 0;
75
- padding-bottom: 0;
76
- }
77
- }
78
- }
79
- }
80
- // 列的更多菜单项
81
- .theader-th-cell {
82
- .cell-icon-menu {
83
- position: absolute;
84
- top: 50%;
85
- right: 4px;
86
- transform: rotate(90deg) translateX(-50%);
87
- color: $--color-placeholder-text;
88
- cursor: pointer;
89
- padding: 4px;
90
- border-radius: 2px;
91
- &:hover {
92
- color: $--color-primary-text;
93
- background-color: $--color-border-light;
94
- }
95
- }
96
- }
97
- // 表格底部
98
- .ea-table__footer {
99
- display: flex;
100
- justify-content: space-between;
101
- .ea-table__footer-right {
102
- margin-left: auto;
103
- padding-right: 0;
104
- }
105
- > * {
106
- margin-top: 12px;
107
- }
108
- }
109
-
110
- .column-transition-active {
111
- opacity: 0.33;
112
- }
113
-
114
- .el-button > i {
115
- min-width: 12px;
116
- }
117
-
118
- .more-btn > i{
119
- transform: rotate(-90deg);
120
- }
121
- }
122
-
123
- // table - popover
124
- .el-popover.ea-popover-no-padding {
125
- padding: 8px 0;
126
- min-width: 100px;
127
- &.dense {
128
- margin-top: 0px;
129
- margin-bottom: 0px;
130
- min-width: 70px;
131
- }
132
- }
133
-
134
- .more-btn-panel {
135
- &__item {
136
- &:hover {
137
- background-color: $--color-border-lighter;
138
- }
139
- .el-button {
140
- padding: 8px 12px;
141
- width: 100%;
142
- text-align: left;
143
- }
144
- }
145
- }
146
-
147
- .ea-zoom-in-top-enter-active,
148
- .ea-zoom-in-top-leave-active {
149
- opacity: 1;
150
- transform: scaleY(1);
151
- transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), opacity 300ms cubic-bezier(0.23, 1, 0.32, 1);
152
- transform-origin: center top;
153
- }
154
- .ea-zoom-in-top-enter,
155
- .ea-zoom-in-top-leave-active {
156
- opacity: 0;
157
- transform: scaleY(0);
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
43
  .ea-button-tooltip + .ea-button-tooltip {
179
44
  margin-left: 10px;
180
45
  }
@@ -277,6 +142,32 @@ td {
277
142
  }
278
143
  }
279
144
 
145
+ .el-dialog.ea-modal {
146
+ &.is-closing {
147
+ margin: 0 !important;
148
+ }
149
+ &.is-fullscreen {
150
+ border-radius: 0;
151
+ margin: 0;
152
+ }
153
+ .el-dialog__header {
154
+ color: #555;
155
+ font-size: 18px;
156
+ .el-dialog__title {
157
+ color: inherit;
158
+ font-size: inherit;
159
+ }
160
+ }
161
+ }
162
+
163
+ .ea-list {
164
+ .loading-text {
165
+ color: $--color-secondary-text;
166
+ text-align: center;
167
+ font-size: inherit;
168
+ }
169
+ }
170
+
280
171
  .ea-number .el-input__inner {
281
172
  text-align: left;
282
173
  }
@@ -293,41 +184,6 @@ td {
293
184
  }
294
185
  }
295
186
 
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
- }
321
- }
322
-
323
- .ea-list {
324
- .loading-text {
325
- color: $--color-secondary-text;
326
- text-align: center;
327
- font-size: inherit;
328
- }
329
- }
330
-
331
187
  .ea-desc {
332
188
  font-size: 14px;
333
189
  &__title {
@@ -371,6 +227,150 @@ td {
371
227
  }
372
228
  }
373
229
 
230
+ .file-upload-dialog {
231
+ // 拖拽区域铺满
232
+ .el-upload,
233
+ .el-upload .el-upload-dragger {
234
+ width: 100%;
235
+ }
236
+ // 文件列表项边框
237
+ .el-upload-list {
238
+ .el-upload-list__item {
239
+ border: 1px dashed #aaa;
240
+ .el-icon-close {
241
+ display: inline-block;
242
+ }
243
+ }
244
+ }
245
+ // 清除文件列表变动过渡动画
246
+ .el-list-enter,
247
+ .el-list-enter-active,
248
+ .el-list-enter-to,
249
+ .el-list-leave,
250
+ .el-list-leave-active,
251
+ .el-list-leave-to {
252
+ -webkit-transition: none !important;
253
+ transition: none !important;
254
+ }
255
+ }
256
+
257
+ // table
258
+ .ea-table {
259
+ // 表格头部样式美化
260
+ .el-table {
261
+ th {
262
+ background-color: $--color-border-extralight;
263
+ color: $--color-primary-text;
264
+ .cell {
265
+ min-height: 30px;
266
+ display: flex;
267
+ justify-content: flex-start;
268
+ align-items: center;
269
+ }
270
+ &.is-center .cell { justify-content: center }
271
+ &.is-right .cell { justify-content: flex-end }
272
+ }
273
+ td, th {
274
+ .cell {
275
+ line-height: 1.2;
276
+ }
277
+ }
278
+ &.el-table--small {
279
+ td, th {
280
+ height: 48px;
281
+ }
282
+ }
283
+ &.is-dense {
284
+ td, th {
285
+ height: 32px;
286
+ padding: 2px 0;
287
+ .el-button {
288
+ padding-top: 0;
289
+ padding-bottom: 0;
290
+ }
291
+ }
292
+ }
293
+ }
294
+ // 列的更多菜单项
295
+ .theader-th-cell {
296
+ .cell-icon-menu {
297
+ position: absolute;
298
+ top: 50%;
299
+ right: 4px;
300
+ transform: rotate(90deg) translateX(-50%);
301
+ color: $--color-placeholder-text;
302
+ cursor: pointer;
303
+ padding: 4px;
304
+ border-radius: 2px;
305
+ &:hover {
306
+ color: $--color-primary-text;
307
+ background-color: $--color-border-light;
308
+ }
309
+ }
310
+ }
311
+ // 表格底部
312
+ .ea-table__footer {
313
+ display: flex;
314
+ justify-content: space-between;
315
+ .ea-table__footer-right {
316
+ margin-left: auto;
317
+ padding-right: 0;
318
+ }
319
+ > * {
320
+ margin-top: 12px;
321
+ }
322
+ }
323
+
324
+ .column-transition-active {
325
+ opacity: 0.33;
326
+ }
327
+
328
+ .el-button > i {
329
+ min-width: 12px;
330
+ }
331
+
332
+ .more-btn > i{
333
+ transform: rotate(-90deg);
334
+ }
335
+ }
336
+
337
+ // table - popover
338
+ .el-popover.ea-popover-no-padding {
339
+ padding: 8px 0;
340
+ min-width: 100px;
341
+ &.dense {
342
+ margin-top: 0px;
343
+ margin-bottom: 0px;
344
+ min-width: 70px;
345
+ }
346
+ }
347
+
348
+ .more-btn-panel {
349
+ &__item {
350
+ &:hover {
351
+ background-color: $--color-border-lighter;
352
+ }
353
+ .el-button {
354
+ padding: 8px 12px;
355
+ width: 100%;
356
+ text-align: left;
357
+ }
358
+ }
359
+ }
360
+
361
+ .ea-zoom-in-top-enter-active,
362
+ .ea-zoom-in-top-leave-active {
363
+ opacity: 1;
364
+ transform: scaleY(1);
365
+ transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), opacity 300ms cubic-bezier(0.23, 1, 0.32, 1);
366
+ transform-origin: center top;
367
+ }
368
+ .ea-zoom-in-top-enter,
369
+ .ea-zoom-in-top-leave-active {
370
+ opacity: 0;
371
+ transform: scaleY(0);
372
+ }
373
+
374
374
  .ea-form .form-group-title {
375
375
  position: relative;
376
376
  height: 32px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "element-assits",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "element-ui 的扩展组件库",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",