fix: index out of range on cancel
This commit is contained in:
parent
1b8393784b
commit
c44dc9aaf3
1 changed files with 1 additions and 13 deletions
|
|
@ -55,6 +55,7 @@ function change(e: Event) {
|
|||
const _file = _element?.files?.[0];
|
||||
|
||||
if (_file) {
|
||||
currentIndex.value = file.length + 1;
|
||||
const reader = new FileReader();
|
||||
reader.readAsDataURL(_file);
|
||||
reader.onload = () => {
|
||||
|
|
@ -125,19 +126,6 @@ const { pdf, pages } = usePDF(computed(() => currentFile.value?.url));
|
|||
@click="
|
||||
() => {
|
||||
currentIndexDropdownList = i;
|
||||
currentIndex = file.length + 1;
|
||||
|
||||
// const _idx = file.findIndex(
|
||||
// (v: any) => v.group === dropdownList?.[i].value,
|
||||
// );
|
||||
// if (_idx !== -1) {
|
||||
// currentIndex = _idx;
|
||||
// } else {
|
||||
// file.push({
|
||||
// group: dropdownList?.[i].value || 'other',
|
||||
// });
|
||||
// currentIndex = file.length - 1;
|
||||
// }
|
||||
browse();
|
||||
}
|
||||
"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue