Skip to content

buttonText prop #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion JsonExcel.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div :id="idName" @click="generate">
<slot> Download {{ name }} </slot>
<slot> {{ buttonText }} </slot>
</div>
</template>

Expand Down Expand Up @@ -51,6 +51,10 @@ export default {
type: String,
default: "data.xls",
},
buttonText: {
type: String,
default: "Download data.xls",
},
fetch: {
type: Function,
},
Expand Down
6 changes: 5 additions & 1 deletion dist/vue-json-excel.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ var script = {
type: String,
default: "data.xls",
},
buttonText: {
type: String,
default: "Download data.xls",
},
fetch: {
type: Function,
},
Expand Down Expand Up @@ -619,7 +623,7 @@ var __vue_render__ = function() {
return _c(
"div",
{ attrs: { id: _vm.idName }, on: { click: _vm.generate } },
[_vm._t("default", [_vm._v(" Download " + _vm._s(_vm.name) + " ")])],
[_vm._t("default", [_vm._v(" " + _vm._s(_vm.buttonText) + " ")])],
2
)
};
Expand Down
6 changes: 5 additions & 1 deletion dist/vue-json-excel.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ var script = {
type: String,
default: "data.xls",
},
buttonText: {
type: String,
default: "Download data.xls",
},
fetch: {
type: Function,
},
Expand Down Expand Up @@ -617,7 +621,7 @@ var __vue_render__ = function() {
return _c(
"div",
{ attrs: { id: _vm.idName }, on: { click: _vm.generate } },
[_vm._t("default", [_vm._v(" Download " + _vm._s(_vm.name) + " ")])],
[_vm._t("default", [_vm._v(" " + _vm._s(_vm.buttonText) + " ")])],
2
)
};
Expand Down
8 changes: 6 additions & 2 deletions dist/vue-json-excel.umd.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.JsonExcel = factory());
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.JsonExcel = factory());
}(this, (function () { 'use strict';

var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
Expand Down Expand Up @@ -220,6 +220,10 @@
type: String,
default: "data.xls",
},
buttonText: {
type: String,
default: "Download data.xls",
},
fetch: {
type: Function,
},
Expand Down Expand Up @@ -623,7 +627,7 @@
return _c(
"div",
{ attrs: { id: _vm.idName }, on: { click: _vm.generate } },
[_vm._t("default", [_vm._v(" Download " + _vm._s(_vm.name) + " ")])],
[_vm._t("default", [_vm._v(" " + _vm._s(_vm.buttonText) + " ")])],
2
)
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
"rollup-plugin-vue": "^4.7.2",
"vue-template-compiler": "^2.6.10"
}
}
}