BookStack/resources/assets/js/vues/vues.js

17 lines
330 B
JavaScript
Raw Normal View History

const Vue = require("vue");
function exists(id) {
return document.getElementById(id) !== null;
}
let vueMapping = {
'search-system': require('./search')
};
Object.keys(vueMapping).forEach(id => {
if (exists(id)) {
let config = vueMapping[id];
config.el = '#' + id;
new Vue(config);
}
});