Commit 07a2342b authored by tangfh's avatar tangfh

+

parent 98727182
## 1.0.1(2024-06-18)
1.0.1
## 1.0.0(2024-06-07) ## 1.0.0(2024-06-07)
1.0.0 1.0.0
## 1.0.4(2024-06-04) ## 1.0.4(2024-06-04)
......
<template> <template>
<view class="flex-row v-avatar" :style="[style]" @click="onClick"> <view class="flex-row v-avatar" style="padding-right: 10rpx" :style="[style]" @click="onClick">
<f-image-01 :avatar="avatar" :style="avatarStyle"></f-image-01> <f-image-01 :avatar="avatar" :style="avatarStyle" @tap="onAvatarClick"></f-image-01>
<image class="image-avatar-right" src="/static/f/com-camera-small.png" mode="aspectFill" <image v-if="isEdit" class="image-avatar-right" src="/static/f/com-camera-small.png" mode="aspectFill"
@click.stop="onSelectBtnClick"></image> @click.stop="onSelectBtnClick"></image>
</view> </view>
</template> </template>
...@@ -20,14 +20,15 @@ ...@@ -20,14 +20,15 @@
avatarStyle: { avatarStyle: {
type: Object, type: Object,
default: {} default: {}
},
isEdit: {
type: Boolean,
default: true
} }
}, },
methods: { methods: {
onClick() { onClick() {
this.$emit("click") this.$emit("click")
uni.previewImage({
urls: [this.avatar]
})
}, },
onSelectBtnClick() { onSelectBtnClick() {
let _this = this; let _this = this;
...@@ -39,6 +40,14 @@ ...@@ -39,6 +40,14 @@
} }
}) })
}, },
onAvatarClick() {
uni.previewImage({
current: 0,
urls: [this.avatar],
indicator: "number",
loop: true,
})
},
} }
} }
</script> </script>
...@@ -62,7 +71,7 @@ ...@@ -62,7 +71,7 @@
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
bottom: 0rpx; bottom: 0rpx;
right: 10rpx; right: 14rpx;
flex-shrink: 0; flex-shrink: 0;
position: absolute; position: absolute;
} }
......
{ {
"id": "f-avatar-edit", "id": "f-avatar-edit",
"displayName": "f-avatar-edit", "displayName": "f-avatar-edit",
"version": "1.0.0", "version": "1.0.1",
"description": "头像编辑", "description": "头像编辑",
"keywords": [ "keywords": [
"f-avatar-edit" "f-avatar-edit"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment