eoss-ui 0.8.48 → 0.8.50

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 (72) hide show
  1. package/lib/eoss-ui.common.js +84 -38
  2. package/lib/index.js +1 -1
  3. package/lib/main.js +9 -8
  4. package/lib/upload.js +72 -27
  5. package/package.json +1 -1
  6. package/packages/main/src/simplicityTop/index.vue +1 -0
  7. package/packages/theme-chalk/gulpfile.js +25 -0
  8. package/packages/upload/src/main.vue +42 -0
  9. package/src/index.js +1 -1
  10. package/packages/theme-chalk/lib/archives.css +0 -1
  11. package/packages/theme-chalk/lib/base.css +0 -1
  12. package/packages/theme-chalk/lib/button-group.css +0 -1
  13. package/packages/theme-chalk/lib/button.css +0 -1
  14. package/packages/theme-chalk/lib/calendar.css +0 -1
  15. package/packages/theme-chalk/lib/calogin.css +0 -0
  16. package/packages/theme-chalk/lib/card.css +0 -1
  17. package/packages/theme-chalk/lib/cascader.css +0 -0
  18. package/packages/theme-chalk/lib/checkbox-group.css +0 -1
  19. package/packages/theme-chalk/lib/clients.css +0 -1
  20. package/packages/theme-chalk/lib/data-table-form.css +0 -1
  21. package/packages/theme-chalk/lib/data-table.css +0 -1
  22. package/packages/theme-chalk/lib/date-picker.css +0 -1
  23. package/packages/theme-chalk/lib/dialog.css +0 -1
  24. package/packages/theme-chalk/lib/enable-drag.css +0 -1
  25. package/packages/theme-chalk/lib/enterprise.css +0 -1
  26. package/packages/theme-chalk/lib/error-page.css +0 -1
  27. package/packages/theme-chalk/lib/flow-chart.css +0 -0
  28. package/packages/theme-chalk/lib/flow-group.css +0 -1
  29. package/packages/theme-chalk/lib/flow-list.css +0 -1
  30. package/packages/theme-chalk/lib/flow.css +0 -1
  31. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  32. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  33. package/packages/theme-chalk/lib/form.css +0 -1
  34. package/packages/theme-chalk/lib/handle-user.css +0 -1
  35. package/packages/theme-chalk/lib/handler.css +0 -1
  36. package/packages/theme-chalk/lib/icon.css +0 -1
  37. package/packages/theme-chalk/lib/icons.css +0 -1
  38. package/packages/theme-chalk/lib/index.css +0 -1
  39. package/packages/theme-chalk/lib/input-number.css +0 -0
  40. package/packages/theme-chalk/lib/input.css +0 -1
  41. package/packages/theme-chalk/lib/label.css +0 -1
  42. package/packages/theme-chalk/lib/layout.css +0 -1
  43. package/packages/theme-chalk/lib/login.css +0 -1
  44. package/packages/theme-chalk/lib/main.css +0 -1
  45. package/packages/theme-chalk/lib/menu.css +0 -1
  46. package/packages/theme-chalk/lib/nav.css +0 -1
  47. package/packages/theme-chalk/lib/notify.css +0 -0
  48. package/packages/theme-chalk/lib/page.css +0 -1
  49. package/packages/theme-chalk/lib/pagination.css +0 -1
  50. package/packages/theme-chalk/lib/player.css +0 -1
  51. package/packages/theme-chalk/lib/qr-code.css +0 -1
  52. package/packages/theme-chalk/lib/radio-group.css +0 -1
  53. package/packages/theme-chalk/lib/retrial-auth.css +0 -1
  54. package/packages/theme-chalk/lib/select-ganged.css +0 -1
  55. package/packages/theme-chalk/lib/select.css +0 -1
  56. package/packages/theme-chalk/lib/selector-panel.css +0 -1
  57. package/packages/theme-chalk/lib/selector.css +0 -1
  58. package/packages/theme-chalk/lib/simplicity-top.css +0 -1
  59. package/packages/theme-chalk/lib/simplicity.css +0 -1
  60. package/packages/theme-chalk/lib/sizer.css +0 -1
  61. package/packages/theme-chalk/lib/steps.css +0 -1
  62. package/packages/theme-chalk/lib/switch.css +0 -1
  63. package/packages/theme-chalk/lib/table-form.css +0 -0
  64. package/packages/theme-chalk/lib/tabs-panel.css +0 -0
  65. package/packages/theme-chalk/lib/tabs.css +0 -1
  66. package/packages/theme-chalk/lib/tips.css +0 -1
  67. package/packages/theme-chalk/lib/toolbar.css +0 -1
  68. package/packages/theme-chalk/lib/tree-group.css +0 -1
  69. package/packages/theme-chalk/lib/tree.css +0 -1
  70. package/packages/theme-chalk/lib/upload.css +0 -1
  71. package/packages/theme-chalk/lib/wujie.css +0 -0
  72. package/packages/theme-chalk/lib/wxlogin.css +0 -1
@@ -82013,8 +82013,8 @@ var simplicity_component = normalizeComponent(
82013
82013
  )
82014
82014
 
82015
82015
  /* harmony default export */ var simplicity = (simplicity_component.exports);
82016
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicityTop/index.vue?vue&type=template&id=c03e4732&scoped=true&
82017
- var simplicityTopvue_type_template_id_c03e4732_scoped_true_render = function () {
82016
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicityTop/index.vue?vue&type=template&id=1703c788&scoped=true&
82017
+ var simplicityTopvue_type_template_id_1703c788_scoped_true_render = function () {
82018
82018
  var _vm = this
82019
82019
  var _h = _vm.$createElement
82020
82020
  var _c = _vm._self._c || _h
@@ -82581,11 +82581,11 @@ var simplicityTopvue_type_template_id_c03e4732_scoped_true_render = function ()
82581
82581
  1
82582
82582
  )
82583
82583
  }
82584
- var simplicityTopvue_type_template_id_c03e4732_scoped_true_staticRenderFns = []
82585
- simplicityTopvue_type_template_id_c03e4732_scoped_true_render._withStripped = true
82584
+ var simplicityTopvue_type_template_id_1703c788_scoped_true_staticRenderFns = []
82585
+ simplicityTopvue_type_template_id_1703c788_scoped_true_render._withStripped = true
82586
82586
 
82587
82587
 
82588
- // CONCATENATED MODULE: ./packages/main/src/simplicityTop/index.vue?vue&type=template&id=c03e4732&scoped=true&
82588
+ // CONCATENATED MODULE: ./packages/main/src/simplicityTop/index.vue?vue&type=template&id=1703c788&scoped=true&
82589
82589
 
82590
82590
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicityTop/avatar.vue?vue&type=template&id=30391b69&scoped=true&
82591
82591
  var avatarvue_type_template_id_30391b69_scoped_true_render = function () {
@@ -85464,6 +85464,7 @@ var simplicityTopvue_type_script_lang_js_systemMode = utils_util.getWinTopProper
85464
85464
  data: function data() {
85465
85465
  return {
85466
85466
  winTop: utils_util.getWinTop(),
85467
+ wintop: utils_util.getWinTop(),
85467
85468
  appCodes: 'indexUrl',
85468
85469
  tabActiveName: '',
85469
85470
  count: 0,
@@ -87526,11 +87527,11 @@ var simplicityTopvue_type_script_lang_js_systemMode = utils_util.getWinTopProper
87526
87527
 
87527
87528
  var simplicityTop_component = normalizeComponent(
87528
87529
  src_simplicityTopvue_type_script_lang_js_,
87529
- simplicityTopvue_type_template_id_c03e4732_scoped_true_render,
87530
- simplicityTopvue_type_template_id_c03e4732_scoped_true_staticRenderFns,
87530
+ simplicityTopvue_type_template_id_1703c788_scoped_true_render,
87531
+ simplicityTopvue_type_template_id_1703c788_scoped_true_staticRenderFns,
87531
87532
  false,
87532
87533
  null,
87533
- "c03e4732",
87534
+ "1703c788",
87534
87535
  null
87535
87536
 
87536
87537
  )
@@ -110573,8 +110574,8 @@ form_src_table.install = function (Vue) {
110573
110574
  };
110574
110575
 
110575
110576
  /* harmony default export */ var table_form = (form_src_table);
110576
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=7388a79d&
110577
- var mainvue_type_template_id_7388a79d_render = function () {
110577
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=bf79f780&
110578
+ var mainvue_type_template_id_bf79f780_render = function () {
110578
110579
  var _vm = this
110579
110580
  var _h = _vm.$createElement
110580
110581
  var _c = _vm._self._c || _h
@@ -110957,11 +110958,11 @@ var mainvue_type_template_id_7388a79d_render = function () {
110957
110958
  )
110958
110959
  : _vm._e()
110959
110960
  }
110960
- var mainvue_type_template_id_7388a79d_staticRenderFns = []
110961
- mainvue_type_template_id_7388a79d_render._withStripped = true
110961
+ var mainvue_type_template_id_bf79f780_staticRenderFns = []
110962
+ mainvue_type_template_id_bf79f780_render._withStripped = true
110962
110963
 
110963
110964
 
110964
- // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=7388a79d&
110965
+ // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=bf79f780&
110965
110966
 
110966
110967
  // CONCATENATED MODULE: ./packages/upload/src/picture.js
110967
110968
  /* harmony default export */ var picture = ({
@@ -111697,6 +111698,7 @@ var mainvue_type_script_lang_js_props;
111697
111698
  lists: {
111698
111699
  deep: true,
111699
111700
  handler: function handler(val) {
111701
+ if (this._isSortRebuilding) return;
111700
111702
  this.$emit('update:fileCount', val.length);
111701
111703
  this.$emit('getFilesAmount', val.length);
111702
111704
  }
@@ -112137,6 +112139,19 @@ var mainvue_type_script_lang_js_props;
112137
112139
 
112138
112140
  console.log('files', files);
112139
112141
  if (this.isSort) {
112142
+ // 同步拖拽排序后的顺序到数据层,采用先清空再重建的方式
112143
+ // 避免 SortableJS 移动 DOM 后与 Vue 虚拟 DOM 产生引用错位
112144
+ this._isSortRebuilding = true;
112145
+ this.lists = [];
112146
+ this.$nextTick(function () {
112147
+ _this10.lists = files;
112148
+ _this10._isSortRebuilding = false;
112149
+ // 重建完成后清除 table-body 的 newData 缓存
112150
+ // 使下次拖拽基于最新的 this.data 而非旧缓存
112151
+ _this10.$nextTick(function () {
112152
+ _this10._resetTableBodyCache();
112153
+ });
112154
+ });
112140
112155
  if (this.onSort) {
112141
112156
  this.onSort(files);
112142
112157
  } else {
@@ -112222,11 +112237,17 @@ var mainvue_type_script_lang_js_props;
112222
112237
  this.onChange && this.onChange(file, fileList);
112223
112238
  },
112224
112239
  handleRemove: function handleRemove(file, fileList) {
112240
+ var _this11 = this;
112241
+
112225
112242
  this.cleanupChunk(file);
112226
112243
  this.$emit('input', fileList.length ? fileList : '');
112227
112244
  this.$emit('remove', file, fileList);
112228
112245
  this.$emit('change', fileList);
112229
112246
  this.onRemove && this.onRemove(file, fileList);
112247
+ // 删除后重置 table-body 的排序缓存,防止再次拖拽时已删除文件从旧 newData 中复活
112248
+ this.$nextTick(function () {
112249
+ _this11._resetTableBodyCache();
112250
+ });
112230
112251
  },
112231
112252
  handleError: function handleError(err, file, fileList) {
112232
112253
  console.log('err', err);
@@ -112261,7 +112282,7 @@ var mainvue_type_script_lang_js_props;
112261
112282
  // el-upload 的自定义上传实现:建立可暂停的运行态并返回受控 Promise。
112262
112283
  // 暂停时不 resolve/reject(promise 维持 pending,文件保持"上传中"而非失败),继续时再次进入流程。
112263
112284
  chunkUpload: function chunkUpload(options) {
112264
- var _this11 = this;
112285
+ var _this12 = this;
112265
112286
 
112266
112287
  var file = options.file;
112267
112288
  var uid = file.uid;
@@ -112276,13 +112297,13 @@ var mainvue_type_script_lang_js_props;
112276
112297
  return new Promise(function (resolve, reject) {
112277
112298
  state.resolve = resolve;
112278
112299
  state.reject = reject;
112279
- _this11.runChunkFlow(uid);
112300
+ _this12.runChunkFlow(uid);
112280
112301
  });
112281
112302
  },
112282
112303
 
112283
112304
  // 分片主流程(可被"继续"重新进入):MD5(缓存) → 秒传/断点续传检测 → 并发上传缺失分片 → 合并入库。
112284
112305
  runChunkFlow: function runChunkFlow(uid) {
112285
- var _this12 = this;
112306
+ var _this13 = this;
112286
112307
 
112287
112308
  var state = this._chunkState[uid];
112288
112309
  if (!state) return;
@@ -112290,13 +112311,13 @@ var mainvue_type_script_lang_js_props;
112290
112311
  var file = options.file;
112291
112312
  var onProgress = options.onProgress || function () {};
112292
112313
  var baseParams = function baseParams() {
112293
- return upload_src_mainvue_type_script_lang_js_extends({}, _this12.param, {
112314
+ return upload_src_mainvue_type_script_lang_js_extends({}, _this13.param, {
112294
112315
  fileMd5: state.fileMd5,
112295
112316
  fileName: file.name,
112296
112317
  fileSize: file.size,
112297
112318
  totalChunks: state.totalChunks,
112298
- bucketCode: _this12.code,
112299
- businessId: _this12.ownId
112319
+ bucketCode: _this13.code,
112320
+ businessId: _this13.ownId
112300
112321
  });
112301
112322
  };
112302
112323
  var isAbort = function isAbort(e) {
@@ -112304,13 +112325,13 @@ var mainvue_type_script_lang_js_props;
112304
112325
  };
112305
112326
 
112306
112327
  Promise.resolve().then(function () {
112307
- return state.fileMd5 || _this12.computeFileMd5(file, onProgress);
112328
+ return state.fileMd5 || _this13.computeFileMd5(file, onProgress);
112308
112329
  }).then(function (md5) {
112309
112330
  state.fileMd5 = md5;
112310
112331
  if (state.paused) return null;
112311
112332
  return utils_util.ajax({
112312
112333
  method: 'post',
112313
- url: _this12.chunkUrls.check,
112334
+ url: _this13.chunkUrls.check,
112314
112335
  data: baseParams(),
112315
112336
  params: baseParams(),
112316
112337
  headers: options.headers
@@ -112322,14 +112343,14 @@ var mainvue_type_script_lang_js_props;
112322
112343
  // 秒传命中:该业务桶下已存在同 MD5 文件,直接视为成功
112323
112344
  if (info.instant) {
112324
112345
  onProgress({ percent: 100 });
112325
- _this12.normalizeChunkDoc(info, file.name);
112326
- _this12.finishChunk(uid, {
112346
+ _this13.normalizeChunkDoc(info, file.name);
112347
+ _this13.finishChunk(uid, {
112327
112348
  rCode: 0,
112328
112349
  msg: checkRes.msg || '秒传成功',
112329
112350
  results: info
112330
112351
  });
112331
112352
  // 秒传文件已存在于服务端,刷新列表以展示其完整信息(含可下载/预览的 id)
112332
- _this12.requestFiles && _this12.getFiles();
112353
+ _this13.requestFiles && _this13.getFiles();
112333
112354
  return;
112334
112355
  }
112335
112356
  // 断点续传:跳过服务端已存在的分片
@@ -112345,9 +112366,9 @@ var mainvue_type_script_lang_js_props;
112345
112366
  });
112346
112367
  state.controller = typeof AbortController !== 'undefined' ? new AbortController() : null;
112347
112368
  var signal = state.controller ? state.controller.signal : undefined;
112348
- return _this12.runChunkQueue(pending, _this12._chunkConcurrent, function (index) {
112369
+ return _this13.runChunkQueue(pending, _this13._chunkConcurrent, function (index) {
112349
112370
  if (state.paused) return Promise.reject({ __aborted: true });
112350
- return _this12.uploadOneChunk(file, index, state.totalChunks, state.fileMd5, options.headers, signal).then(function () {
112371
+ return _this13.uploadOneChunk(file, index, state.totalChunks, state.fileMd5, options.headers, signal).then(function () {
112351
112372
  finished++;
112352
112373
  onProgress({
112353
112374
  percent: Math.min(95, 5 + Math.round(finished / state.totalChunks * 90))
@@ -112357,7 +112378,7 @@ var mainvue_type_script_lang_js_props;
112357
112378
  if (state.paused) return; // 暂停于上传阶段,维持 pending
112358
112379
  return utils_util.ajax({
112359
112380
  method: 'post',
112360
- url: _this12.chunkUrls.merge,
112381
+ url: _this13.chunkUrls.merge,
112361
112382
  data: baseParams(),
112362
112383
  params: baseParams(),
112363
112384
  headers: options.headers
@@ -112365,17 +112386,17 @@ var mainvue_type_script_lang_js_props;
112365
112386
  console.log('mergeRes', mergeRes);
112366
112387
  if (mergeRes.rCode !== 0) return Promise.reject(mergeRes);
112367
112388
  onProgress({ percent: 100 });
112368
- _this12.normalizeChunkDoc(mergeRes.results, file.name);
112369
- _this12.finishChunk(uid, mergeRes);
112389
+ _this13.normalizeChunkDoc(mergeRes.results, file.name);
112390
+ _this13.finishChunk(uid, mergeRes);
112370
112391
  // 刷新列表:让刚入库的文件以与其他行一致的结构展示(时间/大小/上传人等)
112371
- _this12.requestFiles && _this12.getFiles();
112392
+ _this13.requestFiles && _this13.getFiles();
112372
112393
  });
112373
112394
  });
112374
112395
  }).catch(function (e) {
112375
112396
  console.log('err', e);
112376
112397
  // 暂停导致的中止:保持 pending 等待"继续";其余才算失败
112377
112398
  if (state.paused || isAbort(e)) return;
112378
- _this12.failChunk(uid, e);
112399
+ _this13.failChunk(uid, e);
112379
112400
  });
112380
112401
  },
112381
112402
 
@@ -112488,7 +112509,7 @@ var mainvue_type_script_lang_js_props;
112488
112509
 
112489
112510
  // 上传单个分片(multipart/form-data);signal 用于暂停时中止
112490
112511
  uploadOneChunk: function uploadOneChunk(file, index, totalChunks, fileMd5, headers, signal) {
112491
- var _this13 = this;
112512
+ var _this14 = this;
112492
112513
 
112493
112514
  var start = index * this._chunkSize;
112494
112515
  var end = Math.min(start + this._chunkSize, file.size);
@@ -112502,7 +112523,7 @@ var mainvue_type_script_lang_js_props;
112502
112523
  formData.append('bucketCode', this.code);
112503
112524
  formData.append('businessId', this.ownId);
112504
112525
  Object.keys(this.param || {}).forEach(function (key) {
112505
- formData.append(key, _this13.param[key]);
112526
+ formData.append(key, _this14.param[key]);
112506
112527
  });
112507
112528
  return utils_util.ajax({
112508
112529
  method: 'post',
@@ -112519,10 +112540,10 @@ var mainvue_type_script_lang_js_props;
112519
112540
 
112520
112541
  // 分块读取文件并增量计算 MD5(避免大文件一次性读入内存)
112521
112542
  computeFileMd5: function computeFileMd5(file, onProgress) {
112522
- var _this14 = this;
112543
+ var _this15 = this;
112523
112544
 
112524
112545
  return new Promise(function (resolve, reject) {
112525
- var size = _this14._chunkSize;
112546
+ var size = _this15._chunkSize;
112526
112547
  var chunks = Math.max(1, Math.ceil(file.size / size));
112527
112548
  var spark = new external_spark_md5_default.a.ArrayBuffer();
112528
112549
  var reader = new FileReader();
@@ -112575,6 +112596,31 @@ var mainvue_type_script_lang_js_props;
112575
112596
  };
112576
112597
  schedule();
112577
112598
  });
112599
+ },
112600
+
112601
+ /**
112602
+ * 重置 table-body 组件内部的 newData 缓存。
112603
+ * table-body.js 在拖拽排序时会把结果存入 newData,后续排序优先从 newData 取数据源。
112604
+ * 但文件被删除后 newData 不会自动清除,导致已删除文件在下次拖拽时复活。
112605
+ */
112606
+ _resetTableBodyCache: function _resetTableBodyCache() {
112607
+ if (this.listType !== 'table') return;
112608
+ var upload = this.$refs.upload;
112609
+ if (!upload) return;
112610
+ var tableList = upload.$children.find(function (c) {
112611
+ return c.$options.name === 'TableList';
112612
+ });
112613
+ if (!tableList) return;
112614
+ var elTable = tableList.$children.find(function (c) {
112615
+ return c.$options.name === 'ElTable';
112616
+ });
112617
+ if (!elTable) return;
112618
+ var tableBody = elTable.$children.find(function (c) {
112619
+ return c.$options.name === 'ElTableBody';
112620
+ });
112621
+ if (tableBody) {
112622
+ tableBody.newData = null;
112623
+ }
112578
112624
  }
112579
112625
  }
112580
112626
  });
@@ -112590,8 +112636,8 @@ var mainvue_type_script_lang_js_props;
112590
112636
 
112591
112637
  var upload_src_main_component = normalizeComponent(
112592
112638
  packages_upload_src_mainvue_type_script_lang_js_,
112593
- mainvue_type_template_id_7388a79d_render,
112594
- mainvue_type_template_id_7388a79d_staticRenderFns,
112639
+ mainvue_type_template_id_bf79f780_render,
112640
+ mainvue_type_template_id_bf79f780_staticRenderFns,
112595
112641
  false,
112596
112642
  null,
112597
112643
  null,
@@ -113094,7 +113140,7 @@ if (typeof window !== 'undefined' && window.Vue) {
113094
113140
  }
113095
113141
 
113096
113142
  /* harmony default export */ var src_0 = __webpack_exports__["default"] = ({
113097
- version: '0.8.48',
113143
+ version: '0.8.50',
113098
113144
  install: install,
113099
113145
  Archives: archives,
113100
113146
  Button: packages_button,