Browse Source

1.未上传图片的显示 "无" 字

2.默认图片可修改开关
lwx_v27
liwenxuan 3 months ago
parent
commit
1d48f44d19
  1. 1
      src/components/DesignForm/assembly/index.ts
  2. 10
      src/components/DesignForm/formControlPropertiNew.vue
  3. 13
      src/components/DesignForm/public/expand/lowcodeImage.vue

1
src/components/DesignForm/assembly/index.ts

@ -549,6 +549,7 @@ export default [
modelValue: '',
uploadFlag: false,
useDefaultImg: false,
defaultAllowsChange: '',
onSiteShot: '',
watermark: '',
imgId: '',

10
src/components/DesignForm/formControlPropertiNew.vue

@ -4385,6 +4385,16 @@ const aiAgentList = ref([
>
</el-upload>
<div v-if="controlData.control.uploadFlag">
<div style="position: relative; left: -60px;top:8px">
默认图片可更改
<el-radio-group v-model="controlData.control.defaultAllowsChange" style="position: relative; left: 8px">
<el-radio value=""></el-radio>
<el-radio value="0"></el-radio>
</el-radio-group>
</div>
</div>
</el-row>
<el-row v-else-if="item.type === 'lowcodeImage_currentShot'">
<el-radio-group v-model="controlData.control.onSiteShot">

13
src/components/DesignForm/public/expand/lowcodeImage.vue

@ -313,9 +313,16 @@ function selectFile(){
class="avatar"
:style="getFormItemInputStyle(configStyle, 2)"
/>
<img
v-if="props.data.control.useDefaultImg&&props.type!=4&&props.type!=5&&props.data.control.defaultAllowsChange=='0'"
:src="props.modelValue"
class="avatar"
:style="getFormItemInputStyle(configStyle, 2)"
/>
<el-upload
v-if="props.type!=4&&props.type!=5"
v-if="props.type!=4&&props.type!=5&&props.data.control.defaultAllowsChange==''"
v-bind="$props"
class="upload-demo"
:action="uploadUrl"
@ -398,8 +405,9 @@ function selectFile(){
</el-upload>
<!-- 详情页略缩图列表 -->
<div v-if ="(!props.data.control.useDefaultImg)&&((props.type==2&&props.data.control.onSiteShot=='1')||props.type==4)" v-for="url in valueArr" class="demo-image__preview">
<div v-if ="(!props.data.control.useDefaultImg)&&((props.type==2&&props.data.control.onSiteShot=='1')||props.type==4)" v-for="url in valueArr" class="demo-image__preview" style="min-height: 42px;display: flex; align-items: center; justify-content: center;">
<el-image
v-if="url!='/src/assets/404_images/imgNotFound.png'"
style="width: 100px; height: 100px;margin: 4px;border: #DCDFE6 1px solid; border-radius: 8px;"
:src="url"
:zoom-rate="1.2"
@ -410,6 +418,7 @@ function selectFile(){
:initial-index="4"
fit="cover"
/>
<span v-else style="display: inline-block;"></span>
</div>

Loading…
Cancel
Save