更新上传校验逻辑

master
于肖磊 2025-10-22 18:35:31 +08:00
parent 2a53c41f31
commit dfe2ff6f7a
3 changed files with 6 additions and 6 deletions

View File

@ -83,7 +83,7 @@
</view>
<!-- 上传视频或图片 -->
<view v-else-if="['upload-img', 'upload-video'].includes(item.key)" :class="flex_direction == 'row' ? 'padding-vertical-sm' : ''">
<component-upload :propValue="item.com_data" :propType="item.key == 'upload-img' ? 'img' : ( item.key == 'upload-video' ? 'video' : 'file')" :propKey="propKey" :propFormInputId="propFormInputId" :propDataId="item.id" :propMobile="mobile" :propStyle="component_style" :propDirection="flex_direction" @dataChange="data_change"></component-upload>
<component-upload :propValue="item.com_data" :propType="item.key == 'upload-img' ? 'img' : ( item.key == 'upload-video' ? 'video' : 'file')" :propKey="propKey" :propFormInputId="propFormInputId" :propDataId="item.id" :propMobile="mobile" :propStyle="component_style" :propDirection="flex_direction" @dataCheck="data_check"></component-upload>
</view>
<!-- 定位 -->
<view v-else-if="item.key == 'position'">
@ -115,7 +115,7 @@
<!-- #ifdef H5 || MP-WEIXIN || MP-QQ -->
<!-- 上传文件 -->
<view v-else-if="item.key == 'upload-attachments'">
<component-upload :propValue="item.com_data" propType="file" :propKey="propKey" :propFormInputId="propFormInputId" :propDataId="item.id" :propMobile="mobile" :propStyle="component_style" :propDirection="flex_direction" @dataChange="data_change"></component-upload>
<component-upload :propValue="item.com_data" propType="file" :propKey="propKey" :propFormInputId="propFormInputId" :propDataId="item.id" :propMobile="mobile" :propStyle="component_style" :propDirection="flex_direction" @dataCheck="data_check"></component-upload>
</view>
<!-- #endif -->
<!-- #ifdef APP-PLUS || H5 || MP-WEIXIN -->

View File

@ -66,7 +66,7 @@
</view>
<!-- 上传视频或图片 -->
<view v-else-if="['upload-img', 'upload-video'].includes(data_item.key)" :class="propDirection == 'row' ? 'padding-vertical-sm' : ''">
<component-upload :propValue="data_item.com_data" :propType="data_item.key == 'upload-img' ? 'img' : ( data_item.key == 'upload-video' ? 'video' : 'file')" :propKey="propKey" :propDataFormId="propDataFormId" :propDataId="data_item.id" :propMobile="propMobile" :propStyle="propComponentStyle" :propDirection="propDirection" @dataChange="data_change"></component-upload>
<component-upload :propValue="data_item.com_data" :propType="data_item.key == 'upload-img' ? 'img' : ( data_item.key == 'upload-video' ? 'video' : 'file')" :propKey="propKey" :propDataFormId="propDataFormId" :propDataId="data_item.id" :propMobile="propMobile" :propStyle="propComponentStyle" :propDirection="propDirection" @dataCheck="data_check"></component-upload>
</view>
<!-- 定位 -->
<view v-else-if="data_item.key == 'position'">
@ -75,7 +75,7 @@
<!-- #ifdef H5 || MP-WEIXIN || MP-QQ -->
<!-- 上传文件 -->
<view v-else-if="data_item.key == 'upload-attachments'">
<component-upload :propValue="data_item.com_data" propType="file" :propKey="propKey" :propDataFormId="propDataFormId" :propDataId="data_item.id" :propMobile="propMobile" :propStyle="propComponentStyle" :propDirection="propDirection" @dataChange="data_change"></component-upload>
<component-upload :propValue="data_item.com_data" propType="file" :propKey="propKey" :propDataFormId="propDataFormId" :propDataId="data_item.id" :propMobile="propMobile" :propStyle="propComponentStyle" :propDirection="propDirection" @dataCheck="data_check"></component-upload>
</view>
<!-- #endif -->
</view>

View File

@ -83,7 +83,7 @@
</view>
<!-- 上传视频或图片 -->
<view v-else-if="['upload-img', 'upload-video'].includes(item.key)" :class="propDirection == 'row' ? 'padding-vertical-sm' : ''">
<component-upload :propValue="item.com_data" :propType="item.key == 'upload-img' ? 'img' : ( item.key == 'upload-video' ? 'video' : 'file')" :propKey="propKey" :propDataFormId="propDataFormId" :propDataId="item.id" :propMobile="propMobile" :propStyle="propComponentStyle" :propDirection="propDirection" @dataChange="data_change"></component-upload>
<component-upload :propValue="item.com_data" :propType="item.key == 'upload-img' ? 'img' : ( item.key == 'upload-video' ? 'video' : 'file')" :propKey="propKey" :propDataFormId="propDataFormId" :propDataId="item.id" :propMobile="propMobile" :propStyle="propComponentStyle" :propDirection="propDirection" @dataCheck="data_check"></component-upload>
</view>
<!-- 定位 -->
<view v-else-if="item.key == 'position'">
@ -92,7 +92,7 @@
<!-- #ifdef H5 || MP-WEIXIN || MP-QQ -->
<!-- 上传文件 -->
<view v-else-if="item.key == 'upload-attachments'">
<component-upload :propValue="item.com_data" propType="file" :propKey="propKey" :propDataFormId="propDataFormId" :propDataId="item.id" :propMobile="propMobile" :propStyle="propComponentStyle" :propDirection="propDirection" @dataChange="data_change"></component-upload>
<component-upload :propValue="item.com_data" propType="file" :propKey="propKey" :propDataFormId="propDataFormId" :propDataId="item.id" :propMobile="propMobile" :propStyle="propComponentStyle" :propDirection="propDirection" @dataCheck="data_check"></component-upload>
</view>
<!-- #endif -->
<view v-if="!isEmpty(item.com_data.common_config.error_text)" class="field-invalid-info">{{ item.com_data.common_config.error_text }}</view>