You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
apply-assistant-v3/uni_modules/rh-ui/components/rh-image/rh-image.vue

64 lines
950 B
Vue

3 months ago
<template>
<view
class="g-rh-image"
:style="{
'padding':pad + 'px',
'background-color':bg,
}"
:class="'g_radius_' + radius"
>
<img :src="url ? url : 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/pugongying/default.svg'"
:class="'g_radius_' + radius"
class=""
mode="aspectFill"
:style="{
'width':(size / 2) + 'px',
'height':(size / 2) + 'px',
}"
@click="handleClick"
/>
</view>
</template>
<script>
/*
* @params url 图片路径
* @params size 尺寸
* @params radius 圆度值
*/
export default{
props:{
url:{
type:String,
default(){
return '';
}
},
size:{
default(){
return 48;
}
},
radius:{
default(){
return 50;
}
},
pad:{
default:0
},
bg:{
default:'none'
}
},
methods:{
handleClick(){
this.$emit('clickItem')
}
}
}
</script>
<style>
</style>