@ -297,25 +297,45 @@ function selectFile(){
/ / f i l e U p l o a d . h a n d l e S t a r t ( ) ;
fileUpload . value . $el . querySelector ( 'input[type="file"]' ) . click ( ) ;
}
/ / c o n s t f i t = p r o p s . d a t a . s t y l e s . d i v S t y l e . o b j e c t F i t ! = u n d e f i n e d ? p r o p s . d a t a . s t y l e s . d i v S t y l e . o b j e c t F i t : ' f i l l '
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 - ima ge
v - if = "(!hasELCard(ancestors))&&props.data.control.useDefaultImg&&props.type==5"
: src = "value"
class = "avatar"
: style = "getFormItemInputStyle(configStyle, 2)"
: fit = "fit"
/ >
< img
< el - ima ge
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 - ima ge
v - if = "props.data.control.useDefaultImg"
: src = "props.modelValue"
class = "avatar"
: style = "getFormItemInputStyle(configStyle, 2)"
: fit = "fit"
/ >
< / e l - u p l o a d >
<!-- < img referrerpolicy = "no-referrer" :src ="url" :style ="styleObject" :fit ="fit" : class = "[boderAndShadowClassIsActive ? boderAndShadowClass : '', radiusClassIsActive ? radiusClass : '',mp, floatFlag ? floatStyle : '']" / > -- >
@ -398,8 +419,9 @@ function selectFile(){
< / e l - u p l o a d >
<!-- 详情页略缩图列表 -- >
< 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 >