Bugfixes
This commit is contained in:
@@ -54,18 +54,19 @@ function readFile(file : any) {
|
||||
|
||||
const reader = new FileReader()
|
||||
reader.onloadend = () => {
|
||||
var result = reader.result!.toString();
|
||||
console.log(result);
|
||||
let result = reader.result!.toString();
|
||||
|
||||
let activeIndex = findIndexWithID(activeTabId.value);
|
||||
|
||||
let filePath = inputFile.value.value.split("\\");
|
||||
let fileName = filePath.at(filePath.length - 1);
|
||||
|
||||
tabs.value.at(activeIndex)!.name = fileName;
|
||||
updateData(result);
|
||||
|
||||
|
||||
}
|
||||
reader.readAsText(file.target.files[0]);
|
||||
let activeIndex = findIndexWithID(activeTabId.value);
|
||||
|
||||
let filePath = inputFile.value.value.split("\\");
|
||||
let fileName = filePath.at(filePath.length - 1);
|
||||
|
||||
tabs.value.at(activeIndex)!.name = fileName;
|
||||
}
|
||||
|
||||
function changeActiveTab(id : number) {
|
||||
@@ -84,9 +85,7 @@ function addTab() {
|
||||
id: newTabId.value++,
|
||||
name: "XML" + newTabId.value,
|
||||
data: ""
|
||||
})
|
||||
|
||||
console.log(tabs.value);
|
||||
});
|
||||
}
|
||||
|
||||
function removeTab(id : number) {
|
||||
@@ -94,7 +93,7 @@ function removeTab(id : number) {
|
||||
return
|
||||
|
||||
let indexToRemove = findIndexWithID(id);
|
||||
|
||||
|
||||
switchToExistingTab(indexToRemove)
|
||||
|
||||
tabs.value.splice(indexToRemove, 1);
|
||||
|
||||
Reference in New Issue
Block a user