From ef1114c22614762e54e49bc7c600d2a2cd460791 Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期二, 20 八月 2024 17:20:18 +0800 Subject: [PATCH] 页面搭建 --- src/pages/mine/mine.vue | 34 ++++++++++++++++++++++++++++------ 1 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/pages/mine/mine.vue b/src/pages/mine/mine.vue index b8e2ca1..29c4d78 100644 --- a/src/pages/mine/mine.vue +++ b/src/pages/mine/mine.vue @@ -1,13 +1,17 @@ <template> <view class=""> <view class="content chuany-flex chuany-align-end chuany-justify-center"> - <up-avatar src="/static/avatar.jpg" shape="circle" size='80'></up-avatar> + <button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"> + <!-- <image class="avatar" src="{{avatarUrl}}"></image> --> + <up-avatar :src="avatarUrlImg" shape="circle" size='80'></up-avatar> + </button> + </view> <fui-list> <fui-list-cell arrow> <view class="fui-list__item"> - <text>濮撳悕</text> - <text class="fui-text__explain">鏉庝附</text> + <text>鏄电О</text> + <input type="nickname" class="fui-text__explain weui-input" placeholder="璇疯緭鍏ユ樀绉�" /> </view> </fui-list-cell> <fui-list-cell arrow> @@ -24,19 +28,36 @@ </template> <script setup> - import {ref} from 'vue'; + import { + ref + } from 'vue'; + let avatarUrlImg = ref('') + let number1 = ref(0) // let src = "http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg" - const goApply = ()=>{ + const goApply = () => { uni.navigateTo({ url: '/pages/mine/apply' }); + } + const onChooseAvatar = (e) => { + const {avatarUrl} = e.detail + avatarUrlImg.value = avatarUrl } </script> <style> .content { height: 300rpx; - background-color: #d8d8d8; + background: linear-gradient(to bottom,#fbec99, #ffffff); + } + + .avatar-wrapper { + border-radius: 50%; + width: 80px !important; + height: 80px; + margin: 0; + padding: 0; + background-color: transparent; } .fui-list__item { @@ -45,6 +66,7 @@ display: flex; align-items: center; justify-content: space-between; + } .fui-text__explain { -- Gitblit v1.9.1