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

23 lines
559 B
JavaScript
Raw Normal View History

const Vue = require("vue");
function exists(id) {
return document.getElementById(id) !== null;
}
let vueMapping = {
'search-system': require('./search'),
'entity-dashboard': require('./entity-search'),
'code-editor': require('./code-editor'),
'image-manager': require('./image-manager'),
2017-08-11 03:11:25 +08:00
'tag-manager': require('./tag-manager'),
};
window.vues = {};
Object.keys(vueMapping).forEach(id => {
if (exists(id)) {
let config = vueMapping[id];
config.el = '#' + id;
window.vues[id] = new Vue(config);
}
});