@newview/file-ui 1.1.35 → 1.1.36
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 +7 -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,12 @@ 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
|
-
|
|
559
|
+
debugger;
|
|
560
|
+
this.previewIndex.value = this.previewIndexData[fileInfo.Id];
|
|
561
561
|
});
|
|
562
562
|
this.props = props;
|
|
563
563
|
this.ctx = ctx;
|
|
@@ -624,6 +624,7 @@ let UploadFileInstance$1 = class UploadFileInstance extends BaseInstance {
|
|
|
624
624
|
for (const fileInfo of this.fileList.value) {
|
|
625
625
|
if (this.isImage(fileInfo)) {
|
|
626
626
|
fileInfo.PreviewIndex = index;
|
|
627
|
+
this.previewIndexData[fileInfo.Id] = index;
|
|
627
628
|
this.previewList.value.push(this.getImgUrl(fileInfo));
|
|
628
629
|
index++;
|
|
629
630
|
}
|
|
@@ -19794,9 +19795,10 @@ class ComFormInstance extends BaseInstance {
|
|
|
19794
19795
|
* @param data
|
|
19795
19796
|
*/
|
|
19796
19797
|
__publicField(this, "signOnSuccess", (item, { result, img }) => {
|
|
19797
|
-
var _a;
|
|
19798
19798
|
this.props.formModel[item.model] = result;
|
|
19799
|
-
(
|
|
19799
|
+
if (item.signProp && item.signProp.onSignSuccess) {
|
|
19800
|
+
item.signProp.onSignSuccess({ result, img });
|
|
19801
|
+
}
|
|
19800
19802
|
});
|
|
19801
19803
|
this.props = props;
|
|
19802
19804
|
this.ctx = ctx;
|