Commit 9be2593b authored by mukil's avatar mukil

Fixes csv filename issue (#59) & improvements for (#62)

parent 6101794f
Pipeline #7992 passed with stages
in 4 minutes and 23 seconds
<template><!-- Todo Use encoded tableview topic value as file name. -->
<template>
<el-button size="medium" @click="clickHref()">
<a href="#" :download="fileName">Download CSV</a>
<a :href="linkHref" :download="fileName">Download CSV</a>
</el-button>
</template>
......@@ -9,6 +9,7 @@ import Data2CSVLink from "./data-2-csv-link";
export default {
// ### Todo: Support download of filtered tableview data...
created() {
Data2CSVLink.convertToLink(this.data, this.onCsvReady)
},
......@@ -22,7 +23,8 @@ export default {
data() {
return {
csvLink: null
csvLink: null,
linkHref: ""
}
},
......@@ -41,7 +43,7 @@ export default {
methods: {
clickHref () {
window.location.href = this.csvLink
this.linkHref = this.csvLink
},
onCsvReady(csv) {
this.csvLink = csv
......
......@@ -27,7 +27,7 @@
<template slot="header" slot-scope="scope">
<div class="title">{{ column.value }}</div>
<a @click.stop><!-- do not sort on click -->
<a @click.stop>
<el-input v-model="filter[column.uri]" placeholder="Filter" size="mini"></el-input>
</a>
</template>
......@@ -275,6 +275,12 @@ export default {
.el-table .cell {
word-break: break-word;
}
.el-table td:last-child {
padding-right: 3.2em;
}
.el-table .cell a:hover {
color: #409EFF;
}
.el-table td,
.el-table th {
padding: 6px 0px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment