修改上传触发参数

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, type: String,
default: 'common', default: 'common',
}, },
// chooseFocus
propFailChooseFocus: {
type: Boolean,
default: false,
},
// //
propCallData: { propCallData: {
type: [Number, String, Array, Object], type: [Number, String, Array, Object],
@ -178,16 +183,24 @@
var fail = 0; var fail = 0;
var length = res.tempFilePaths.length; var length = res.tempFilePaths.length;
var count = 0; var count = 0;
self.upload_one_by_one(res.tempFilePaths, success, fail, count, length);
},
complete(res) {
//#ifndef APP-NVUE //#ifndef APP-NVUE
self.$emit('chooseFocus'); self.$emit('chooseFocus');
//#endif //#endif
//#ifdef APP-NVUE //#ifdef APP-NVUE
uni.$emit('chooseFocus'); uni.$emit('chooseFocus');
//#endif //#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 { .comment-input-img {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
border-radius: 8rpx;
} }
.form-img-icon { .form-img-icon {
position: absolute; position: absolute;

View File

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

View File

@ -252,7 +252,7 @@
</view> </view>
<view class="flex-row align-c jc-sb pt-10"> <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> <u-icon propName="layout-module-single-images" propSize="40rpx" propColor="#999"></u-icon>
</component-upload> </component-upload>

View File

@ -246,7 +246,7 @@
</view> </view>
</view> </view>
<view class="flex-row align-c jc-sb wh-auto"> <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> <iconfont name="icon-layout-module-single-images" size="40rpx" color="#999"></iconfont>
</component-upload> </component-upload>