element-assits 0.0.93 → 0.0.95

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/lib/index.js CHANGED
@@ -2420,21 +2420,25 @@ const Qx = {
2420
2420
  },
2421
2421
  getList() {
2422
2422
  if (!this.pageRequest) {
2423
- let r = [];
2423
+ let t = [];
2424
2424
  if (this.thePagination.show) {
2425
- const t = (this.page.current - 1) * this.page.pageSize;
2426
- r = this.data.slice(t, t + this.page.pageSize);
2425
+ const i = (this.page.current - 1) * this.page.pageSize;
2426
+ t = this.data.slice(i, i + this.page.pageSize);
2427
2427
  } else
2428
- r = this.data;
2429
- return this.tableData = r, this.page.total = this.data.length, this.asyncPageCurrent = this.page.current, Promise.resolve();
2430
- }
2431
- return this.innerLoading = !0, this.errMsg = void 0, this.pageRequest(this.page, this.theForm.attrs.model).then((r) => {
2432
- const { data: t, total: i, current: a } = r || {};
2433
- this.tableData = t || [], this.page.total = i || 0, this.asyncPageCurrent = a || this.page.current, le(this.tableData) && !this.tableData.length && this.page.current > 1 && this.handleCurrentChange(this.page.current - 1);
2434
- }).catch((r) => {
2435
- this.errMsg = r && r.message;
2428
+ t = this.data;
2429
+ return this.tableData = t, this.page.total = this.data.length, this.asyncPageCurrent = this.page.current, Promise.resolve();
2430
+ }
2431
+ this.innerLoading = !0, this.errMsg = void 0;
2432
+ const r = this.timestamp = Date.now();
2433
+ return this.pageRequest(this.page, this.theForm.attrs.model).then((t) => {
2434
+ if (r !== this.timestamp)
2435
+ return;
2436
+ const { data: i, total: a, current: o } = t || {};
2437
+ this.tableData = i || [], this.page.total = a || 0, this.asyncPageCurrent = o || this.page.current, le(this.tableData) && !this.tableData.length && this.page.current > 1 && this.handleCurrentChange(this.page.current - 1);
2438
+ }).catch((t) => {
2439
+ r === this.timestamp && (this.errMsg = t && t.message);
2436
2440
  }).finally(() => {
2437
- this.innerLoading = !1;
2441
+ r === this.timestamp && (this.innerLoading = !1);
2438
2442
  });
2439
2443
  },
2440
2444
  hideRefresh() {
@@ -3233,7 +3237,7 @@ const qC = {
3233
3237
  },
3234
3238
  methods: {
3235
3239
  handleSearch() {
3236
- this.page.current = 1, this.options = [], this.getList();
3240
+ this.pager.current = 1, this.options = [], this.getList();
3237
3241
  },
3238
3242
  async getList(r = !1) {
3239
3243
  this.loading !== !0 && (this.loading = !0, r && (await this.$nextTick(), this.scrollToBottom()), Promise.all([
package/lib/style.scss CHANGED
@@ -50,45 +50,6 @@ $--background-color-base: #F5F7FA !default;
50
50
  }
51
51
  }
52
52
 
53
- .ea-data-table {
54
- .edt-row {
55
- display: flex;
56
- .edt-cell {
57
- padding: 0 8px;
58
- flex: 0 0 auto;
59
- box-sizing: border-box;
60
- overflow: hidden;
61
- text-overflow: ellipsis;
62
- white-space: nowrap;
63
- word-break: break-all;
64
- }
65
- &.edt-header {
66
- background-color: $--color-border-extralight;
67
- color: $--color-primary-text;
68
- }
69
- }
70
- &--border {
71
- border: 1px solid $--color-border-light;
72
- .edt-row {
73
- .edt-cell {
74
- border-bottom: 1px solid $--color-border-light;
75
- border-left: 1px solid $--color-border-light;
76
- &:first-child {
77
- border-left: 0;
78
- }
79
- }
80
- &:last-child .edt-cell{
81
- border-bottom: 0;
82
- }
83
- }
84
- }
85
- .loading-text {
86
- color: $--color-secondary-text;
87
- text-align: center;
88
- font-size: inherit;
89
- }
90
- }
91
-
92
53
  // table
93
54
  .ea-table {
94
55
  // 表格头部样式美化
@@ -274,6 +235,53 @@ $--background-color-base: #F5F7FA !default;
274
235
  }
275
236
  }
276
237
 
238
+ .ea-data-table {
239
+ .edt-row {
240
+ display: flex;
241
+ .edt-cell {
242
+ padding: 0 8px;
243
+ flex: 0 0 auto;
244
+ box-sizing: border-box;
245
+ overflow: hidden;
246
+ text-overflow: ellipsis;
247
+ white-space: nowrap;
248
+ word-break: break-all;
249
+ }
250
+ &.edt-header {
251
+ background-color: $--color-border-extralight;
252
+ color: $--color-primary-text;
253
+ }
254
+ }
255
+ &--border {
256
+ border: 1px solid $--color-border-light;
257
+ .edt-row {
258
+ .edt-cell {
259
+ border-bottom: 1px solid $--color-border-light;
260
+ border-left: 1px solid $--color-border-light;
261
+ &:first-child {
262
+ border-left: 0;
263
+ }
264
+ }
265
+ &:last-child .edt-cell{
266
+ border-bottom: 0;
267
+ }
268
+ }
269
+ }
270
+ .loading-text {
271
+ color: $--color-secondary-text;
272
+ text-align: center;
273
+ font-size: inherit;
274
+ }
275
+ }
276
+
277
+ .ea-list {
278
+ .loading-text {
279
+ color: $--color-secondary-text;
280
+ text-align: center;
281
+ font-size: inherit;
282
+ }
283
+ }
284
+
277
285
  .ea-button-tooltip + .ea-button-tooltip {
278
286
  margin-left: 10px;
279
287
  }
@@ -339,6 +347,41 @@ td {
339
347
  }
340
348
  }
341
349
 
350
+ .ea-tree {
351
+ .ea-tree__main {
352
+ margin-top: 18px;
353
+ .ea-tree__header {
354
+ height: 50px;
355
+ padding-left: 24px;
356
+ padding-right: 14px;
357
+ font-size: 12px;
358
+ display: flex;
359
+ align-items: center;
360
+ justify-content: space-between;
361
+ background-color: $--background-color-base;
362
+ .ea-tree__header__text {
363
+ font-weight: bold;
364
+ }
365
+ }
366
+ }
367
+ .ea-tree-real {
368
+ .el-tree-node.is-current > .el-tree-node__content {
369
+ color: $--color-primary;
370
+ }
371
+ }
372
+ &.ea-tree--border {
373
+ .ea-tree__main {
374
+ border: 1px solid $--color-border-lighter;
375
+ }
376
+ .ea-tree__header {
377
+ border-bottom: 1px solid $--color-border-lighter;
378
+ }
379
+ .ea-tree-real {
380
+ margin: 10px 0;
381
+ }
382
+ }
383
+ }
384
+
342
385
  .ea-split-container {
343
386
  display: flex;
344
387
  &.is-down {
@@ -390,47 +433,8 @@ td {
390
433
  }
391
434
  }
392
435
 
393
- .ea-tree {
394
- .ea-tree__main {
395
- margin-top: 18px;
396
- .ea-tree__header {
397
- height: 50px;
398
- padding-left: 24px;
399
- padding-right: 14px;
400
- font-size: 12px;
401
- display: flex;
402
- align-items: center;
403
- justify-content: space-between;
404
- background-color: $--background-color-base;
405
- .ea-tree__header__text {
406
- font-weight: bold;
407
- }
408
- }
409
- }
410
- .ea-tree-real {
411
- .el-tree-node.is-current > .el-tree-node__content {
412
- color: $--color-primary;
413
- }
414
- }
415
- &.ea-tree--border {
416
- .ea-tree__main {
417
- border: 1px solid $--color-border-lighter;
418
- }
419
- .ea-tree__header {
420
- border-bottom: 1px solid $--color-border-lighter;
421
- }
422
- .ea-tree-real {
423
- margin: 10px 0;
424
- }
425
- }
426
- }
427
-
428
- .ea-list {
429
- .loading-text {
430
- color: $--color-secondary-text;
431
- text-align: center;
432
- font-size: inherit;
433
- }
436
+ .ea-number .el-input__inner {
437
+ text-align: left;
434
438
  }
435
439
 
436
440
  .ea-desc {
@@ -477,10 +481,6 @@ td {
477
481
  }
478
482
  }
479
483
 
480
- .ea-number .el-input__inner {
481
- text-align: left;
482
- }
483
-
484
484
  .file-upload-dialog {
485
485
  // 拖拽区域铺满
486
486
  .el-upload,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "element-assits",
3
- "version": "0.0.93",
3
+ "version": "0.0.95",
4
4
  "description": "element-ui 的扩展组件库",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",