mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-12-11 12:47:54 +08:00
16 lines
302 B
JavaScript
16 lines
302 B
JavaScript
|
|
||
|
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);
|
||
|
}
|
||
|
});
|