1234567891011121314151617181920212223242526272829303132 |
- <!-- 个人资料修改 -->
- <template>
- <view>
- <u-cell-group>
- <u-cell-item title="头像修改">
- <u-upload slot="right-icon" :custom-btn="true" :before-upload="beforeUpload" :multiple="false" :show-upload-list="false">
- <u-avatar slot="addBtn" :src="avatarUrl" mode="circle" size="100"></u-avatar>
- </u-upload>
- </u-cell-item>
- </u-cell-group>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- avatarUrl: require('@/static/img/avatar.jpg')
- }
- },
- methods: {
- beforeUpload(index, list) {
- console.log(index)
- console.log(list)
- }
- }
- }
- </script>
- <style>
- </style>
|