Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6566ab25
authored
Dec 30, 2025
by
gonglei
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
加入框架代码
1 parent
60cc37a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
12 deletions
aus-front/app/src/module/account/EditAccountPage.vue
aus-front/app/src/module/account/EditAccountPage.vue
View file @
6566ab2
<
template
>
<view>
<van-cell-group>
<van-cell
title=
"头像"
title-width=
"50"
is-link
custom-class=
"custom-cell"
custom-style=
"display: flex;margin: 16px 0; align-items: center; height: 80px;"
>
<view
style=
"width: 300px;float: right;text-align: right"
>
<uni-file-picker
disable-preview
:del-icon=
"false"
fileMediatype=
"image"
:image-styles=
"imageStyles"
:listStyles=
"listStyles"
@
select=
"selectFile($event)"
:auto-upload=
"true"
:limit=
"1"
file-extname=
"png,jpg,jpeg"
>
<view
style=
"width: 300px;float: right;text-align: right"
>
<van-image
round
width=
"62"
height=
"62"
style=
"width: 300px;float: right;text-align: right;margin-right: 5px"
:src=
"avatarUrl"
/>
</view>
</uni-file-picker>
<van-cell
title=
"头像"
title-width=
"50"
ref=
"filePicker"
is-link
custom-class=
"custom-cell"
custom-style=
"display: flex;margin: 16px 0; align-items: center; height: 80px;"
@
click=
"openFilePicker"
>
<view
style=
"width: 300px;display: flex;justify-content: flex-end;"
>
<view
style=
"margin-right: 15px"
>
<uni-file-picker
disable-preview
:del-icon=
"false"
fileMediatype=
"image"
:image-styles=
"imageStyles"
:listStyles=
"listStyles"
@
select=
"selectFile($event)"
:auto-upload=
"true"
:limit=
"1"
file-extname=
"png,jpg,jpeg"
>
<van-image
round
width=
"62"
height=
"62"
:src=
"avatarUrl"
/>
</uni-file-picker>
</view>
</view>
</van-cell>
<!--
<van-field
label=
"昵称"
v-if=
"accountInfo"
:value=
"accountInfo.nickName"
placeholder=
"请输入昵称"
:border=
"false"
input-align=
"right"
:maxlength=
"32"
@
change=
"changeNickName"
/>
-->
...
...
@@ -44,12 +44,12 @@ export default class EditAccountPage extends Vue {
changeCity
:
any
;
imageStyles
=
{
width
:
30
0
,
width
:
7
0
,
height
:
70
,
border
:
false
,
border
:
{
radius
:
'50%'
},
};
listStyles
=
{
width
:
200
,
border
:
false
,
// 是否显示分隔线
dividline
:
false
...
...
@@ -115,6 +115,23 @@ export default class EditAccountPage extends Vue {
});
}
openFilePicker
()
{
uni
.
chooseFile
({
count
:
1
,
// 最多选择1个文件
type
:
'image'
,
// 可以选择所有类型
success
:
(
res
)
=>
{
console
.
log
(
'手动选择文件结果:'
,
res
);
// 模拟 uni-file-picker 的 select 事件数据结构
const
eventData
=
{
tempFilePaths
:
res
.
tempFilePaths
,
tempFiles
:
res
.
tempFiles
};
// 调用原本绑定的 onSelect 方法
this
.
selectFile
(
eventData
);
}
});
}
editNickName
():
void
{
uni
.
navigateTo
({
url
:
'/module/account/EditAccountNickName'
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment