herenshan112 3 months ago
parent
commit
db2461d15a
  1. 1
      src/components/DesignForm/assembly/index.ts
  2. 4
      src/components/DesignForm/designLayout/pageSize.vue
  3. 10
      src/components/DesignForm/formControlPropertiNew.vue
  4. 33
      src/components/DesignForm/public/expand/lowcodeImage.vue
  5. 3
      src/components/DesignForm/public/expand/uploadPageList.vue

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

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

4
src/components/DesignForm/designLayout/pageSize.vue

@ -101,8 +101,8 @@ const objectFitOptions = [
label:"contain-包含",
},
{
value:"vover",
label:"vover-原始比例填充",
value:"cover",
label:"cover-原始比例填充",
},
{
value:"none",

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">

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

@ -297,25 +297,45 @@ function selectFile(){
//fileUpload.handleStart();
fileUpload.value.$el.querySelector('input[type="file"]').click();
}
//const fit = props.data.styles.divStyle.objectFit!=undefined ? props.data.styles.divStyle.objectFit : 'fill'
const fit = computed(()=>{
if(props.data.styles.divStyle&&props.data.styles.divStyle.objectFit){
return props.data.styles.divStyle.objectFit
}else{
return 'fill'
}
})
</script>
<template>
<img
<el-image
v-if="(!hasELCard(ancestors))&&props.data.control.useDefaultImg&&props.type==5"
:src="value"
class="avatar"
:style="getFormItemInputStyle(configStyle, 2)"
:fit="fit"
/>
<img
<el-image
v-if="props.data.control.useDefaultImg&&props.type==4"
:src="props.modelValue"
class="avatar"
:style="getFormItemInputStyle(configStyle, 2)"
:fit="fit"
/>
<el-image
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)"
:fit="fit"
/>
<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"
@ -324,11 +344,12 @@ function selectFile(){
:before-upload="beforeAvatarUpload"
v-loading="imgLoading"
>
<img
<el-image
v-if="props.data.control.useDefaultImg"
:src="props.modelValue"
class="avatar"
:style="getFormItemInputStyle(configStyle, 2)"
:fit="fit"
/>
</el-upload>
<!-- <img referrerpolicy="no-referrer" :src="url" :style="styleObject" :fit="fit" :class="[boderAndShadowClassIsActive ? boderAndShadowClass : '', radiusClassIsActive ? radiusClass : '',mp, floatFlag ? floatStyle : '']" /> -->
@ -398,8 +419,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 +432,7 @@ function selectFile(){
:initial-index="4"
fit="cover"
/>
<span v-else style="display: inline-block;"></span>
</div>

3
src/components/DesignForm/public/expand/uploadPageList.vue

@ -85,7 +85,7 @@ const configStyle = computed(() => {
</script>
<template>
<div>
{{ props.control.listType }}
<div v-if="props.control.listType == 'picture-card'">
<div v-for="item in imgAry">
<el-image
@ -109,6 +109,7 @@ const configStyle = computed(() => {
</div>
</div>
<div v-else>
<span v-if="imgAry.length==0"></span>
<div v-for="item in imgAry">
<el-link :underline="false" :href="item" target="_blank">{{ item }}</el-link
><br />

Loading…
Cancel
Save