first commit
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<image :src="src ? src : '/static/images/userpic.png'" mode="widthFix" :style="getStyle" :class="type" @click="clickEvent"></image>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
size:{
|
||||
type:[String,Number],
|
||||
default:90
|
||||
},
|
||||
src: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
type:{
|
||||
type:String,
|
||||
default:"rounded"
|
||||
},
|
||||
clickType:{
|
||||
type:String,
|
||||
default:"none"
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
getStyle() {
|
||||
return `width: ${this.size}rpx;height: ${this.size}rpx;`
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
|
||||
switch (this.clickType){
|
||||
case 'navigate':
|
||||
// console.log(this.clickType)
|
||||
uni.navigateTo({
|
||||
url: '/pages/mail/user-base/user-base'
|
||||
});
|
||||
break;
|
||||
default:
|
||||
this.$emit('click')
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user