fix: Edit mode without changing value

This commit is contained in:
Net 2024-08-29 09:53:43 +07:00
parent 185a713ad1
commit 5e1a8ffd00

View file

@ -88,8 +88,13 @@ watch(currentFileSelected, () => {
file.value.findIndex((v, i) => {
if (v.url?.includes(currentFileSelected.value)) {
currentIndex.value = i;
currentMode.value =
props.dropdownList?.[currentIndexDropdownList.value].label || 'other';
const tempValue =
props.dropdownList?.findIndex((v) =>
v.value.includes(currentFileSelected.value.split('-')[0]),
) || 0;
.value = props.dropdownList?.[tempValue].label || 'other';
}
});
});