mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-07 02:28:54 +08:00
Pivot implementation and redesign (#69)
- Pivot support implementation - Rename queries into inquiries - Rename editor into workspace - Change result set format - New JSON format for inquiries - Redesign panels
This commit is contained in:
@@ -10,11 +10,9 @@ export default {
|
||||
return file.name.replace(/\.[^.]+$/, '')
|
||||
},
|
||||
|
||||
exportToFile (str, fileName, type = 'octet/stream') {
|
||||
downloadFromUrl (url, fileName) {
|
||||
// Create downloader
|
||||
const downloader = document.createElement('a')
|
||||
const blob = new Blob([str], { type })
|
||||
const url = URL.createObjectURL(blob)
|
||||
downloader.href = url
|
||||
downloader.download = fileName
|
||||
|
||||
@@ -25,6 +23,12 @@ export default {
|
||||
URL.revokeObjectURL(url)
|
||||
},
|
||||
|
||||
async exportToFile (str, fileName, type = 'octet/stream') {
|
||||
const blob = new Blob([str], { type })
|
||||
const url = URL.createObjectURL(blob)
|
||||
this.downloadFromUrl(url, fileName)
|
||||
},
|
||||
|
||||
/**
|
||||
* Note: if user press Cancel in file choosing dialog
|
||||
* it will be an unsettled promise. But it's grabbed by
|
||||
|
||||
Reference in New Issue
Block a user