@newview/file-ui 1.1.25 → 1.1.26

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
@@ -1,3 +1,6 @@
1
+ ## 1.1.26
2
+ 1. UploadFile 预览时根据token重新查一遍数据
3
+
1
4
  ## 1.1.25
2
5
  1. UploadFileList 界面按钮大小调整
3
6
 
package/dist/file-ui.js CHANGED
@@ -525,10 +525,14 @@ let UploadFileInstance$1 = class UploadFileInstance extends BaseInstance {
525
525
  * 预览文件
526
526
  * @param fileInfo
527
527
  */
528
- __publicField(this, "doView", (fileInfo) => {
529
- this.previewFileInfo = fileInfo;
528
+ __publicField(this, "doView", async (fileInfo, index = 0) => {
529
+ console.log("预览文件", fileInfo);
530
+ const apiResult = await this.fileInfoApi.getEntities(QueryWrapper.create().eq("Token", fileInfo.Token));
531
+ const result = this.utilities.parseApiResult(apiResult);
532
+ console.log("点击预览文件查询接口", result);
533
+ this.previewFileInfo = result[index];
530
534
  this.previewVisible.value = true;
531
- this.previewIndex.value = fileInfo.PreviewIndex;
535
+ this.previewIndex.value = index;
532
536
  });
533
537
  this.props = props;
534
538
  this.ctx = ctx;
@@ -602,8 +606,8 @@ let UploadFileInstance$1 = class UploadFileInstance extends BaseInstance {
602
606
  }
603
607
  //#endregion 业务逻辑 文件预览 END
604
608
  };
605
- const UploadFile_vue_vue_type_style_index_0_scoped_0e35ec0f_lang = "";
606
- const _withScopeId$1 = (n) => (pushScopeId("data-v-0e35ec0f"), n = n(), popScopeId(), n);
609
+ const UploadFile_vue_vue_type_style_index_0_scoped_5d3c256e_lang = "";
610
+ const _withScopeId$1 = (n) => (pushScopeId("data-v-5d3c256e"), n = n(), popScopeId(), n);
607
611
  const _hoisted_1$3 = { class: "uploadFile uploadPage" };
608
612
  const _hoisted_2$3 = ["onClick", "title"];
609
613
  const _hoisted_3$3 = { class: "file-upload-list-cover" };
@@ -658,7 +662,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
658
662
  }, [
659
663
  createElementVNode("div", {
660
664
  class: "file-upload-list-content",
661
- onClick: ($event) => _ctx.doView(item),
665
+ onClick: ($event) => _ctx.doView(item, index),
662
666
  title: item.FileName
663
667
  }, [
664
668
  createVNode(_component_Image, {
@@ -818,7 +822,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
818
822
  }, null, 8, ["modelValue", "preview-list", "preview-index", "file-info"])
819
823
  ]);
820
824
  }
821
- const UploadFile = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-0e35ec0f"]]);
825
+ const UploadFile = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-5d3c256e"]]);
822
826
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
823
827
  function getDefaultExportFromCjs(x) {
824
828
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
@@ -19443,7 +19447,7 @@ class UploadFileInstance2 extends BaseInstance {
19443
19447
  * @param fileInfo
19444
19448
  */
19445
19449
  __publicField(this, "doView", (fileInfo) => {
19446
- this.previewFileInfo = fileInfo;
19450
+ this.previewFileInfo.value = fileInfo;
19447
19451
  this.previewVisible.value = true;
19448
19452
  this.previewIndex.value = fileInfo.PreviewIndex;
19449
19453
  });