Код: Выделить всё
ejs-uploaderКод: Выделить всё
import { ref, onMounted } from "vue";
const fileRecordsForUpload = ref([]);
const profileFiles = ref([]);
const props = defineProps(["rowData"]);
const handleProfilePic = (e) => {
fileRecordsForUpload.value.push({
fileName: e.filesData[0].rawFile.name,
file: e.filesData[0].rawFile,
originalName: e.filesData[0].rawFile.name,
});
};
onMounted(() => {
profileFiles.value = props.rowData.driverDocuments
.filter((file) => file.documentType === "Driver Picture")
.map((file) => ({
name: file.documentName,
type: "image/jpeg", // Default type
fileSource: file.contentUrl, // File URL
}));
});
Любая помощь будет оценена!
Подробнее здесь: https://stackoverflow.com/questions/794 ... with-vue-3
Мобильная версия