日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

微信小程序-更换头像

發布時間:2024/1/8 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 微信小程序-更换头像 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
<!-- 更換頭像 --><view class="updown-image" bindtap='upload'><view class="personal-img"><image src="{{head}}" mode="aspecFill"></image></view><text class="personal-text" mode="aspecFill" bindtap="headimage">點擊更換頭像</text></view> .updown-image {width: 220rpx;height: 162rpx;border: 1rpx dashed #969696;margin: 37rpx auto;padding: 10rpx;text-align: center;margin-bottom: 145rpx; }.personal-img {width: 160rpx;height: 160rpx;margin: 0 auto; }.personal-img image {width: 100%;height: 100%;border-radius: 50%;box-shadow: 0px 2rpx 8rpx 0rpx rgba(150, 150, 150, 0.6); }.personal-text {display: inline-block;font-size: 28rpx;font-family: PingFang-SC-Regular;font-weight: bold;color: rgba(50, 50, 50, 1);margin-top: 36rpx;width: 170rpx;} Page({data: {showModal: false,head: "https://dj.zjl9.com/static/images/vivi.jpeg", },// 點擊換手機相冊或者電腦本地圖片 upload: function () {var _this = this;wx.chooseImage({count: 1, // 默認9 sizeType: ['original', 'compressed'],// 指定是原圖還是壓縮圖,默認兩個都有 sourceType: ['album', 'camera'],// 指定來源是相冊還是相機,默認兩個都有 success: function (res) {// 返回選定照片的本地文件路徑tempFilePath可以作為img標簽的src屬性顯示圖片 _this.setData({head: res.tempFilePaths})}})},

?

總結

以上是生活随笔為你收集整理的微信小程序-更换头像的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。