fix(02): upload image
This commit is contained in:
parent
59436725f7
commit
7476133bef
2 changed files with 9 additions and 13 deletions
|
|
@ -287,9 +287,9 @@ const columns = [
|
|||
},
|
||||
] satisfies QTableProps['columns'];
|
||||
|
||||
watch(profileFileImg, () => {
|
||||
if (profileFileImg.value) reader.readAsDataURL(profileFileImg.value);
|
||||
});
|
||||
// watch(profileFileImg, () => {
|
||||
// if (profileFileImg.value) reader.readAsDataURL(profileFileImg.value);
|
||||
// });
|
||||
|
||||
async function openDialog(
|
||||
action?: 'FORM' | 'INFO',
|
||||
|
|
@ -392,11 +392,7 @@ function onClose() {
|
|||
flowStore.rotate();
|
||||
}
|
||||
async function onSubmit() {
|
||||
if (profileSubmit.value) {
|
||||
formData.value.profileImage = profileFileImg.value as File;
|
||||
} else {
|
||||
formData.value.profileImage = null;
|
||||
}
|
||||
formData.value.profileImage = profileFileImg.value as File;
|
||||
|
||||
if (isEdit.value && userId.value) {
|
||||
if (!userId.value) return;
|
||||
|
|
@ -445,7 +441,6 @@ async function onSubmit() {
|
|||
: hqId.value
|
||||
? hqId.value
|
||||
: '';
|
||||
|
||||
const result = await userStore.create(formData.value);
|
||||
|
||||
if (result && formData.value.userType === 'AGENCY') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue