mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-04-23 12:20:21 +00:00
25 lines
445 B
JavaScript
25 lines
445 B
JavaScript
import Vue from "vue";
|
|
|
|
function exists(id) {
|
|
return document.getElementById(id) !== null;
|
|
}
|
|
|
|
let vueMapping = {
|
|
};
|
|
|
|
window.vues = {};
|
|
|
|
function load() {
|
|
let ids = Object.keys(vueMapping);
|
|
for (let i = 0, len = ids.length; i < len; i++) {
|
|
if (!exists(ids[i])) continue;
|
|
let config = vueMapping[ids[i]];
|
|
config.el = '#' + ids[i];
|
|
window.vues[ids[i]] = new Vue(config);
|
|
}
|
|
}
|
|
|
|
export default load;
|
|
|
|
|
|
|