修改图片上传
parent
ddfb967c72
commit
c2da7e5f41
|
|
@ -84,9 +84,14 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
//#ifndef APP-NVUE
|
||||||
this.setData({
|
this.setData({
|
||||||
form_images_list: (this.propData || null) == null ? [] : (typeof this.propData == 'string' ? this.propData.split(',') : this.propData),
|
form_images_list: (this.propData || null) == null ? [] : (typeof this.propData == 'string' ? this.propData.split(',') : this.propData),
|
||||||
});
|
});
|
||||||
|
//#endif
|
||||||
|
//#ifdef APP-NVUE
|
||||||
|
this.form_images_list = (this.propData || null) == null ? [] : (typeof this.propData == 'string' ? this.propData.split(',') : this.propData);
|
||||||
|
//#endif
|
||||||
},
|
},
|
||||||
created: function () {},
|
created: function () {},
|
||||||
|
|
||||||
|
|
@ -111,11 +116,18 @@
|
||||||
if(self.propSingleCall) {
|
if(self.propSingleCall) {
|
||||||
// 是否返回全部信息
|
// 是否返回全部信息
|
||||||
if(self.propIsAllInfo) {
|
if(self.propIsAllInfo) {
|
||||||
|
//#ifndef APP-NVUE
|
||||||
self.$emit('call-back', data.data, self.propCallData);
|
self.$emit('call-back', data.data, self.propCallData);
|
||||||
|
//#endif
|
||||||
|
//#ifdef APP-NVUE
|
||||||
|
self.$emit('callBack', data.data, self.propCallData);
|
||||||
|
//#endif
|
||||||
} else {
|
} else {
|
||||||
self.$emit('call-back', data.data.url, self.propCallData);
|
self.$emit('call-back', data.data.url, self.propCallData);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
console.log(list);
|
||||||
|
|
||||||
var list = self.form_images_list;
|
var list = self.form_images_list;
|
||||||
// 返回全部信息
|
// 返回全部信息
|
||||||
if(self.propIsAllInfo) {
|
if(self.propIsAllInfo) {
|
||||||
|
|
@ -123,9 +135,14 @@
|
||||||
} else {
|
} else {
|
||||||
list.push(data.data.url);
|
list.push(data.data.url);
|
||||||
}
|
}
|
||||||
|
//#ifndef APP-NVUE
|
||||||
self.setData({
|
self.setData({
|
||||||
form_images_list: list,
|
form_images_list: list,
|
||||||
});
|
});
|
||||||
|
//#endif
|
||||||
|
//#ifdef APP-NVUE
|
||||||
|
self.form_images_list = list;
|
||||||
|
//#endif
|
||||||
self.$emit('call-back', self.form_images_list, self.propCallData);
|
self.$emit('call-back', self.form_images_list, self.propCallData);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -177,9 +194,14 @@
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
var list = self.form_images_list;
|
var list = self.form_images_list;
|
||||||
list.splice(e.currentTarget.dataset.index, 1);
|
list.splice(e.currentTarget.dataset.index, 1);
|
||||||
|
//#ifndef APP-NVUE
|
||||||
self.setData({
|
self.setData({
|
||||||
form_images_list: list,
|
form_images_list: list,
|
||||||
});
|
});
|
||||||
|
//#endif
|
||||||
|
//#ifdef APP-NVUE
|
||||||
|
self.form_images_list = list;
|
||||||
|
//#endif
|
||||||
self.$emit('call-back', self.form_images_list, self.propCallData);
|
self.$emit('call-back', self.form_images_list, self.propCallData);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -251,15 +251,21 @@
|
||||||
.comment-input-img-container {
|
.comment-input-img-container {
|
||||||
padding: 10rpx 16rpx 16rpx 16rpx;
|
padding: 10rpx 16rpx 16rpx 16rpx;
|
||||||
}
|
}
|
||||||
.comment-input-img-close {
|
|
||||||
position: absolute;
|
|
||||||
right: -15rpx;
|
|
||||||
top: -15rpx;
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
.comment-input-img {
|
.comment-input-img {
|
||||||
width: 50rpx;
|
width: 100rpx;
|
||||||
height: 50rpx;
|
height: 100rpx;
|
||||||
|
}
|
||||||
|
.form-img-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 6rpx;
|
||||||
|
margin: 5rpx 0 5rpx 5rpx;
|
||||||
|
z-index: 2;
|
||||||
|
height: 30rpx;
|
||||||
|
width: 30rpx;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 新的举报弹窗样式 */
|
/* 新的举报弹窗样式 */
|
||||||
|
|
|
||||||
|
|
@ -162,15 +162,17 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row align-c wh-auto ht-auto pr-16 box-border-box" :style="window_more_style">
|
<view class="flex-row align-c wh-auto ht-auto pr-16 box-border-box" :style="window_more_style">
|
||||||
<input :value="comment_input_value" class="comment-input mr-10" type="text" confirm-type="send" :adjust-position="false" :placeholder="$t('video-detail.video-detail.98yyuf')" @focus="add_comment" @input="comment_input_event" @confirm="send_comment" />
|
<input :value="comment_input_value" class="comment-input mr-10" type="text" confirm-type="send" :adjust-position="false" :placeholder="$t('video-detail.video-detail.98yyuf')" @focus="add_comment" @input="comment_input_event" @confirm="send_comment" />
|
||||||
<component-upload :propMaxNum="propMaxNum" :propPathType="editor_path_type" propSlot propSingleCall propIsAllInfo @call-back="upload_images_event">
|
<component-upload :propMaxNum="propMaxNum" :propPathType="editor_path_type" propSlot propSingleCall propIsAllInfo @callBack="upload_images_event">
|
||||||
<u-icon propName="layout-module-single-images" propSize="32rpx" propColor="#999"></u-icon>
|
<u-icon propName="layout-module-single-images" propSize="32rpx" propColor="#999"></u-icon>
|
||||||
</component-upload>
|
</component-upload>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="form_images_list && form_images_list.length > 0" class="pr w h comment-input-img-container">
|
<view v-if="form_images_list && form_images_list.length > 0" class="pr w h comment-input-img-container">
|
||||||
<view v-for="(item, index) in form_images_list" :key="index" class="comment-input-img pr">
|
<view v-for="(item, index) in form_images_list" :key="index" class="comment-input-img pr">
|
||||||
<u-icon propName="close" propSize="10" propColor="#000" class="comment-input-img-close" :data-index="index" @tap="comment_input_img_close"></u-icon>
|
<image :src="item.url" :data-index="index" @tap="upload_show_event" mode="aspectFill" class="comment-input-img"></image>
|
||||||
<image :src="item.url" :data-index="index" @tap="upload_show_event" mode="aspectFill" class="wh-auto ht-auto"></image>
|
<view class="form-img-icon flex-row align-c jc-c" @tap="comment_input_img_close">
|
||||||
|
<u-icon propName="close" propSize="30rpx" propColor="#000" class="flex-row align-c jc-c" :data-index="index"></u-icon>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -226,14 +228,16 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row align-c wh-auto ht-auto pr-16 box-border-box" :style="window_more_style">
|
<view class="flex-row align-c wh-auto ht-auto pr-16 box-border-box" :style="window_more_style">
|
||||||
<input ref="commentRef" :value="comment_input_value" :focus="is_add_comment" class="comment-input" style="margin-right: 20rpx;" type="text" confirm-type="send" :adjust-position="false" :auto-blur="true" :placeholder="input_placeholder" @input="comment_input_event" @blur="() => is_add_comment = false" @confirm="send_comment" />
|
<input ref="commentRef" :value="comment_input_value" :focus="is_add_comment" class="comment-input" style="margin-right: 20rpx;" type="text" confirm-type="send" :adjust-position="false" :auto-blur="true" :placeholder="input_placeholder" @input="comment_input_event" @blur="() => is_add_comment = false" @confirm="send_comment" />
|
||||||
<component-upload :propMaxNum="propMaxNum" :propPathType="editor_path_type" propSlot propSingleCall propIsAllInfo @call-back="upload_images_event">
|
<component-upload :propMaxNum="propMaxNum" :propPathType="editor_path_type" propSlot propSingleCall propIsAllInfo @callBack="upload_images_event">
|
||||||
<u-icon propName="layout-module-single-images" propSize="48rpx" propColor="#999"></u-icon>
|
<u-icon propName="layout-module-single-images" propSize="48rpx" propColor="#999"></u-icon>
|
||||||
</component-upload>
|
</component-upload>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="form_images_list && form_images_list.length > 0" class="pr w h comment-input-img-container">
|
<view v-if="form_images_list && form_images_list.length > 0" class="pr w h comment-input-img-container">
|
||||||
<view v-for="(item, index) in form_images_list" :key="index" class="comment-input-img pr">
|
<view v-for="(item, index) in form_images_list" :key="index" class="comment-input-img pr">
|
||||||
<u-icon propName="close" propSize="10" propColor="#000" class="comment-input-img-close" :data-index="index" @tap="comment_input_img_close"></u-icon>
|
<image :src="item.url" :data-index="index" @tap="upload_show_event" mode="aspectFill" class="comment-input-img"></image>
|
||||||
<image :src="item.url" :data-index="index" @tap="upload_show_event" mode="aspectFill" class="wh-auto ht-auto"></image>
|
<view class="form-img-icon flex-row align-c jc-c" @tap="comment_input_img_close">
|
||||||
|
<u-icon propName="close" propSize="30rpx" propColor="#000" class="flex-row align-c jc-c" :data-index="index"></u-icon>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue