@newview/file-ui 1.1.35 → 1.1.37
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 +5 -0
- package/dist/file-ui.js +6 -5
- package/dist/file-ui.umd.cjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/file-ui.js
CHANGED
|
@@ -431,6 +431,7 @@ let UploadFileInstance$1 = class UploadFileInstance extends BaseInstance {
|
|
|
431
431
|
// 响应属性 | ref、reactive、computed、watch
|
|
432
432
|
__publicField(this, "previewVisible", ref(false));
|
|
433
433
|
__publicField(this, "previewList", ref([]));
|
|
434
|
+
__publicField(this, "previewIndexData", {});
|
|
434
435
|
__publicField(this, "previewIndex", ref(0));
|
|
435
436
|
__publicField(this, "previewFileInfo", ref({}));
|
|
436
437
|
// 响应式方法 | xxx = () => {}
|
|
@@ -551,13 +552,11 @@ let UploadFileInstance$1 = class UploadFileInstance extends BaseInstance {
|
|
|
551
552
|
* @param fileInfo
|
|
552
553
|
*/
|
|
553
554
|
__publicField(this, "doView", async (fileInfo, index = 0) => {
|
|
554
|
-
console.log("预览文件", fileInfo);
|
|
555
555
|
const apiResult = await this.fileInfoApi.getEntities(QueryWrapper.create().eq("Token", fileInfo.Token));
|
|
556
556
|
const result = this.utilities.parseApiResult(apiResult);
|
|
557
|
-
console.log("点击预览文件查询接口", result);
|
|
558
557
|
this.previewFileInfo = result[index];
|
|
559
558
|
this.previewVisible.value = true;
|
|
560
|
-
this.previewIndex.value =
|
|
559
|
+
this.previewIndex.value = this.previewIndexData[fileInfo.Id];
|
|
561
560
|
});
|
|
562
561
|
this.props = props;
|
|
563
562
|
this.ctx = ctx;
|
|
@@ -624,6 +623,7 @@ let UploadFileInstance$1 = class UploadFileInstance extends BaseInstance {
|
|
|
624
623
|
for (const fileInfo of this.fileList.value) {
|
|
625
624
|
if (this.isImage(fileInfo)) {
|
|
626
625
|
fileInfo.PreviewIndex = index;
|
|
626
|
+
this.previewIndexData[fileInfo.Id] = index;
|
|
627
627
|
this.previewList.value.push(this.getImgUrl(fileInfo));
|
|
628
628
|
index++;
|
|
629
629
|
}
|
|
@@ -19794,9 +19794,10 @@ class ComFormInstance extends BaseInstance {
|
|
|
19794
19794
|
* @param data
|
|
19795
19795
|
*/
|
|
19796
19796
|
__publicField(this, "signOnSuccess", (item, { result, img }) => {
|
|
19797
|
-
var _a;
|
|
19798
19797
|
this.props.formModel[item.model] = result;
|
|
19799
|
-
(
|
|
19798
|
+
if (item.signProp && item.signProp.onSignSuccess) {
|
|
19799
|
+
item.signProp.onSignSuccess({ result, img });
|
|
19800
|
+
}
|
|
19800
19801
|
});
|
|
19801
19802
|
this.props = props;
|
|
19802
19803
|
this.ctx = ctx;
|