修改上传触发参数

master
于肖磊 2026-03-19 15:32:40 +08:00
parent 41f412ddd4
commit 37c7beca17
5 changed files with 20 additions and 5 deletions

View File

@ -70,6 +70,11 @@
type: String,
default: 'common',
},
// chooseFocus
propFailChooseFocus: {
type: Boolean,
default: false,
},
//
propCallData: {
type: [Number, String, Array, Object],
@ -178,16 +183,24 @@
var fail = 0;
var length = res.tempFilePaths.length;
var count = 0;
self.upload_one_by_one(res.tempFilePaths, success, fail, count, length);
},
complete(res) {
//#ifndef APP-NVUE
self.$emit('chooseFocus');
//#endif
//#ifdef APP-NVUE
uni.$emit('chooseFocus');
//#endif
self.upload_one_by_one(res.tempFilePaths, success, fail, count, length);
},
fail(res) {
if (self.propFailChooseFocus) {
//#ifndef APP-NVUE
self.$emit('chooseFocus');
//#endif
//#ifdef APP-NVUE
uni.$emit('chooseFocus');
//#endif
}
}
});
},

View File

@ -295,6 +295,7 @@
.comment-input-img {
width: 100rpx;
height: 100rpx;
border-radius: 8rpx;
}
.form-img-icon {
position: absolute;

View File

@ -315,6 +315,7 @@
.comment-input-img {
width: 50rpx;
height: 50rpx;
border-radius: 8rpx;
}
/* 新的举报弹窗样式 */

View File

@ -252,7 +252,7 @@
</view>
<view class="flex-row align-c jc-sb pt-10">
<component-upload :propMaxNum="propMaxNum" :propPathType="editor_path_type" propSlot propSingleCall propIsAllInfo propChooseFocus @call-back="upload_images_event" @chooseFocus="upload_event">
<component-upload :propMaxNum="propMaxNum" :propPathType="editor_path_type" propSlot propSingleCall propIsAllInfo propChooseFocus propFailChooseFocus @call-back="upload_images_event" @chooseFocus="upload_event">
<u-icon propName="layout-module-single-images" propSize="40rpx" propColor="#999"></u-icon>
</component-upload>

View File

@ -246,7 +246,7 @@
</view>
</view>
<view class="flex-row align-c jc-sb wh-auto">
<component-upload :propMaxNum="propMaxNum" :propPathType="editor_path_type" propSlot propSingleCall propIsAllInfo propChooseFocus @call-back="upload_images_event" @chooseFocus="upload_event">
<component-upload :propMaxNum="propMaxNum" :propPathType="editor_path_type" propSlot propSingleCall propIsAllInfo propChooseFocus propFailChooseFocus @call-back="upload_images_event" @chooseFocus="upload_event">
<iconfont name="icon-layout-module-single-images" size="40rpx" color="#999"></iconfont>
</component-upload>