0👍
Best way ignore this type of format is, after getting result from DB encode in json and then of font-end decode json format which will generate desire result. Like this-
render.js
ipcMain.on('get-result', (event) => {
todolist.aggregate([
{
$sort:{
_id:-1
}
}
])
.exec((err, result) => {
if (!err && result.length) {
event.sender.send('got-it', {
status: true,
result: JSON.stringify(result)
});
} else {
event.sender.send('got-it', {
status: false
});
}
});
});
component.vue
this.$electron.ipcRenderer.send('get-result')
this.$electron.ipcRenderer.on('got-it', (event, data) => {
if (data.status) {
this.allResult = JSON.parse(data.result)
}
else{
this.allResult = ''
}
})
- [Vuejs]-Is there any RecyclerView/UITableView equivalent in Vue.js?
- [Vuejs]-Best practice starting a project on Vue-Cli
Source:stackexchange.com