@newview/file-ui 1.1.24 → 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,9 @@
1
+ ## 1.1.26
2
+ 1. UploadFile 预览时根据token重新查一遍数据
3
+
4
+ ## 1.1.25
5
+ 1. UploadFileList 界面按钮大小调整
6
+
1
7
  ## 1.1.24
2
8
  1. UploadFileList 界面调整
3
9
 
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
  });
@@ -19538,7 +19542,7 @@ class UploadFileInstance2 extends BaseInstance {
19538
19542
  }
19539
19543
  //#endregion 业务逻辑 文件预览 END
19540
19544
  }
19541
- const UploadFileList_vue_vue_type_style_index_0_scoped_f6018903_lang = "";
19545
+ const UploadFileList_vue_vue_type_style_index_0_scoped_788854bb_lang = "";
19542
19546
  const _hoisted_1 = { class: "uploadFileList" };
19543
19547
  const _hoisted_2 = { class: "up-btn-box" };
19544
19548
  const _hoisted_3 = { class: "nv-flex-1" };
@@ -19579,14 +19583,12 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
19579
19583
  "on-success": _ctx.doSuccess,
19580
19584
  "on-format-error": _ctx.doFormatError,
19581
19585
  "on-exceeded-size": _ctx.doMaxSize,
19582
- "before-upload": _ctx.doBeforeUpload,
19583
- style: { "display": "inline-block", "width": "54px" }
19586
+ "before-upload": _ctx.doBeforeUpload
19584
19587
  }, {
19585
19588
  default: withCtx(() => [
19586
19589
  _ctx.isShowUpBtn ? (openBlock(), createBlock(_component_Button, {
19587
19590
  key: 0,
19588
- type: "primary",
19589
- size: "small"
19591
+ type: "primary"
19590
19592
  }, {
19591
19593
  default: withCtx(() => [
19592
19594
  createTextVNode("上传")
@@ -19598,8 +19600,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
19598
19600
  }, 1032, ["multiple", "format", "max-size", "action", "headers", "data", "on-success", "on-format-error", "on-exceeded-size", "before-upload"])) : createCommentVNode("", true),
19599
19601
  !_ctx.isShowtrash ? (openBlock(), createBlock(_component_Button, {
19600
19602
  key: 1,
19603
+ style: { "margin-left": "8px" },
19601
19604
  type: "primary",
19602
- size: "small",
19603
19605
  onClick: _ctx.uploadGridSave
19604
19606
  }, {
19605
19607
  default: withCtx(() => [
@@ -19630,7 +19632,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
19630
19632
  }, null, 8, ["modelValue", "preview-list", "preview-index", "file-info"])
19631
19633
  ]);
19632
19634
  }
19633
- const UploadFileList = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-f6018903"]]);
19635
+ const UploadFileList = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-788854bb"]]);
19634
19636
  const propDefine = {
19635
19637
  onlyView: {
19636
19638
  // 是否只读