vue-tables-2
Version:
Vue.js 2 grid components
23 lines (19 loc) • 497 B
JavaScript
;
module.exports = function () {
return {
id: makeId(),
allFilteredData: [],
openChildRows: [],
windowWidth: typeof window !== 'undefined' ? window.innerWidth : null,
userMultiSorting: {},
editing: []
};
};
function makeId() {
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (var i = 0; i < 5; i++) {
text += possible.charAt(Math.floor(Math.random() * possible.length));
}
return text;
}